Skip to main content

CLI tool for generating Simplifier.net supported Implementation Guide structures from an IG publisher like input folder

Project description

simplifier-ig

CLI tool for generating Simplifier.net Implementation Guide structures from a IG publisher like input folder. The tool supports initializing a new IG input structure, validating the input, and generating the IG output. It also allows saving configuration for repeated use.

Installation

Via pip (recommended for developers)

pip install simplifier-ig

Via standalone binary (no Python required)

Download the pre-built binary for your OS from the GitHub Actions artifacts:

  1. Go to the Actions tab → Build Binaries workflow

  2. Click on the latest successful run (tagged with a version like v0.1.0)

  3. Scroll down to Artifacts and download:

    • simplifier-ig-linux (Linux)
    • simplifier-ig-macos (macOS)
    • simplifier-ig-windows (Windows)
  4. Extract the binary and make it executable (Linux/macOS only):

    # Linux/macOS
    chmod +x simplifier-ig
    ./simplifier-ig --help
    
    # Or add to PATH
    sudo mv simplifier-ig /usr/local/bin/
    
    # Windows (PowerShell)
    .\simplifier-ig.exe --help
    
    # Or add to PATH by moving to a directory in your PATH
    

Note: Binaries are currently stored as GitHub Actions artifacts (90-day retention). For permanent releases, they can be manually attached to GitHub Releases or automated via an additional workflow.

From source

git clone https://github.com/ArdonToonstra/simplifier-ig.git
cd simplifier-ig
pip install .

As a GitHub Action

Use this action in your workflows to generate IGs automatically:

# .github/workflows/generate-ig.yml
name: Generate IG
on: [push]

jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Generate Implementation Guide
        uses: ArdonToonstra/simplifier-ig@v1
        with:
          input: ./input
          output: ./guides

      - name: Upload IG output
        uses: actions/upload-artifact@v4
        with:
          name: ig-output
          path: ./guides

Action inputs

Input Description Default
command Command to run: generate, validate, ig-resource generate
input Path to the IG input folder ./input
output Path to the output folder ./guides
skip-validation Skip input validation (true/false) false
no-ig-resource Skip ImplementationGuide.json generation (true/false) false
python-version Python version to use 3.12

Validate only

- uses: ArdonToonstra/simplifier-ig@v1
  with:
    command: validate
    input: ./input

Usage

Initialize a new IG input folder

simplifier-ig init --path ./my-ig --name "My Implementation Guide"
Option Description Default
--path Where to create the IG input structure ./input
--name Name for the Implementation Guide My Implementation Guide
--style Style folder name custom
--force Allow init in a non-empty directory

Validate an IG input folder

simplifier-ig validate --input ./my-ig

Generate an IG

simplifier-ig generate --input ./my-ig --output ./output

By default, an ImplementationGuide.json FHIR R4 resource is generated alongside the IG. Only FHIR R4 (4.0.1) is currently supported for IG resource generation. This requires the following fields in guide.yaml:

id: my.ig.id
status: draft          # draft | active | retired | unknown
fhirVersion: 4.0.1
canonical: https://example.org/fhir

If these fields are missing, the tool warns and skips IG resource generation automatically.

Option Description Default
--input Path to the input folder saved path or ./input
--output Path to the output folder ./guides
--skip-validation Skip input validation
--no-ig-resource Skip ImplementationGuide.json resource generation

Generate IG resource separately

simplifier-ig ig-resource --path ./output/my-ig --input ./my-ig

Configuration

simplifier-ig config   # Show current configuration
simplifier-ig clear    # Clear saved configuration

Input folder structure

After running init, the input folder will have this structure:

my-ig/
├── guide.yaml                  # IG configuration (title, url-key, menu, etc.)
├── variables.yaml              # Template variables
├── resources/                  # FHIR conformance resources (.json)
├── examples/                   # FHIR example resources (.json)
├── fsh-generated/              # (optional) SUSHI output
│   └── resources/              # FSH-compiled FHIR resources (.json)
├── pages/                      # Markdown documentation pages
├── images/                     # (optional) Images
├── pagetemplates/              # (optional) Reusable page snippets
├── pagetemplates-artifacts/    # Per-resource-type page templates
└── styles/
    └── custom/
        ├── master.html
        ├── settings.style
        └── style.css

FHIR Shorthand (FSH) support

If your project uses FHIR Shorthand, run SUSHI before running this tool:

sushi .
simplifier-ig generate --input ./my-ig --output ./output

Resources from fsh-generated/resources/ are automatically picked up alongside resources/. If the same resource (same resourceType + id) exists in both folders, the one in resources/ takes priority.

Development

git clone https://github.com/ArdonToonstra/simplifier-ig.git
cd simplifier-ig
pip install -e .

You can also run the tool as a module:

python -m simplifier_ig --help

Building binaries

The GitHub Actions workflow builds standalone binaries for Linux, macOS, and Windows using PyInstaller when a version tag is pushed (e.g., v0.1.0).

To build binaries for a release:

git tag v0.1.0
git push origin v0.1.0

This triggers the Build Binaries workflow which creates three artifacts:

  • simplifier-ig-linux (Ubuntu)
  • simplifier-ig-macos (macOS)
  • simplifier-ig-windows (Windows .exe)

Artifacts are available in the Actions tab → Build Binaries workflow for 90 days. To attach binaries permanently to GitHub Releases, either:

  • Download artifacts and manually attach to the release, or
  • Extend the workflow to automatically create a GitHub Release with attached binaries

Publishing to PyPI

Tag a release to trigger the publish workflow:

git tag v0.1.0
git push origin v0.1.0

This triggers the Publish to PyPI workflow, which uses OpenID Connect (Trusted Publisher) — no API token or secret is required.

Dependencies

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplifier_ig-0.2.0.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplifier_ig-0.2.0-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file simplifier_ig-0.2.0.tar.gz.

File metadata

  • Download URL: simplifier_ig-0.2.0.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for simplifier_ig-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d3aef568bca8972273681daa72784f8ccd863863c2825d334a8808e79966effa
MD5 4c6f995a1e945aaaaf34693e76364fa9
BLAKE2b-256 f23447a4707740ab3566caf1a307af11c887e71b029801efa5a5b17ad8a9ac68

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplifier_ig-0.2.0.tar.gz:

Publisher: publish.yml on ArdonToonstra/simplifier-ig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplifier_ig-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: simplifier_ig-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for simplifier_ig-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d96cec5a48baf09b7e0b6b83aff6a6c2ba2fb71f6a502d9b3dd64926aa5dd3f0
MD5 766781e26d6358421a8f1c25a81fd5be
BLAKE2b-256 5ce8178f77e4b9064a48ad29248eea52c2f6c22f3e67e591a5086fb761bb2c43

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplifier_ig-0.2.0-py3-none-any.whl:

Publisher: publish.yml on ArdonToonstra/simplifier-ig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page