Back to directory

apfel

A command-line tool, OpenAI-compatible server, and chat REPL that expose the language model already built into Apple Intelligence on Apple Silicon Macs.

apfel

apfel wraps Apple's on-device FoundationModels framework as a Unix-style tool that reads a prompt as an argument or from a pipe, returning plain text, file attachments, JSON output, and standard exit codes, entirely on-device with no API key or cloud call. The same model can instead be served as a local OpenAI-compatible HTTP endpoint, letting existing OpenAI SDKs and tools such as chat clients point at it as if it were Ollama, and tool calling works in every mode.

Its context window is 4096 tokens on macOS 26 and 8192 tokens on macOS 27, read at runtime. A --chat mode provides an interactive REPL for testing prompts or MCP tool servers, and the server can run in the foreground or as a background service.

It requires an Apple Silicon Mac running macOS 26 or later with Apple Intelligence enabled, and is written in Swift under the MIT license.

More in Inference

See all 770
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • Lifeboat

    iterate.ai

    A local inference server that puts an OpenAI- and Anthropic-compatible API in front of open-weight language models running on hardware you control, from a laptop to a GPU cluster.

  • Claude S40

    github.com

    An unofficial Claude chat client for 2007-era Nokia Series 40 phones, built as a Java ME app plus a small Go relay server, with web search, reading mode and saved chats.