# 🚀 New Open Source Tool for openEHR: openEHR-CLI **Category:** [Tools](https://discourse.openehr.org/c/tool-dev/36) **Created:** 2026-03-07 00:10 UTC **Views:** 156 **Replies:** 4 **URL:** https://discourse.openehr.org/t/new-open-source-tool-for-openehr-openehr-cli/11807 --- ## Post #1 by @pablo We’ve just released **openEHR-CLI**, a new open source command-line tool designed to make working with **openEHR** artifacts easier for developers, architects, and implementers. 🔧 **What is it?** openEHR-CLI provides a simple command-line interface to work with openEHR models and artifacts. It helps automate common tasks when dealing with archetypes, templates, and other openEHR resources, making it easier to integrate these operations into scripts, pipelines, and development workflows. 🧰 **Typical use cases** * Validate openEHR templates and artifacts * Inspect and process openEHR models from the terminal * Automate checks and workflows in CI/CD pipelines * Integrate openEHR tooling into development scripts 🤖 **Built-in MCP Server for AI integrations** One of the most interesting features is that **openEHR-CLI includes an MCP (Model Context Protocol) server**. This allows the CLI tools to be exposed as **AI-accessible tools**, meaning AI assistants and developer tools that support MCP can interact directly with openEHR artifacts. In practice, this means tools like **Claude Desktop, Cursor, LibreChat, and other MCP-compatible clients** can use openEHR-CLI capabilities programmatically through AI workflows. This opens the door to new possibilities such as: * AI assistants exploring openEHR archetypes and specifications * Automating model discovery and inspection * Building AI workflows around openEHR modeling and development 💻 **Try it out** GitHub: https://github.com/CaboLabs/openEHR-CLI Feedback, issues, and contributions from the community are very welcome! --- ## Post #2 by @pablo I have tested the MCP in Claude Code, and it seems to understand the CLI commands. Though for simple things I would just use the CLI directly. ![claude_code|575x500](upload://m6Z8E5eVCpp3xyE2Hr5eC5JCMV3.jpeg) --- ## Post #3 by @pablo Small video showing how to download, build and run the openEHR-CLI: https://youtu.be/xXfmjxbsYC4 --- ## Post #4 by @pablo Hi all, In our path to full traceability when archetype/opt changes, we have added the "OPT diff" command to the openEHR-CLI, which is freely available. It basically compares structural, terminology and data constraints changes between two versions of the same OPT, and shows a detailed tree like report of the findings. It's not a syntax comparison, it's a comparison of the whole constraint tree and their details. ![openEHR-CLI OPT diff|690x219](upload://z3ulrGrrH2CM4A9w0ZeZJwdMItf.jpeg) Here you can see: - name changed on a node - archetype version changes - nodes being removed - nodes being added - data constraints modified: for a coded text constraint, one code was removed Another, more complex, example: ![openEHR-CLI OPT diff 2|690x357](upload://nWy2mULuo6ggymIjUnsKV1vQMWP.jpeg) We plan to have something similar for ADL. Check it here: https://github.com/CaboLabs/openEHR-CLI This new command will also be available in the openEHR Toolkit: https://toolkit.cabolabs.com/ Please let me know if you have any ideas to improve this or if you find any issues. Thanks! PS: I'll be in Amsterdam for the EHRCON26, if you want to chat about any of this, please DM me and we'll grab a coffee there! --- ## Post #5 by @pablo This is how the semantic OPT diff looks like in Atomik ![Atomik OPT diff|377x500](upload://xdforgJpMtyt52FMykIzWVkvA05.jpeg) --- **Canonical:** https://discourse.openehr.org/t/new-open-source-tool-for-openehr-openehr-cli/11807 **Original content:** https://discourse.openehr.org/t/new-open-source-tool-for-openehr-openehr-cli/11807