A friendly CLI for Apple's on-device Foundation Model — fm chat/respond/schema on macOS 26, today.
Project description
fmx
A friendly CLI for Apple's on-device Foundation Model — chat, respond, and schema
from your terminal, on macOS 26 today.
macOS 27 will ship a native fm command. fmx brings that same workflow to macOS 26 right
now, built on Apple's apple-fm-sdk. It uses
a distinct name (fmx) so it never collides with the future system fm.
$ fmx chat
fmx chat — Apple on-device Foundation Model
Type a message, or /help for commands. /exit to quit.
you ❯ explain async/await in one sentence
fmx ❯ async/await lets you write non-blocking code that reads top-to-bottom, pausing at
await points so other work can run while you wait on I/O.
you ❯ /save mychat.json
Saved 4 entries to mychat.json.
Requirements
Everything runs on-device through Apple Intelligence — there's no cloud, no API key, and it only works on a compatible Mac:
- macOS 26 or later
- Apple silicon, M1 or later, with Apple Intelligence turned on (compatible devices)
- Python 3.10+
If the model isn't available, fmx tells you exactly why (Apple Intelligence off, device
ineligible, or model still downloading).
Install
uv tool install fmx
# or
pipx install fmx
Usage
fmx chat — interactive
fmx chat
fmx chat -i "You are a terse shell expert." # set system instructions
Slash commands inside a chat:
| Command | Description |
|---|---|
/help |
List commands |
/save <path> |
Save the conversation to JSON |
/load <path> |
Resume a saved conversation |
/clear |
Start fresh (keeps your instructions) |
/system <text> |
Replace instructions and start fresh |
/model |
Show model info |
/exit |
Quit (or Ctrl-D) |
fmx respond — one-shot, scriptable
fmx respond "Summarize this in 5 words: <text>"
echo "say hi" | fmx respond - # prompt from stdin
fmx respond "Write a haiku about Swift" --stream # stream tokens
fmx respond "Describe this" --image photo.jpg # multimodal (repeatable)
fmx respond "Be terse." -t 0.2 --max-tokens 100 # temperature / token cap
fmx schema — structured output
Build a JSON Schema, then constrain a response to it. Output is parseable JSON:
fmx schema object name:str age:int "bio:str:a short biography" tags:str[]
# pipe a schema straight into respond:
fmx schema object name:str age:int | fmx respond "Invent a person" --schema -
Field spec is name:type[:description]. Types: str, int, float, bool (append []
for an array, e.g. tags:str[]).
What about Private Cloud Compute / /model?
Not yet. apple-fm-sdk currently exposes only the on-device model — there's no Python
API for Private Cloud Compute. When Apple ships PCC access (via the SDK, or the native fm
in macOS 27), model switching will land behind /model; the code already isolates session
creation in fmx/core.py for exactly this.
Roadmap
-
/model→ Private Cloud Compute, once the SDK exposes it - Auto-defer to the native
fmbinary when running on macOS 27 - Homebrew formula
- Tool/function calling in
chat
Development
git clone https://github.com/manjunathshiva/fmx
cd fmx
uv sync
uv run fmx chat
uv run pytest # model tests auto-skip if Apple Intelligence is unavailable
uv run ruff check .
License
MIT. Built on Apple's apple-fm-sdk (Apache-2.0). Not affiliated with Apple.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fmx-0.1.0.tar.gz.
File metadata
- Download URL: fmx-0.1.0.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fdc81e8454d023be89e13b549690b4c9e8190e59f0fc901b5b42c3180f60087
|
|
| MD5 |
78604a6cd4c8b1d96d03f8a970e96452
|
|
| BLAKE2b-256 |
3e5589ea35033eae7da516cb594a65efd3f809ac235cc4327136e20ff97e4298
|
Provenance
The following attestation bundles were made for fmx-0.1.0.tar.gz:
Publisher:
publish.yml on manjunathshiva/fmx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fmx-0.1.0.tar.gz -
Subject digest:
1fdc81e8454d023be89e13b549690b4c9e8190e59f0fc901b5b42c3180f60087 - Sigstore transparency entry: 1872339539
- Sigstore integration time:
-
Permalink:
manjunathshiva/fmx@1b18d38736f9cf1549c1345a8fddf9ae546cf34c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/manjunathshiva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1b18d38736f9cf1549c1345a8fddf9ae546cf34c -
Trigger Event:
push
-
Statement type:
File details
Details for the file fmx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fmx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be639c505d62f9829b8cc66cac6c3d5b091991464f61bf0cfc25623c69924587
|
|
| MD5 |
78a0f66196e821f04ee4edefb2f4935e
|
|
| BLAKE2b-256 |
9a444a1d94954524171ef64ec3d2ab2e4b7c2f4c5623f1ff4b0a8dd1d6e0bcd2
|
Provenance
The following attestation bundles were made for fmx-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on manjunathshiva/fmx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fmx-0.1.0-py3-none-any.whl -
Subject digest:
be639c505d62f9829b8cc66cac6c3d5b091991464f61bf0cfc25623c69924587 - Sigstore transparency entry: 1872339622
- Sigstore integration time:
-
Permalink:
manjunathshiva/fmx@1b18d38736f9cf1549c1345a8fddf9ae546cf34c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/manjunathshiva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1b18d38736f9cf1549c1345a8fddf9ae546cf34c -
Trigger Event:
push
-
Statement type: