Localcode, an open-source coding agent for local models on Apple Silicon Macs

Localcode, an open-source coding agent for local models on Apple Silicon Macs

Localcode is an open-source agentic coding tool that runs language models locally on a Mac. The project lives on GitHub as mjwsolo/localcode, is licensed under Apache 2.0, and installs with uv pip install localcode. After that, you change into your project folder and run localcode. Upgrades use uv pip install -U localcode.

What the agent does, per the README: it reads and edits files in your project; runs your tests, builds, Git and shell commands inside the project on its own, and asks before touching anything outside it; searches code by name, content or structure; scaffolds and launches apps and then checks that they respond; and remembers the task across messages. The running model can also be used from another local app through an OpenAI-compatible endpoint, by opening /server or running localcode api.

Requirements are a Mac with Apple Silicon on macOS 13 or newer, 16 GB of unified memory or more, Python 3.10 or newer, and disk space for Localcode and the chosen model. The picker offers 12 models and 169 quant options for coding, image input and typed decisions. Models download from Hugging Face; downloads run in parallel, resume if interrupted, and keep going while you use another model. You switch models with /models, and Localcode recommends the most capable one that fits your Mac's memory, marked with a star.

The README describes what Localcode adds on top of the stock model server, in three groups.

Speed. Gemma 4, Qwen 3.6, Qwen 3.8 and Muse Glimmer draft tokens with the vendor's own speculative drafter, which downloads with the model; the README puts the gain at about 2x faster replies. Copy drafting, where the model copies instead of generating when it rewrites a file it already read, is listed at 3.5 to 4x faster on rewrites. Other items: the system prompt stays identical each turn so the prompt cache is reused and the model reads only what is new; the first request's prompt is read while the model loads; GPU kernels ship precompiled, which avoids a half-minute shader compile on first start; threads are matched to the Mac's performance cores; and flash attention is on by default. For Inkling 2, the experts now run on the GPU (they had been silently on the CPU, about 5x slower), and banded attention plus a fused activation op halve its GPU memory and read prompts 20 to 30% faster.

Memory. The KV cache is 8-bit by default, half the memory of full precision, so longer context fits. Inkling 2 uses a 16-bit cache instead, because its attention reads it directly: long prompts read 1.4 to 1.8x faster and it needs 3.3 GB less memory at 128K context. Context is sized from what the server reports, so long chats compact before they run out of room.

Quality. Hidden thinking is off by default so answers come straight away, and a model that gets stuck thinking is recovered instead of failing. A plan panel keeps a task list that the model is reminded to update. Stuck detection nudges a model that makes no progress, or keeps failing the same check, to change approach, then stops it so it reports what it has. The README also says every release is tested live on every model (load, reply, tool calls, images) before it ships.

On privacy, the README says inference is local and only three features use the network: model downloads, the web_search and web_fetch tools, and any MCP servers you add. It states the mission as powerful, personal AI working for everyone, on any device, anywhere, which it says means running it locally, and calls Localcode a first step. It invites sponsorship inquiries and points to CONTRIBUTING.md.

Key facts

  • Localcode is an Apache 2.0 agentic coding tool for Apple Silicon Macs (macOS 13 or newer, 16 GB unified memory or more, Python 3.10 or newer), installed with uv pip install localcode.
  • It offers 12 models and 169 quant options, downloaded from Hugging Face, and recommends the most capable one that fits the Mac's memory.
  • The README claims about 2x faster replies from the vendor's speculative drafter on Gemma 4, Qwen 3.6, Qwen 3.8 and Muse Glimmer, and 3.5 to 4x faster file rewrites with copy drafting.
  • The KV cache is 8-bit by default, half the memory of full precision; Inkling 2 uses 16-bit, reading long prompts 1.4 to 1.8x faster and needing 3.3 GB less memory at 128K context.
  • Inference is local; only model downloads, the web_search and web_fetch tools, and user-added MCP servers use the network.

Why it matters

Localcode packages a coding agent and a local model server into one install for Macs, so the agent loop (editing files, running tests, Git and shell commands) can run without sending inference to a cloud service. The README's pitch is that the work goes into making local models faster and better at coding: speculative drafting, copy drafting for rewrites, prompt cache reuse, precompiled GPU kernels, and an 8-bit KV cache that lets longer context fit in memory. It frames this as a first step toward powerful, personal AI that runs locally on any device.

Who it affects

Developers with an Apple Silicon Mac, macOS 13 or newer and at least 16 GB of unified memory who want an agentic coding tool that runs models on their own machine. It also suits people who want to point other local apps at the running model through the OpenAI-compatible endpoint. Macs below the memory or OS requirements are outside what the README supports.

How to use it

Run uv pip install localcode, change into your project directory and run localcode. Upgrade with uv pip install -U localcode. Switch models with /models; the picker stars the most capable model that fits your Mac's memory. To use the running model from another local app, open /server or run localcode api for the OpenAI-compatible endpoint. The project is licensed under Apache 2.0, contributions are described in CONTRIBUTING.md, and the README invites sponsors to reach out. The README gives no price.

How solid is it

The only material is the project's own README, so every speed and memory figure is the project's claim. No benchmark methodology, hardware or baseline is given for any of them. The README says every release is tested live on every model (load, reply, tool calls, images) before it ships. The text does not say how Localcode compares with other coding agents or with cloud models in quality.

Risks and caveats

The speed figures (about 2x for drafting, 3.5 to 4x for rewrites, 20 to 30% for Inkling 2 prompt reading) are unverified and measured under conditions the README does not describe. Local inference is not the same as fully offline: model downloads, web_search and web_fetch, and any MCP servers you add use the network. The agent runs tests, builds, Git and shell commands inside the project on its own and asks only before touching anything outside it. The vendors or origin of Inkling 2 and Muse Glimmer are not stated, and the full list of the 12 models is not given in the text.

“Powerful, personal AI should work for everyone, on any device, anywhere. That means running it locally. localcode is a first step.”

— localcode README