Localcode, open source agentic coding on your Mac with one command

Read the linked article.


Discuss on Hacker News

Oh, this has the same name as an app I run on my 64G Mac to run deepseek 4.1 flash 10/17: https://getlocalcode.app

What optimizations does this have over opencode with omlx serving my models?

Could you help me understand why I’d use this rather than something like llama.cpp + pi?

“There are only two hard things in Computer Science: cache invalidation and naming things.”

First time I’ve seen their app, but looks like theirs is a native app with its own engine, impressive that it runs DeepSeek 4.1 Flash on a 64 GB Mac. Ours is an open source CLI built on llama.cpp and opencode that we started back in April.

Curious how fast DeepSeek runs for you on 64 GB?

I tested supporting but the performance wasn’t great at the time - can look into this again if folks want it supported though!

“There are only two hard things in Computer Science: cache invalidation, naming things, and off by one errors.”

In this case the OP was first, I think. Not that it’s unreasonable to end up with “Local Code” as an app name.

That project is interesting; similar territory to Osaurus, though it doesn’t orchestrate whole linux containers. They’ve evidently gone for App Sandbox instead (and a rather Claude-Code-like giant-bundle-of-apps)

Could you clarify the security situation here?

It seems from the documentation that you’re using something homegrown to stop tools accessing files outside the project directory, but maybe not doing anything to stop shell commands doing so?

Is there seatbelt support here or are you expecting users to sandbox localcode itself using seatbelt commands?

Ha, walked right into that one :slight_smile:

Thanks! Yeah, we started back in April although put off releasing more widely until I was happy with the usability and performance. Not surprised other folks are landing on similar/same names..

Today we’re launching Localcode, an agentic coding CLI for Macs that runs open models entirely on your machine. No cloud, no subscription, no API keys.

uv pip install localcode

or

pip install localcode

Demo: https://mjwsolo.github.io/localcode/

Why we built it

We think most everyday coding will soon run on open models, on the hardware people and organisations already own.

Our belief stems from a pattern we call Frontier N-1: what the best model can do this year, consumer hardware and open models can do about a year later. The best open model that runs on a single consumer GPU today is as good as the best model in the world was 6 to 12 months ago [1]. So far this pattern keeps holding: this month Inkling 2 Mini was released as open weights, and it runs on a 32 GB Mac.

We’re just at the beginning - Localcode is our first step towards the future.

What Localcode does

Setting up a local model means picking a model, a size, a server and an agent, then finding out it doesn’t fit in memory. Localcode does all of that for you automatically.

  • Localcode offers 12 open models, including Qwen, Gemma and Inkling, and stars the best fit for your Mac (16 GB and up) * The agent edits files, runs your tests and commands, and searches the web when you ask * Paste a screenshot and the vision models (Gemma, Qwen and Inkling) can read it * Once a model is downloaded, it works offline * Other apps can use the same model through an OpenAI-compatible API

Localcode focuses on optimisations to get the best quality and speed from each model:

  • The model makers’ own draft models roughly double reply speed * File rewrites run 3.5 to 4 times faster, because the agent copies text it has already read * The system prompt stays identical every turn, so the model reuses its cache and only reads what’s new * Your first message starts sooner, because the model reads the system prompt while it loads * GPU code ships precompiled, so there’s no half-minute wait on first start * An 8-bit KV cache by default halves its memory, so longer context fits on the same Mac * Context is sized from what the model server reports, so long chats compact before they run out of room We test every release on every model before it ships.

Localcode is open source (Apache 2.0) and built on opencode and llama.cpp. We’re grateful to both.

We’d love to hear what you think.

[1] https://epoch.ai/data-insights/consumer-gpu-model-gap

I tried it on a Macbook Pro M5 Max with 36GB of RAM, it auto-chose Qwen 3.6-35B-A3B-UD-Q4_K_XL, and seemed to work very easily. Some feedback:

  • Model recommendation could leave memory headroom, or ask the user if they would prefer to have some headroom

  • Built in benchmark, something like ‘localcode bench’ that sends a report of time to first token, generation speed, peak memory use, etc.. perhaps even a compare if you have more than one model downloaded

  • a simple guide to connect to an IDE like VS Code, or an official extension

  • I use Claude Code, it would be great if there was a set up wizard to bring skills and mcp servers over

  • If I paste an image and the model ca’n’t see it yet, localcode should offer a prompt to download image support, instead of answering as if there was no image

this is super helpful feedback, thank you so much!

  1. Headroom - good point, I think it should bias users toward a smaller model, and honestly there’s often not much difference between one quant up or down in terms of performance but the size differences can be considerable

  2. Benchmark - I like this idea - we’ll add this

  3. IDE - how would you want this to work, and what are you solving for? wouldn’t using localcode within the VS Code terminal be sufficient?

  4. Skills/MCP - Localcode does support this but the usability is quite poor atm - requires user to do config outside of UI. I’ll change this

  5. Image - did you try /vision command? this enables user to download the relevant vision support doensn’t support it out of the box. I think the error message needs to make this more explicit will add this

This is a useful tool; a tool easily isolated with simple UNIX permissions, without having to use containers.

Thank you mjwsolo for developing something I found myself using daily!

Hey so I just added Seatbelt in the latest release, as well as a bunch of other stuff like importing MCPs and Skills from Codex and Claude Code + experimental feature to control with your iPhone.

Would love to know what you think..

Release overview vid: https://mjwsolo.github.io/localcode/demo/localcode-release.m…

uv pip install -U localcode

Thanks for the question - it’s a good one and you’re mostly right. There’s no seatbelt support today in localcode.

  • File tools: reading or writing outside the project asks for approval.

  • Shell commands: before a command runs it’s parsed for the paths it mentions, and anything outside the project asks the same way. That only catches paths written in the command itself though, a script or python -c can still reach anything your user account can.

  • So the prompts are a guard against mistakes, not a security boundary per se.

If you want a real boundary today, run localcode inside sandbox-exec or a VM.

Proper seatbelt support for shell commands is a good shout though, just created an issue for it https://github.com/mjwsolo/localcode/issues/254.

Would you use it if it were on by default?

Would you use it if it were on by default?

I would possibly test it, though as with others, I have a fairly modular approach so it’s not quite what I am looking for.

For the agentic stuff I am teaching myself, I usually run whatever inference server makes most sense on my old M1 Max, with an agent (mostly Pi at the moment) inside a full linux VM or container, and lately Paseo as a desktop app, because that setup is closest to a cloud-VM-plus-openrouter-LLM situation I may need in future.

But I like the freedom of being able to chop and change these pieces around, and for the most part, Unsloth is doing for me what your app would do (inference server with a side of chat).

I don’t know if I would necessarily wed myself to a particular agent at this point, not least because e.g. Muse Glimmer and Qwen 3.8 27B seem to have slightly different needs in terms of tools.

This was flagged and dead, likely because it seems like it’s AI written, but I vouched since you are OP.

Don’t submit comments written by AI. It’s against the site rules.

I’m not going to vouch your other comments that were flagged. Write new comments yourself.

I wish you would vouch them if they are by the OP.

Thanks for vouching, noted re site rules!