← all repositories
Arthur-Ficial/apfel

Your Mac already has an LLM. This tool finally exposes it.

Apfel surfaces Apple’s built-in FoundationModels as a pipe-friendly UNIX tool and OpenAI-compatible local server, no API keys required.

apfel
Velocity · 7d
+29
★ / day
Trend
accelerating
star history

What it does Apfel is a Swift CLI that surfaces the LLM already baked into Apple Intelligence-enabled Macs. It acts as a pipe-friendly UNIX utility, an interactive chat REPL, and a local OpenAI-compatible server, all running on-device without API keys or cloud dependencies. You can feed it files, pipe in diffs, or point existing OpenAI SDK clients at its local endpoint.

The interesting bit Instead of downloading yet another model, apfel treats Apple’s FoundationModels as system infrastructure. It sticks to UNIX philosophy—flags and environment variables only, no config files—while an optional companion wrapper adds TOML configuration for teams that need it. The OpenAI compatibility is pragmatic: it supports streaming, tool calling, and JSON schema enforcement, but explicitly rejects unsupported features like embeddings and legacy completions rather than faking them.

Key highlights

  • 100% on-device inference via Apple FoundationModels; no network calls, no accounts
  • Dual interface: pipe-friendly CLI and drop-in OpenAI-compatible HTTP server
  • Model Context Protocol (MCP) support for local and remote tool servers, with a security guardrail that refuses bearer tokens over plaintext HTTP
  • 4096-token context window with transparent truncation when the ceiling is hit
  • Demo scripts included for natural-language shell commands, git summaries, and a “Mac narrator”

Caveats

  • Requires macOS 26 Tahoe+, Apple Silicon, and Apple Intelligence explicitly enabled
  • 4096 tokens covers both input and output, which is modest compared to current server-side models
  • Several OpenAI API features are unsupported: embeddings, legacy completions, image inputs, logprobs, and frequency/presence penalties

Verdict Developers on modern Macs who want a zero-config, zero-cost local LLM for scripting, automation, or as an OpenAI stand-in will find this genuinely useful. Anyone on older hardware, non-Apple platforms, or needing large contexts and multimodal support should look elsewhere.

Frequently asked

What is Arthur-Ficial/apfel?
Apfel surfaces Apple’s built-in FoundationModels as a pipe-friendly UNIX tool and OpenAI-compatible local server, no API keys required.
Is apfel open source?
Yes — Arthur-Ficial/apfel is open source, released under the MIT license.
What language is apfel written in?
Arthur-Ficial/apfel is primarily written in Swift.
How popular is apfel?
Arthur-Ficial/apfel has 6.2k stars on GitHub and is currently accelerating.
Where can I find apfel?
Arthur-Ficial/apfel is on GitHub at https://github.com/Arthur-Ficial/apfel.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.