fm is the standalone command-line interface for Foundation Lab.
It intentionally stays as its own Swift package even though the repository also includes a native Xcode fm target.
FoundationLabCLIis the distributable unit forswift run, tagged releases, and Homebrew.- The Xcode
fmtarget is for local development insideFoundationLab.xcodeproj. - Shared capability logic stays in
FoundationLabCore; the CLI only handles argument parsing, availability checks, and output formatting.
cd FoundationLabCLI
swift run fm --help
swift run fm model status
swift run fm session respond --dry-run --json --prompt "Suggest an uplifting science fiction novel"Homebrew should build the standalone FoundationLabCLI package from a tagged archive of this repository.
The package keeps a relative dependency on ../FoundationLabCore, which is fine for Homebrew because the tagged source archive contains both directories.
- Tag a release in this repository, for example
0.3.0. - Generate a formula from that tag:
./Scripts/generate-homebrew-formula.sh 0.3.0- Commit the generated formula to a tap repo such as
rudrankriyam/homebrew-tapunderFormula/fm.rb. - Users can then install it with:
brew install rudrankriyam/homebrew-tap/fmThe generated formula builds the CLI from the tagged source archive like this:
cd "FoundationLabCLI" do
system "swift", "build", "--configuration", "release", "--disable-sandbox"
bin.install ".build/release/fm"
end- macOS 26.0+
- Xcode 26.0+
- Apple Intelligence enabled for non-
--dry-runcommands