Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

InkGen can be configured through configuration files and command-line options.

Configuration File

Create an inkgen.config.json file in your project root:

{
  "input": "./profiles",
  "output": "./generated",
  "backends": ["typescript"],
  "fhirVersion": "r4",
  "strict": true
}

Configuration Options

OptionTypeDescription
inputstringDirectory containing FHIR Shorthand files
outputstringDirectory for generated code
backendsarrayList of code backends to use
fhirVersionstringFHIR version (r4, r5, etc.)
strictbooleanEnable strict validation

Command-Line Options

npx inkgen generate [options]

Options:
  --input, -i      Input directory (default: ./profiles)
  --output, -o     Output directory (default: ./generated)
  --backend, -b    Code backend to use (default: typescript)
  --config, -c     Path to config file
  --help, -h       Show help
  --version, -v    Show version

Environment Variables

Set these environment variables to configure InkGen:

  • INKGEN_INPUT - Input directory
  • INKGEN_OUTPUT - Output directory
  • INKGEN_BACKEND - Default backend
  • FHIR_VERSION - FHIR version

Next Steps

Check out the Architecture guide to understand how InkGen processes your profiles.