CLI Reference

Overview

The sfn binary is the primary interface to the Sailfin toolchain. It compiles, runs, and tests Sailfin programs.

Commands

sfn run <file>

Compile and run a Sailfin source file:

sfn run hello.sfn
sfn run examples/basics/hello-world.sfn

sfn test [path]

Run tests:

sfn test                           # Run all tests
sfn test path/to/test.sfn          # Run specific file
sfn test --filter "pattern"        # Filter by test name

sfn --version

Display the compiler version:

sfn --version
# sailfin v0.1.1-alpha

sfn compile <file>

Compile without running:

sfn compile src/main.sfn

Build System

The Makefile provides higher-level build commands:

CommandDescription
make compileBuild the compiler (self-hosting from seed)
make installInstall to ~/.local/bin
make testRun full test suite
make test-unitRun unit tests
make test-integrationRun integration tests
make test-e2eRun e2e tests
make checkBuild + validate seedcheck binary
make smokeRebuild + smoke tests
make cleanRemove dist/ artifacts
make envCreate/update Conda environment

Additional CLI commands for package management (sfn add, sfn publish, etc.) are planned for post-1.0. See Capsules & Packages.