Arthur-Ficial/apfel

The free AI already on your Mac. CLI tool, OpenAI-compatible server, and interactive chat — all on-device via Apple Intelligence. No API keys, no cloud, no downloads.

What it solves

apfel provides a way to access the built-in Apple FoundationModels LLM on Apple Silicon Macs as a command-line tool and a local server. It eliminates the need for cloud APIs, API keys, and internet connectivity by keeping all inference 100% on-device.

How it works

The project exposes the SystemLanguageModel via two primary interfaces:

  1. UNIX Tool: A CLI that supports piping input, attaching files (including PDFs and images via on-device OCR/extraction), and generating structured JSON output.
  2. OpenAI-compatible Server: A local HTTP server (http://localhost:11434/v1) that allows existing OpenAI SDKs and tools to use the on-device model as a backend.

It also supports the Model Context Protocol (MCP) for attaching external tools, allowing the model to perform actions like calculations via local or remote MCP servers.

Who it’s for

Developers and power users on macOS 26 Tahoe+ with Apple Silicon (M1+) who want private, local AI integration into their shell scripts, workflows, or existing AI applications.

Highlights

  • 100% On-Device: No cloud, no API keys, and no network required for inference.
  • OpenAI Compatibility: Drop-in replacement for OpenAI's chat completions API.
  • MCP Tool Support: Integration with Model Context Protocol servers for extended capabilities.
  • File Awareness: Native support for attaching PDFs and images with on-device text extraction.
  • Guided Generation: Support for guaranteed schema-valid JSON output via json_schema.
  • Shell-Friendly: Includes a variety of built-in demos (like cmd for English-to-shell commands) and pipe-safe output modes.

Related

  • Project
  • Project
  • Project
  • Project
  • Project