fm-cli is a lightweight Swift command-line tool powered by FoundationModels, allowing you to interact with Apple’s on-device language models directly from the terminal.
It provides a simple prompt-based interface, built-in help commands, and uses modern Swift features such as async/await.
The tool is designed for macOS on Apple Silicon and can be installed globally using Homebrew.
- Native Swift CLI using
async/await - Access to Apple Foundation Models from the terminal
- Built-in help command (
help,--help,-h) - Short and concise model responses
- Easy global installation via Homebrew
- Built with Swift Package Manager
- macOS 26 or newer
- Apple Silicon (M1 or newer)
- Swift 5.9+
- Apple Intelligence enabled
- Homebrew installed
brew install luishramorim/tap/fm-cliAfter installation, the command will be available globally:
fm-cli --helpfm-cli "Explain async/await in Swift in 3 bullets"fm-cli "What is the result of 14124124214 / 1231234?"fm-cli help
fm-cli --help
fm-cli -h• async/await simplifies asynchronous code by making it look synchronous • It improves readability and error handling • It is built into Swift’s concurrency model
git clone https://github.com/luishramorim/fm-cli.gitcd fm-cliswift run fm-cli "Write a haiku about Swift"swift build -c releasefm-cli/
├── Package.swift
├── Sources/
│ └── fm-cli/
│ ├── fm_cli.swift
│ └── HelpCommand.swift
└── README.md• Swift
• FoundationModels
• Swift Package Manager
• Homebrew
MIT License © 2026 Luis Amorim
This project was created as an exploration of building professional Swift CLIs using modern Apple frameworks and distributing them via Homebrew, showcasing how Apple Foundation Models can be integrated into developer workflows.