Skip to main content

localcode

PyPI License Python Platform

Agentic coding. Local models. On your Mac.

A localcode turn: it reads the stub and test, edits the file, then pytest reports 1 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 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.

Project plugins and configuration load only with localcode --trust-project. Use it after reviewing the project's startup code and settings.

OpenJev also supports typed decisions: use /mode to choose Chat or Decisions, or run localcode --mode decisions. The decision screen returns choices, yes/no probabilities and scores without running coding tools. See Chat and Decisions.

> Implement the retry decorator in retry.py so every test in test_retry.py passes. Then run: pytest -q

Docs: mjwsolo.github.io/localcode

To use the running model from another local app, open /server or run localcode api for its OpenAI compatible endpoint. See the Local API guide.

What it does

  • 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, 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

Model downloads run in parallel and keep verified chunks after cancellation or interruption. Select the same model again to resume. Resume requires HTTP range support and a stable server ETag; otherwise the download restarts safely.

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
OpenJev 27B (decision model) 19.0 GB Q4_K_M 27B (dense) 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.8 27B 31.5 GB UD-Q8_K_XL 27B (dense) 64 GB
Qwen 3.6 35B-A3B 38.5 GB UD-Q8_K_XL 3.0B (MoE) 96 GB
Kolibri 1 78B-A3B (experimental) 47.5 GB Q4_K_M 3.5B (MoE) 96 GB

Underdog Saluki 27B 1.0 is also available as an opt-in IQ2-mix model: 7.9 GB of weights, plus memory for context and runtime, with an optional 0.93 GB vision projector. Coding quality and minimum RAM have not been benchmarked on LocalCode.

Min RAM is the smallest Mac whose memory the weights fit in (about 55% of unified memory). You can pick a heavier one by hand. DiffusionGemma, Kolibri, OpenJev and Saluki are never recommended automatically: you choose them yourself.

Measured on a top-memory Apple Silicon laptop 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.

Installation diagnostics: localcode doctor. See compatibility tests and local hardware verification.

Contributing

See CONTRIBUTING.md.

License

Apache 2.0. See LICENSE.

Metadata

Release files for localcode 0.5.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for localcode 0.5.23
File Size Uploaded
localcode-0.5.23.tar.gz 49.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for localcode 0.5.23
File Interpreter ABI Platform
localcode-0.5.23-py3-none-macosx_13_0_arm64.whl Python 3 none macOS 13.0+ ARM64 Details

Total release size: 93.2 MB

Release files / localcode-0.5.23.tar.gz

Download URL localcode-0.5.23.tar.gz
Size 49.4 MB
Tags Source
SHA-256 checksum
How to use checksums
2763fdd80351fc2ef381a774c608d57688ec33f4e43feca8da3d414bf8d86eeb
BLAKE2b-256 checksum
How to use checksums
36b091ade1eb9f0efbf1a1ef74276d4b3b854e952ad36a6c8807b029f830f399
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 Oct 12, 2026.

Transparency log

Release files / localcode-0.5.23-py3-none-macosx_13_0_arm64.whl

Download URL localcode-0.5.23-py3-none-macosx_13_0_arm64.whl
Size 43.8 MB
Tags Python 3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
bc28488a5f812e6d59318dd2e7a7da8c909930b05727293a2ae8d15ebd18635b
BLAKE2b-256 checksum
How to use checksums
050b6c8481dfe1b1c0bc2a96154e2216b230d2bd2904c2a82ea79c470a2d2093
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 Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.24

2 release files

This release

0.5.23 This release

2 release files

0.5.22

2 release files

0.5.21

2 release files

0.5.20

2 release files

0.5.19

2 release files

0.5.18

2 release files

0.5.17

2 release files

0.5.16

2 release files

0.5.15

2 release files

0.5.14

2 release files

0.5.13

2 release files

0.5.12

2 release files

0.5.11

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.71

2 release files

0.3.70

2 release files

0.3.69

2 release files

0.3.68

2 release files

0.3.67

2 release files

0.3.66

2 release files

0.3.65

2 release files

0.3.64

2 release files

0.3.63

2 release files

0.3.62

2 release files

0.3.61

2 release files

0.3.60

2 release files

0.3.59

2 release files

0.3.58

2 release files

0.3.57

2 release files

0.3.56

2 release files

0.3.55

2 release files

0.3.54

2 release files

0.3.53

2 release files

0.3.52

2 release files

0.3.51

2 release files

0.3.50

2 release files

0.3.49

2 release files

0.3.48

2 release files

0.3.47

2 release files

0.3.46

2 release files

0.3.45

2 release files

0.3.44

2 release files

0.3.43

2 release files

0.3.42

2 release files

0.3.41

2 release files

0.3.40

2 release files

0.3.36

2 release files

0.3.35

2 release files

0.3.34

2 release files

0.3.33

2 release files

0.3.32

2 release files

0.3.31

2 release files

0.3.29

2 release files

0.3.28

2 release files

0.3.27

2 release files

0.3.26

2 release files

0.3.25

2 release files

0.3.24

2 release files

0.3.23

2 release files

0.3.22

2 release files

0.3.21

2 release files

0.3.20

2 release files

0.3.19

2 release files

0.3.18

2 release files

0.3.17

2 release files

0.3.16

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.16

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.12

9 release files

0.2.11

9 release files

0.2.10

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page