maclocal-api
'afm' command cli: macOS server and single prompt mode that exposes Apple's Foundation and MLX Models and other APIs running on your Mac through a single aggreg
What is maclocal-api?
'afm' command cli: macOS server and single prompt mode that exposes Apple's Foundation and MLX Models and other APIs running on your Mac through a single aggregated OpenAI-compatible API endpoint. Supports Apple Vision and single command (non-server) inference with piping as well . Now with Web Browser and local AI API aggregator
Overview of maclocal-api
What it is
maclocal-api is a macOS command-line tool and server that exposes Apple's Foundation Models and MLX models running on a Mac through a single OpenAI-compatible API endpoint. It is built on a Swift foundation called AFMKit and provides both a server mode and a single-prompt mode with piping support. The project is open source under the MIT license.
Key features
- Native Swift executable with no Python runtime required for serving.
- Local inference without a cloud account or API key.
- Supports chat, streaming, tool calling, structured output, reasoning, and logprobs.
- Includes vision OCR, speech, embeddings, and a built-in WebUI.
- Offers prefix caching, concurrent decode, speculative decoding, and metrics.
- Provides a terminal UI (TUI) with full-screen chat, multiline editing, prompt history, and session management.
- Acts as a gateway to aggregate multiple local AI servers (Ollama, LM Studio, Jan) into one model list.
Use cases
- Running private AI inference on Apple Silicon Macs without sending data to the cloud.
- Developing and testing applications that use OpenAI-compatible APIs locally.
- Using Apple's on-device Foundation Model or Hugging Face MLX models for chat, vision, and speech tasks.
- Evaluating local models with a built-in deterministic test suite that generates an HTML report.
Getting started
bashbrew install scouzi1966/afm/afm# Start a small MLX model and open the WebUIafm mlx -m Qwen3-0.6B-4bit -wAFM is now listening at http://127.0.0.1:9999/v1.
License and pricing
This project is open source under the MIT license. No pricing information is provided.
Based on the project's public README and repository metadata.