A coding agent that runs a local model on your Mac.
No cloud inference, no API key, no account.
localcode runs an open-weight model on your Mac and uses it to read, edit and test your code. Your prompts and your files stay on your machine. The only thing it downloads is the model weights, once per model.
Install
pip install -U localcode # or: uv pip install -U localcode
The inference server ships inside the package. Nothing is compiled or cloned on your machine.
Run
cd your-project
localcode
On first launch the model picker opens: models first, then every quant the
repository ships, with the size and whether it fits your Mac's memory. The
recommended one for your machine is starred. Pick one, watch the download, and
start typing. /models switches later.
> Implement the retry decorator in retry.py so every test in test_retry.py passes. Then run: pytest -q
localcode --classic opens the previous (0.3) interface.
Docs: mjwsolo.github.io/localcode
What it does
- Reads and edits files in your project
- Runs your tests, builds, Git and shell commands, and asks before anything risky
- Searches code by name, content or structure
- Scaffolds and launches apps, then checks that they respond
- Remembers the task across messages
Requirements
- Mac with Apple Silicon, macOS 13 or newer
- 16 GB unified memory or more
- Python 3.10 or newer
- About 12 GB of free disk for the smallest model
Models
localcode recommends a model by your Mac's memory and marks it with a star. You choose; nothing is selected for you. Every quant the model's repository ships is listed, with a fit badge for your machine. Every model runs on binaries shipped in the package.
| Model | Weights | Quant | Active params | Min RAM |
|---|---|---|---|---|
| Gemma 4 12B | 7.4 GB | UD-Q4_K_XL | 12B (dense) | 16 GB |
| Qwen 3.6 35B-A3B | 10.7 GB | UD-IQ2_M | 3.0B (MoE) | 24 GB |
| Gemma 4 26B-A4B | 11.2 GB | UD-IQ3_S | 3.8B (MoE) | 24 GB |
| DiffusionGemma 26B-A4B | 15.7 GB | Q4_K_M | 4B (diffusion MoE) | 32 GB |
| Muse Glimmer 30B | 15.9 GB | UD-Q4_K_XL | 30B (dense, vision) | 32 GB |
| Qwen 3.8 27B | 17.9 GB | UD-Q4_K_XL | 27B (dense) | 36 GB |
| North-Mini-Code 30B-A3B | 17.9 GB | UD-Q4_K_M | 3B (MoE) | 36 GB |
| Gemma 4 12B (full) | 23.8 GB | BF16 | 12B (dense) | 48 GB |
| Gemma 4 26B-A4B | 28.0 GB | UD-Q8_K_XL | 3.8B (MoE) | 64 GB |
| Qwen 3.6 35B-A3B | 38.5 GB | UD-Q8_K_XL | 3.0B (MoE) | 96 GB |
Min RAM is the memory at which localcode will recommend the model. You can pick a heavier one by hand. DiffusionGemma is a research model that is never recommended automatically.
Measured on a MacBook Pro (M5 Max, 128 GB) with Qwen 3.6 35B-A3B UD-IQ2_M at a 131072-token context: about 89 tokens/s generation, about 1174 tokens/s prompt processing, and 12 to 15 seconds for a typical four-tool-call task.
Network
Inference is local. Three features use the network: model downloads, the web_search and web_fetch tools, and any MCP servers you add. See Network Boundary for the full list.
Why local?
Powerful, personal AI should work for everyone, on any device, anywhere. That means running it locally. localcode is a first step.
Sponsors
To sponsor localcode, reach out.
Contributing
See CONTRIBUTING.md.
License
Apache 2.0. See LICENSE.
Release files for localcode 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| localcode-0.4.4.tar.gz | 48.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| localcode-0.4.4-py3-none-macosx_13_0_arm64.whl | Python 3 | none | macOS 13.0+ ARM64 | Details |
Total release size: 91.6 MB
Release files / localcode-0.4.4.tar.gz
| Download URL | localcode-0.4.4.tar.gz |
|---|---|
| Size | 48.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5aac82ce8432bcfba699bfcd41449e1207f0c6bb1b866ed80694d83f4b547313
|
|
BLAKE2b-256 checksum How to use checksums |
b270e8b845e60e4e54c12bcfe630ef7aaaaf98310725800effa3fd0ead219894
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / localcode-0.4.4-py3-none-macosx_13_0_arm64.whl
| Download URL | localcode-0.4.4-py3-none-macosx_13_0_arm64.whl |
|---|---|
| Size | 43.2 MB |
| Tags | Python 3 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4fd456f9724b6afe13f50b5be72d419fb224203777da980c2d961605786dff31
|
|
BLAKE2b-256 checksum How to use checksums |
74ce9f75d76136c9ce75968a4d3acc0fa224d1b0f46e7ac82d564f3a49d65b2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log