Skip to main content

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

Both install the fmx command into your user bin directory (~/.local/bin). If your shell then reports zsh: command not found: fmx, that directory isn't on your PATH yet — fix it once and open a new terminal:

uv tool update-shell     # if you installed with uv
# or
pipx ensurepath          # if you installed with pipx

Verify with fmx --version.

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 fm binary 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 .

Contributing

Contributions are welcome! See CONTRIBUTING.md for the dev setup, the SDK-free-vs-on-device test split, and the review rules — every PR needs passing lint-and-test + CodeQL checks and one approving review. A pull-request template is filled in for you.

Found a security issue? Please don't open a public issue — follow the security policy instead.

License

MIT. Built on Apple's apple-fm-sdk (Apache-2.0). Not affiliated with Apple.

Metadata

Release files for fmx 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fmx 0.1.1
File Size Uploaded
fmx-0.1.1.tar.gz 27.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fmx 0.1.1
File Interpreter ABI Platform
fmx-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 39.9 kB

Release files / fmx-0.1.1.tar.gz

Download URL fmx-0.1.1.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c29422bad7295c5fc542a859c594f8fc9c293a00aae0e905d37e1ae98cba5cfe
BLAKE2b-256 checksum
How to use checksums
04c0584da6338b769b02b8c29f06942491850f608a7747a591fda09fc124969b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 4, 2026.

Transparency log

Release files / fmx-0.1.1-py3-none-any.whl

Download URL fmx-0.1.1-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41865aa216320df9c6f3230570081a71b18f8b71378e3cd3361081502ec9e8a3
BLAKE2b-256 checksum
How to use checksums
bc85f3bcd21057b07a356e18955220fe8fe50272d212ab8def2b8edf2428bfd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page