### Install SUSHI CLI Source: https://github.com/fhir/sushi/blob/master/README.md Install or update SUSHI globally using npm. Requires Node.js to be installed. ```sh $ npm install -g fsh-sushi ``` -------------------------------- ### Install SUSHI Dependencies Source: https://github.com/fhir/sushi/blob/master/README.md Run this command in the project's root folder after installing Node.js to install project dependencies. ```sh $ npm install ``` -------------------------------- ### Typical Exporter Test Setup Source: https://github.com/fhir/sushi/blob/master/AGENTS.md Sets up the testing environment by loading FHIR definitions and initializing necessary components for exporter tests. Ensure loggerSpy is reset in beforeEach. ```typescript beforeAll(async () => { defs = await getTestFHIRDefinitions(true, testDefsPath('r4-definitions')); }); beforeEach(() => { loggerSpy.reset(); doc = new FSHDocument('fileName'); const input = new FSHTank([doc], minimalConfig); pkg = new Package(input.config); const fisher = new TestFisher(input, defs, pkg); exporter = new StructureDefinitionExporter(input, pkg, fisher); }); ``` -------------------------------- ### Run SUSHI Regression Test via NPM Source: https://github.com/fhir/sushi/blob/master/README.md Execute the regression script using npm, passing arguments after '--'. This example uses lookback days and repository count. ```sh $ npm run regression -- -l 30 -c 50 ``` -------------------------------- ### SUSHI Build Command Help Source: https://github.com/fhir/sushi/blob/master/README.md Provides detailed options for the `sushi build` command, used to compile a SUSHI project. ```text Usage: sushi build [options] [path-to-fsh-project] build a SUSHI project Arguments: path-to-fsh-project path to your FSH project (default: ".") Options: -l, --log-level specify the level of log messages (default: "info") (choices: "error", "warn", "info", "debug") -o, --out the path to the output folder (default: "fsh-generated") -p, --preprocessed output FSH produced by preprocessing steps -r, --require-latest exit with error if this is not the latest version of SUSHI (default: false) -s, --snapshot generate snapshot in Structure Definition output (default: false) -c, --config override elements in sushi-config.yaml (supported: 'version', 'status', 'releaselabel') (eg: --config status:draft) -h, --help display help for command ``` -------------------------------- ### VS Code TypeScript Formatting Configuration Source: https://github.com/fhir/sushi/blob/master/README.md Configure VS Code to automatically format TypeScript files on save. Ensure ESLint and Prettier extensions are installed. ```json { "[typescript]": { "editor.formatOnSave": true } } ``` -------------------------------- ### SUSHI CLI Help Source: https://github.com/fhir/sushi/blob/master/README.md Displays the available commands and options for the SUSHI command-line interface. ```text Usage: sushi [options] [command] Options: -v, --version print SUSHI version -h, --help display help for command Commands: build [options] [path-to-fsh-project] build a SUSHI project init [options] [name] initialize a SUSHI project update-dependencies [options] [path-to-fsh-project] update FHIR packages in project configuration help [command] display help for command ```