Show HN: Apfel – The free AI already on your Mac
Apfel is a new tool that liberates the powerful, on-device Large Language Model (LLM) already present in Apple Silicon Macs, which Apple had previously confined to Siri and Swift applications. It offers developers versatile access through a command-line interface, an OpenAI-compatible server, and an interactive chat, enabling entirely local and cost-free AI operations. This project resonates strongly with the Hacker News community by democratizing access to powerful local AI, offering privacy and flexibility that cloud-based solutions often lack.
The Lowdown
Apfel is an open-source project designed to unlock and expose the built-in, on-device LLM that Apple includes with macOS 26 (Tahoe) on Apple Silicon Macs. While Apple leverages this model for features like Siri and Writing Tools via its FoundationModels framework, it doesn't provide direct, easy access for developers or users outside of Swift applications. Apfel bridges this gap, making the model accessible and highly functional for various use cases.
- Zero-Cost, On-Device AI: Apfel utilizes the LLM already present on Apple Silicon hardware, meaning zero API costs, subscriptions, or network latency. All inference is 100% on-device, ensuring data privacy as nothing leaves the machine.
- Versatile Access Options: It provides three primary interfaces: a UNIX command-line tool for scripting and quick queries, an OpenAI-compatible HTTP server that acts as a drop-in replacement for existing OpenAI client libraries, and an interactive chat interface with advanced context management.
- Developer-Friendly Features: Apfel enhances Apple's raw
LanguageModelSessionAPI by adding crucial features such as proper exit codes, JSON output, file attachments, and intelligent context trimming strategies for its 4096-token window. It also converts OpenAI tool schemas to Apple's native format. - Additional CLI Utilities: The project includes several helper CLI tools like
cmd(natural language to shell commands),oneliner(pipes from plain English),explain(explains commands or code),wtd(summarizes directory contents), andgitsum(summarizes Git commits). - OpenAI API Compatibility: The integrated server supports key OpenAI API endpoints and features, including
POST /v1/chat/completions, streaming, tool calling,GET /v1/models, various response formats, and configurable parameters liketemperatureandmax_tokens.
Apfel effectively liberates the latent AI power within modern Macs, offering a powerful, private, and free alternative to cloud-based LLM services for developers and power users who prioritize local execution and control.