Quick Start
Get up and running with MAKI in just a few minutes.
Prerequisites
Section titled “Prerequisites”- Rust 1.80 or later (if building from source)
- OR use pre-built binaries
Step 1: Install MAKI
Section titled “Step 1: Install MAKI”cargo install makiVerify the installation:
maki --versionStep 2: Initialize a New Project
Section titled “Step 2: Initialize a New Project”Create a new FHIR Implementation Guide project:
maki init MyIGcd MyIGOr initialize configuration in an existing project:
cd your-fsh-projectmaki config initStep 3: Build Your IG
Section titled “Step 3: Build Your IG”Build FSH files to FHIR resources (SUSHI-compatible):
maki build --progressThis compiles FSH from input/fsh/ to FHIR JSON in fsh-generated/.
Step 4: Lint Your Files
Section titled “Step 4: Lint Your Files”Check your FSH files for issues:
maki lint input/fsh/MAKI will show you any issues found:
error[correctness/duplicate-definition]: Duplicate profile definition
> 15 │ Profile: PatientProfile │ ^^^^^^^^^^^^^^ Profile 'PatientProfile' is already defined 16 │ * name 1..1 MS
i First defined at line 8Step 5: Format Your Code
Section titled “Step 5: Format Your Code”Format your FSH files for consistent style:
maki fmt input/fsh/The formatter will:
- Normalize spacing around
:and= - Align rules for better readability
- Preserve all comments and blank lines
- Maintain consistent indentation
You can also check formatting without modifying files:
maki fmt --check input/fsh/Step 6: Auto-fix Issues
Section titled “Step 6: Auto-fix Issues”Many issues can be fixed automatically:
maki lint --write input/fsh/MAKI will apply safe fixes and report what was changed.
Step 7: Convert FHIR to FSH (GoFSH)
Section titled “Step 7: Convert FHIR to FSH (GoFSH)”Convert existing FHIR resources back to FSH:
maki gofsh ./fsh-generated -o ./converted-fsh --progressCommon Workflows
Section titled “Common Workflows”Build with Quality Checks
Section titled “Build with Quality Checks”Run linter and formatter before building:
maki build --lint --format --progressStrict Mode Build
Section titled “Strict Mode Build”Treat warnings as errors (useful for CI):
maki build --lint --strictClean Rebuild
Section titled “Clean Rebuild”Clean output and rebuild from scratch:
maki build --clean --progressNext Steps
Section titled “Next Steps”- CLI Commands Reference for all available commands
- Learn about the formatter for automatic code formatting
- Configure rules to match your project’s needs
- Learn about built-in rules to understand what MAKI checks
- Write custom rules for project-specific validation
- Integrate with CI/CD to automate linting and formatting
Common Commands
Section titled “Common Commands”# Build FSH to FHIRmaki build --progress
# Lint with automatic fixesmaki lint --write input/fsh/
# Format FSH filesmaki fmt input/fsh/
# Check formatting (useful for CI)maki fmt --check input/fsh/
# Convert FHIR to FSHmaki gofsh ./fsh-generated -o ./output
# List all available rulesmaki rules
# Get helpmaki --helpmaki build --helpHelp and Support
Section titled “Help and Support”- Run
maki --helpfor command-line help - Run
maki <command> --helpfor command-specific help - Check the Troubleshooting Guide for common issues