fhirctl is an open-source command-line tool for FHIR (HL7 FHIR R4) health data. It exports, imports, copies, compares, validates and masks data on any standard FHIR server, AWS HealthLake, Google Cloud Healthcare API and Azure Health Data Services. It also includes an MCP gateway that lets AI agents read FHIR data only under a signed policy that you set, with a signed access log.
fhirctl is built and maintained by Nirmitee, a healthcare software engineering company.
Status: release v0.2.0. The data commands are usable for test and synthetic data. The agent gateway is a preview. Do not use fhirctl on real patient data before release 1.0.
Download the archive for your system from the latest release. Builds exist for Linux, macOS and Windows, on amd64 and arm64. Each release has signed checksums and an SBOM.
If you have Go 1.26 or later, you can also install from source:
go install github.com/Nirmitee-tech/fhirctl/cmd/fhirctl@latest
| Command | What it does |
|---|---|
fhirctl export |
Saves resources from a FHIR server (any standard R4 server, AWS HealthLake, Google Cloud or Azure) to NDJSON files, one per type. --since saves only changed records. |
fhirctl import |
Loads NDJSON files into a server with parallel writers. A re-run resumes. |
fhirctl copy |
Moves resources from one server to another. |
fhirctl diff |
Lists missing, extra and changed resources between two exports. |
fhirctl validate |
Structural check of resources (not full profile validation). |
fhirctl protect |
Withholds labeled records, removes identifiers from free text and masks structured identifier fields. Not HIPAA Safe Harbor. |
fhirctl flatten |
Turns NDJSON into one CSV file per type for spreadsheets. |
fhirctl seed |
Makes synthetic test data, to a folder or a server. |
fhirctl mask |
Removes direct identifiers. This is not full de-identification. |
fhirctl audit |
Makes signing keys, in a file or the OS keystore, and checks signed audit logs. |
fhirctl verify-summary |
Checks a signed run summary and the files it lists. |
fhirctl gateway |
Preview. An MCP server for AI agents, with a signed policy, per-agent limits, revocation and a signed access log. See gateway-serve. |
Full details, examples and limits: docs/FEATURES.md.
You need Go 1.26 or later.
make test # all tests, in parallel
make cover # coverage, including the tests that run the real binary
make test-race # the same tests with the race detector
make build # one static binary in bin/
- Philosophy: the rules every change follows.
- Feature guide: every command, with examples and limits.
- Roadmap: milestones.
- Testing: how the tests stay fast at scale.
- FAQ: short answers to common questions.
- Data map: what fhirctl reads, writes and sends.
- Threat model: threats, controls and the risks still open.
- Controls: each control and the test that checks it. Using fhirctl does not make anyone compliant.
- Questionnaire answers: common vendor security questions, about the tool only.
- To report a problem: SECURITY.md.
fhirctl is built and maintained by Nirmitee. Nirmitee builds healthcare integrations, FHIR and EHR connections, and interoperability software. For help with a FHIR migration or integration, visit nirmitee.io.
License: Apache 2.0. Copyright 2026 Nirmitee.io.