#2929th of 57 in Model serving

apfel

CLI and local OpenAI-compatible server for Apple's on-device Mac language model

Stars
6.5k
License
MIT
Last commit
Oct 2026
Last release
Oct 2026
Language
Swift
Stars, last 29 weeks+2,492
10 Apr 2026: 4,053 stars17 Apr 2026: 4,616 stars24 Apr 2026: 4,869 stars1 May 2026: 5,075 stars8 May 2026: 5,189 stars15 May 2026: 5,274 stars22 May 2026: 5,340 stars29 May 2026: 5,403 stars5 Jun 2026: 5,458 stars12 Jun 2026: 5,683 stars19 Jun 2026: 5,737 stars26 Jun 2026: 5,794 stars3 Jul 2026: 5,831 stars10 Jul 2026: 6,026 stars17 Jul 2026: 6,091 stars24 Jul 2026: 6,135 stars31 Jul 2026: 6,177 stars7 Aug 2026: 6,205 stars14 Aug 2026: 6,241 stars21 Aug 2026: 6,261 stars28 Aug 2026: 6,290 stars4 Sept 2026: 6,311 stars11 Sept 2026: 6,340 stars18 Sept 2026: 6,384 stars25 Sept 2026: 6,416 stars2 Oct 2026: 6,430 stars9 Oct 2026: 6,448 stars16 Oct 2026: 6,468 stars23 Oct 2026: 6,516 stars30 Oct 2026: 6,545 stars

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
Also in Model serving
RankProjectScore
1llama.cppC/C++ inference engine serving GGUF models over an OpenAI-compatible API133k starsMIT93 out of 100
2OllamaLocal model runner with CLI and REST API for open-weight LLMs185.5k starsMIT91 out of 100
3LocalAISelf-hosted inference server with OpenAI-compatible API and pluggable backends50.1k starsMIT90 out of 100
#4vLLMInference engine for Hugging Face LLMs with PagedAttention and continuous batching96k starsApache-2.088 out of 100
#5colibriC inference engine that streams MoE experts from disk to run huge models45.5k starsApache-2.085 out of 100