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 localcode recommends a model for your Mac's memory. Pick one, wait for the download, and start typing.
> Implement the retry decorator in retry.py so every test in test_retry.py passes. Then run: pytest -q
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
- 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 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file localcode-0.3.69.tar.gz.
File metadata
- Download URL: localcode-0.3.69.tar.gz
- Upload date:
- Size: 13.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d99b4483179e91bd5f08215b5af603c47c15c4d4de2444f29df0397e5b9e3599
|
|
| MD5 |
f03d12002f513a66bc9e6cd1b71041b6
|
|
| BLAKE2b-256 |
ff5fa3079dc9d160fa77359f5bce9bb098999923c104eb27e9400a873c0577a3
|
Provenance
The following attestation bundles were made for localcode-0.3.69.tar.gz:
Publisher:
publish.yml on mjwsolo/localcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
localcode-0.3.69.tar.gz -
Subject digest:
d99b4483179e91bd5f08215b5af603c47c15c4d4de2444f29df0397e5b9e3599 - Sigstore transparency entry: 2582042149
- Sigstore integration time:
-
Permalink:
mjwsolo/localcode@f8fa42455c7c888dd721c9ab4e9e6b3231e70877 -
Branch / Tag:
refs/tags/v0.3.69 - Owner: https://github.com/mjwsolo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f8fa42455c7c888dd721c9ab4e9e6b3231e70877 -
Trigger Event:
release
-
Statement type:
File details
Details for the file localcode-0.3.69-py3-none-any.whl.
File metadata
- Download URL: localcode-0.3.69-py3-none-any.whl
- Upload date:
- Size: 8.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c83afd34ec35ac0f28e9dac3720d15eb8d1567a205ad96cf5c303eb4a9c9df3c
|
|
| MD5 |
c80fa099ecb07005fe72eff2c94c5bab
|
|
| BLAKE2b-256 |
bc3abeb1e9f79b7e27ede7252409fbbb1e4d895cf7abe353188b8fbe5e24a17e
|
Provenance
The following attestation bundles were made for localcode-0.3.69-py3-none-any.whl:
Publisher:
publish.yml on mjwsolo/localcode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
localcode-0.3.69-py3-none-any.whl -
Subject digest:
c83afd34ec35ac0f28e9dac3720d15eb8d1567a205ad96cf5c303eb4a9c9df3c - Sigstore transparency entry: 2582042151
- Sigstore integration time:
-
Permalink:
mjwsolo/localcode@f8fa42455c7c888dd721c9ab4e9e6b3231e70877 -
Branch / Tag:
refs/tags/v0.3.69 - Owner: https://github.com/mjwsolo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f8fa42455c7c888dd721c9ab4e9e6b3231e70877 -
Trigger Event:
release
-
Statement type: