Skip to content

kosminus/fm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fm

Interactive terminal chat for Apple's built-in Foundation Model on macOS.

This repo currently includes:

  • fm.py: a Python CLI entry point built on apple_fm_sdk
  • Sources/fm/fm.swift: the original SwiftPM implementation

Requirements

  • macOS 26 or later
  • Xcode 26 / Swift 6.3 toolchain
  • Python 3
  • A Mac that supports Apple Intelligence
  • Apple Intelligence enabled and the on-device model downloaded

Python CLI

Install the Python dependency:

python3 -m pip install apple_fm_sdk

Run locally:

python3 fm.py

You can also inspect the CLI without starting the REPL:

python3 fm.py --help
python3 fm.py --version

You will enter an interactive REPL backed by FoundationModels.

Swift Build

cd /path/to/fm
swift build

If the project was moved to a new path and SwiftPM reports module cache errors, clear local build artifacts and rebuild:

rm -rf .build
swift build

Swift Run

swift run

Install With Homebrew

Install the stable release from the Homebrew tap:

brew tap kosminus/fm
brew install fm

Then run:

fm

You can also verify the install non-interactively:

fm --help
fm --version

To install the latest development version from main instead:

brew install --HEAD fm

Notes:

  • The tap repository is https://github.com/kosminus/homebrew-fm.
  • The source repository is https://github.com/kosminus/fm.
  • Users still need macOS 26+, Xcode 26, and Apple Intelligence support on their Mac.

Commands

  • :help shows available commands
  • :reset starts a fresh chat session
  • :quit exits the app
  • :exit exits the app

Files

  • fm.py: Python CLI implementation
  • Package.swift: SwiftPM manifest
  • Sources/fm/fm.swift: REPL implementation
  • Tests/fmTests/fmTests.swift: default test target

About

Interactive terminal chat for Apple's built-in Foundation Model on macOS.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors