Skip to main content
The sifr command is your single entry point for compiling, running, type-checking, formatting, linting, testing, and serving editor tooling for Sifr programs. Every workflow — from a one-off script to a multi-file project — runs through the same binary with a consistent set of flags and predictable exit codes.

Global flags

These flags apply across all subcommands.

Exit codes

Available commands

Single-file mode vs project mode

Sifr selects a compilation strategy from the nearest ancestor sifr.toml. This structural boundary determines how imports are resolved and what gets compiled. Single-file mode compiles one .sifr file in isolation. It is used for every explicit file outside a workspace, regardless of its filename, source contents, imports, or neighboring files. Project mode compiles an entrypoint with reachable workspace modules. It is used for every valid entrypoint inside the nearest valid ancestor sifr.toml workspace, regardless of its filename or imports.
Mode selection never parses the entrypoint or probes sibling modules. A manifest-less local import receives the normal single-file import diagnostic; add sifr.toml to compile multiple local modules together. A malformed discovered manifest is always a hard diagnostic.
sifr run, build, check, emit, and trace use the same workspace boundary for identical input paths.

Stable self-update

Official standalone installs can resolve the active stable release through the governed release index:
The stable channel, exact pins, installer, and target artifacts are all SHA-256 verified. Unknown, withdrawn, and -rc.N versions are rejected. Same-version reinstalls, channel changes, and approved downgrades require --force.

Diagnostic output formats

Pass --diagnostic-format to any compiler-facing command to change how diagnostics are rendered.
Renders source locations, code snippets, caret highlights, related spans, notes, help text, fix suggestions, and documentation URLs. Best for interactive development.

Looking up a diagnostic code

Use --explain to get a description of any diagnostic code without compiling anything:
Pass --diagnostic-format json to get machine-readable output: