#2929th of 57 in Model serving
apfel
CLI and local OpenAI-compatible server for Apple's on-device Mac language model
Documentation ↗
(opens in a new tab)Website ↗
(opens in a new tab)Repository on GitHub ↗
(opens in a new tab)
- Stars
- 6.5k
- License
- MIT
- Last commit
- Oct 2026
- Last release
- Oct 2026
- Language
- Swift
4,053 on 10 Apr 20266,545 on 30 Oct 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
apfel wraps Apple's FoundationModels on-device LLM as a pipe-friendly UNIX command and as a local server at http://localhost:11434/v1 that implements chat completions, responses, tool calling and JSON-schema output. It also offers a chat REPL, file/PDF/image attachment with on-device OCR, and MCP tool support (local and remote). Inference stays on the machine and needs no API key.
Who it is for: Mac developers scripting against Apple's built-in on-device LLM
Strengths
- Drop-in OpenAI-style /v1/chat/completions and /v1/responses endpoints with streaming and tool calling
- Schema-guaranteed JSON output via FoundationModels guided generation
- Installs with brew install apfel; no API keys, inference stays on-device
- Attaches MCP servers (local and Streamable HTTP) and PDFs/images via -f
Weaknesses
- Requires macOS 26+ on Apple Silicon with Apple Intelligence enabled
- Single fixed ~3B model; context window is only 4096 tokens (8192 on some macOS 27 Macs)
- No embeddings or legacy completions; n>1, logprobs and stop are rejected
- Apple guardrails can block benign prompts; --permissive only reduces this
What it needs
- no GPU
- Needs macOS 26 Tahoe or newer, Apple Silicon (M1+), Apple Intelligence enabled
- Models: apple-foundationmodel (Apple FoundationModels, ~3B on-device)
- port 11434
Quick answers
Is apfel open source?
Yes. Its code is on GitHub under the MIT license.
Does apfel need a GPU?
No, it runs without one.
Also in Model serving
See all 57| Rank | Project | Score |
|---|---|---|
| 1 | llama.cppC/C++ inference engine serving GGUF models over an OpenAI-compatible API | 93 out of 100 |
| 2 | OllamaLocal model runner with CLI and REST API for open-weight LLMs | 91 out of 100 |
| 3 | LocalAISelf-hosted inference server with OpenAI-compatible API and pluggable backends | 90 out of 100 |
| #4 | vLLMInference engine for Hugging Face LLMs with PagedAttention and continuous batching | 88 out of 100 |
| #5 | colibriC inference engine that streams MoE experts from disk to run huge models | 85 out of 100 |