Analyze a Server
The analyze command fetches a CapabilityStatement and produces a structured report.
Basic usage
Section titled “Basic usage”# From a live server (appends /metadata automatically)fhir-capability-analyzer analyze https://hapi.fhir.org/baseR4
# From a local JSON filefhir-capability-analyzer analyze ./capability.jsonOutput formats
Section titled “Output formats”Text (default)
Section titled “Text (default)”Human-readable terminal output with sections for resources, operations, profile conformance, security, and warnings.
fhir-capability-analyzer analyze ./examples/us-core-server.jsonServer: Example US Core FHIR ServerFHIR Version: 4.0.1Status: activeFormats: json
Resources (2)------------- Patient read, search-type [5 search params] Observation read, search-type [4 search params]
Profile Conformance------------------- US Core (3 profile URL(s))
Security-------- CORS: enabled Auth: SMART-on-FHIRProduces a stable AnalysisReport object — suitable for CI pipelines, AI agents, and downstream processing.
fhir-capability-analyzer analyze ./examples/us-core-server.json --format jsonThe JSON schema is the AnalysisReport TypeScript type — see Library API.
Markdown
Section titled “Markdown”Produces a Markdown document with tables for resources, profile conformance, and security.
fhir-capability-analyzer analyze ./examples/us-core-server.json --format markdownWarnings
Section titled “Warnings”The analyzer generates warnings for common CapabilityStatement issues:
| Warning | What it means |
|---|---|
No security configuration declared | CORS disabled and no auth services |
status is 'draft' | May not reflect production capabilities |
declares search-type but has no search parameters | Likely a misconfiguration |
has search parameters but does not declare search-type | Likely a misconfiguration |
FHIR version is missing or unrecognized | Version field missing or non-standard |
Server declares no resources | Empty REST capabilities |
When warnings are found, the command exits with code 1 (text and markdown modes). In JSON mode, warnings are included in the output but the exit code is always 0.
Exit codes
Section titled “Exit codes”See Exit codes.