Skip to main content

localcode

PyPI License Python Platform

A coding agent that runs a local model on your Mac.
No cloud inference, no API key, no account.

A localcode turn: two reads, one edit, then pytest reporting 5 passed

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

localcode-0.3.63.tar.gz (13.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

localcode-0.3.63-py3-none-any.whl (8.3 MB view details)

Uploaded Python 3

File details

Details for the file localcode-0.3.63.tar.gz.

File metadata

  • Download URL: localcode-0.3.63.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

Hashes for localcode-0.3.63.tar.gz
Algorithm Hash digest
SHA256 4a9a4a54d8a3d2746ae7ab5f65975c1d77f083f53c53b06296e70c11451764ee
MD5 42f61d2f73b0eeaf6c3fb5f37f8899f3
BLAKE2b-256 08d6b4e1214c71aa048424a73eb4b2d54edab77dd8bb3916fe8bfb4e66c97e49

See more details on using hashes here.

Provenance

The following attestation bundles were made for localcode-0.3.63.tar.gz:

Publisher: publish.yml on mjwsolo/localcode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file localcode-0.3.63-py3-none-any.whl.

File metadata

  • Download URL: localcode-0.3.63-py3-none-any.whl
  • Upload date:
  • Size: 8.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for localcode-0.3.63-py3-none-any.whl
Algorithm Hash digest
SHA256 f88db787dbac0ac16c3c2d2d4061c09d765ef2bb70f3daa2d78ea55cf6e72648
MD5 0a153d46adb6d21a172d4531ec13477f
BLAKE2b-256 d3aab053e1552dd1bfcf45c3fd4eaea42237fb3c0849bc2ea1bdfa4653ee9caa

See more details on using hashes here.

Provenance

The following attestation bundles were made for localcode-0.3.63-py3-none-any.whl:

Publisher: publish.yml on mjwsolo/localcode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.71

2 files

0.3.70

2 files

0.3.69

2 files

0.3.68

2 files

0.3.67

2 files

0.3.66

2 files

0.3.65

2 files

0.3.64

2 files

This release

0.3.63 This release

2 files

0.3.62

2 files

0.3.61

2 files

0.3.60

2 files

0.3.59

2 files

0.3.58

2 files

0.3.57

2 files

0.3.56

2 files

0.3.55

2 files

0.3.54

2 files

0.3.53

2 files

0.3.52

2 files

0.3.51

2 files

0.3.50

2 files

0.3.49

2 files

0.3.48

2 files

0.3.47

2 files

0.3.46

2 files

0.3.45

2 files

0.3.44

2 files

0.3.43

2 files

0.3.42

2 files

0.3.41

2 files

0.3.40

2 files

0.3.39

2 files

0.3.38

2 files

0.3.37

2 files

0.3.36

2 files

0.3.35

2 files

0.3.34

2 files

0.3.33

2 files

0.3.32

2 files

0.3.31

2 files

0.3.30

2 files

0.3.29

2 files

0.3.28

2 files

0.3.27

2 files

0.3.26

2 files

0.3.25

2 files

0.3.24

2 files

0.3.23

2 files

0.3.22

2 files

0.3.21

2 files

0.3.20

2 files

0.3.19

2 files

0.3.18

2 files

0.3.17

2 files

0.3.16

2 files

0.3.15

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

9 files

0.2.11

9 files

0.2.10

9 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page