LocalCode brings agentic coding to Mac with local models
A new open-source project called LocalCode allows developers to run agentic coding models locally on Apple Silicon for improved privacy and speed.
Source: Hacker News — front pageA new open-source tool called LocalCode is enabling developers to run agentic coding workflows directly on macOS using local models. This shift toward local execution offers a way to perform complex programming tasks without relying on cloud-based APIs, prioritizing privacy and low-latency responses.
What is LocalCode and how does it work?
According to the project documentation on GitHub, LocalCode is an agentic coding tool designed specifically for Mac users with Apple Silicon. It functions as an autonomous agent that can read and edit files within a project, search code by structure or content, and scaffold new applications.
Unlike standard chat interfaces, LocalCode can execute shell commands, run builds, and perform Git operations within a project directory. The tool is designed to ask for permission before interacting with anything outside the designated project scope. It can also remember specific tasks across multiple messages, allowing for a continuous development workflow. To install the tool, users can use the uv pip install localcode command.
What hardware is required to run it?
Because the tool runs large language models locally, it has specific hardware requirements. According to the developer, users need a Mac equipped with Apple Silicon running macOS 13 or newer. A minimum of 16 GB of unified memory is required to handle the model weights and the context window effectively.
In addition to memory, users must account for disk space, which varies depending on the specific model chosen. The tool provides 169 different quantization options across 12 primary models downloaded from Hugging Face. For example, the smallest download is approximately 4.7 GB for a Gemma 4 12B model, while larger models like DeepSeek V4 Flash 284B can require up to 161.9 GB of space.
How does it improve coding speed?
LocalCode implements several optimizations to make local inference feel more responsive. The developer highlights several key features designed to reduce the time spent waiting for model outputs:
- Drafting and Copy Drafting: The tool uses vendor-specific speculative drafters to predict tokens, which can result in replies being roughly 2x faster on models like Gemma 4 or Qwen 3.6. Additionally, when a model needs to rewrite a file it has already processed, it uses a "copy drafting" method that is 3.5 to 4x faster than standard generation.
- Prompt Cache Reuse: To avoid redundant processing, the system prompt remains cached, meaning the model only needs to process new information in each turn.
- Hardware Optimization: The tool uses precompiled GPU kernels to avoid long shader compilation times during the first start. It also matches execution threads to the specific performance cores of the user's Mac and enables Flash Attention by default.
- Memory Efficiency: By using an 8-bit KV cache by default, the tool halves the memory required for the cache, allowing for longer context windows.
What models are supported?
LocalCode supports a wide variety of models, including those optimized for different tasks such as coding, image input, and decision-making. According to the repository, the available models include several versions of Gemma 4 (12B and 26B), Qwen (3.6, 3.8, and 27B), and specialized models like Inkling 2 Mini and Muse Glimmer.
For extremely large-scale tasks, the tool supports DeepSeek V4 Flash 284B. The system includes a model picker that recommends the most capable model that can fit within the user's available Mac memory, marked with a star for easy identification. Users can switch between these models during a session using the /models command.
How does it handle coding errors?
To prevent the agent from getting stuck in infinite loops, LocalCode includes a "stuck detection" mechanism. If a model fails to make progress or repeatedly fails the same check, the system nudges the model to change its approach. If it continues to fail, the tool stops the process and reports the current status.
Furthermore, the tool features a "Plan panel" where the model maintains and updates a task list. This ensures the agent remains aware of its objectives throughout a complex, multi-step coding project. To ensure reliability, the developer states that every release is tested live on every supported model for load, replies, tool calls, and image capabilities before being shipped.
How can this be applied in a professional workflow?
While LocalCode provides a powerful way to run agents on a local machine, many developers still require the flexibility of cloud-hosted models for massive scale or multi-model comparisons.
For those looking for a managed environment that integrates these types of agentic capabilities with a full suite of development tools, Grafy Code provides an AI coding studio that can install packages and run code directly. While LocalCode focuses on the local Mac experience, Grafy provides a cloud-based alternative for users who want to move quickly without managing local model weights and hardware constraints.
Frequently asked questions
What operating system is required for LocalCode?
LocalCode requires a Mac with Apple Silicon running macOS 13 or a newer version. It is specifically optimized for the architecture of Apple's custom chips to leverage the unified memory and GPU performance for local model inference.
Does LocalCode require an internet connection?
Inference is performed entirely locally on your machine. However, the tool does require an internet connection for three specific tasks: downloading models from Hugging Face, using the web_search and web_fetch tools, and connecting to any added MCP servers.
Can LocalCode edit my existing project files?
Yes, LocalCode is designed to read and edit files within your project directory. It can also run tests, execute builds, and handle Git or shell commands, though it is programmed to ask for permission before performing any actions outside the project folder.
Source: https://github.com/mjwsolo/localcode
Source: Hacker News — front page — Localcode, open source agentic coding on your Mac with one command


