Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.72 KB

File metadata and controls

59 lines (40 loc) · 1.72 KB

FoundationLabCLI

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.

Why Both Exist

  • FoundationLabCLI is the distributable unit for swift run, tagged releases, and Homebrew.
  • The Xcode fm target is for local development inside FoundationLab.xcodeproj.
  • Shared capability logic stays in FoundationLabCore; the CLI only handles argument parsing, availability checks, and output formatting.

Local Development

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 Distribution

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.

Release Flow

  1. Tag a release in this repository, for example 0.3.0.
  2. Generate a formula from that tag:
./Scripts/generate-homebrew-formula.sh 0.3.0
  1. Commit the generated formula to a tap repo such as rudrankriyam/homebrew-tap under Formula/fm.rb.
  2. Users can then install it with:
brew install rudrankriyam/homebrew-tap/fm

Formula Build Strategy

The 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

Requirements

  • macOS 26.0+
  • Xcode 26.0+
  • Apple Intelligence enabled for non---dry-run commands