apfel
A free, open-source CLI tool that unlocks Apple's on-device LLM on macOS 26+ as a terminal command, OpenAI-compatible HTTP server, and interactive chat.
At a Glance
Completely free to use. No API keys, no subscriptions, no per-token billing. MIT licensed open-source software.
Engagement
Available On
Alternatives
Listed Apr 2026
About apfel
apfel is a free, open-source Swift CLI tool that exposes Apple's built-in on-device language model (shipped with macOS 26 Tahoe via the FoundationModels framework) as a UNIX command-line tool, an OpenAI-compatible HTTP server, and an interactive multi-turn chat. It runs 100% on-device using Apple Silicon's Neural Engine and GPU — no API keys, no subscriptions, no data leaving your machine. Built with Swift 6.3 and licensed under MIT, apfel bridges Apple's raw LanguageModelSession API with practical developer tooling.
- CLI / UNIX Tool — Pipe-friendly with stdin/stdout, JSON output (
-o json), file attachments, and proper exit codes; composable withjq,xargs, and shell scripts. - OpenAI-Compatible Server — Starts a local HTTP server at
localhost:11434; supportsPOST /v1/chat/completions, streaming (SSE), tool/function calling,response_format: json_object, CORS, and standard parameters liketemperatureandmax_tokens. - Interactive Chat — Multi-turn conversations with automatic context management and five trimming strategies to handle the 4,096-token context window.
- Zero Cost — No per-token billing, no API keys required; the model is already installed on your Mac as part of Apple Intelligence.
- 100% On-Device Privacy — All inference runs locally on the Neural Engine and GPU; nothing is sent to external servers.
- Power Shell Scripts — Bundled demo scripts include
cmd(natural language to shell command),oneliner(pipe chains from English),explain,wtd,gitsum, andmac-narrator. - Drop-in OpenAI Replacement — Any OpenAI SDK or framework can point to
http://localhost:11434/v1and work without code changes. - Install via Homebrew — Run
brew install Arthur-Ficial/tap/apfelthenapfel "Hello, Mac!"to get started in seconds; or build from source withgit cloneandmake install.
Community Discussions
Be the first to start a conversation about apfel
Share your experience with apfel, ask questions, or help others learn from your insights.
Pricing
Free / Open Source
Completely free to use. No API keys, no subscriptions, no per-token billing. MIT licensed open-source software.
- CLI UNIX tool
- OpenAI-compatible HTTP server
- Interactive chat
- 100% on-device inference
- Zero token cost
Capabilities
Key Features
- CLI UNIX tool with stdin/stdout and JSON output
- OpenAI-compatible HTTP server at localhost:11434
- Interactive multi-turn chat with context management
- Five context trimming strategies for 4,096-token window
- Streaming (SSE) support
- Tool/function calling
- File attachments
- CORS support for browser clients
- 100% on-device inference via Apple Neural Engine
- Zero cost — no API keys or subscriptions
- Bundled demo shell scripts (cmd, oneliner, explain, wtd, gitsum, mac-narrator)
- MIT open-source license
- Homebrew installation
