• mjwsolo a day ago |
    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

    • evanjrowley 3 hours ago |
      > this month Inkling 2 Mini was released as open weights, and it runs on a 32 GB Mac

      Curiously your homepage's model picker gates Inkling 2 Mini behind Macs with 48+ GB.

      Overall this looks awesome and I will absolutely give it a try.

  • mark_l_watson a day ago |
    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
    • mjwsolo a day ago |
      "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!

      • netghost 21 hours ago |
        "There are only two hard things in Computer Science: cache invalidation, naming things, and off by one errors."
        • mjwsolo 21 hours ago |
          Ha, walked right into that one :-)
    • dofm 21 hours ago |
      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)

      • mjwsolo 21 hours ago |
        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..
  • jbonatakis a day ago |
    Could you help me understand why I'd use this rather than something like llama.cpp + pi?
    • mjwsolo 21 hours ago |
      Hey there, I think I answered most of this below in the oMLX question. Localcode runs on llama.cpp too, so it's the same engine also we have made some optimisations. What you'd otherwise do yourself comes down to three main things:

      - Usability: picking a model and quant that fit your Mac, downloading it, and configuring the server and agent for it. Localcode does that in one command, and when a strong new open model comes out we add it within days, already configured.

      - Performance: getting the most out of each model on Apple Silicon. Localcode wires in the model makers' own draft models (roughly 2x faster replies on Gemma and Qwen), copies text the model already read so file rewrites run 3.5 to 4x faster, and patches llama.cpp when a model needs it (Inkling 2's experts were silently running on the CPU, now on the GPU with about 5x faster prompts).

      - Reliability: making sure tool calls, images and long sessions actually work for each model. Every Localcode release runs every model through loading, chat, tool calls and images before it ships.

      If you already have llama.cpp + pi tuned the way you like, you may not gain much. Localcode is for people who want it to just work, without spending time tinkering on config and setup. Would love to hear what you'd want us to prioritise!

      • jbonatakis 10 hours ago |
        Makes sense! Thanks for the reply, I’ll give it a try
  • ctkhn a day ago |
    What optimizations does this have over opencode with omlx serving my models?
    • mjwsolo 21 hours ago |
      Good question! The main things Localcode adds on top of opencode + a local server:

      - Tuned per model: each model gets its own tested settings (context size for your Mac, thinking on or off, KV cache type, drafter), so tool calls and images work out of the box.

      - Agent tuned for local models: reminders to keep the plan updated, stuck detection when the model stops making progress, and compaction timed from the server's measured speed rather than just the token limit.

      - Setup: one command picks a model and quant that fit your Mac's memory and downloads it, no config to edit.

      - Draft models: Localcode automatically uses the model makers draft models where they exist, roughly 2x faster replies on Gemma and Qwen.

      - Faster file rewrites: Localcode copies text the model has already read instead of regenerating it, so rewrites run 3.5 to 4x faster.

      - Leaner prompts: the built-in tool descriptions are cut down to a few lines each, since a local model re-reads them on every request.

      We haven't benchmarked Localcode against oMLX directly though, and MLX is very fast on Apple Silicon, so for some models it may well be quicker - would love to hear how they compare if you try both!

  • dofm 21 hours ago |
    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?

    • mjwsolo 21 hours ago |
      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?

      • samtheprogram 21 hours ago |
        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.

        • skybrian 19 hours ago |
          I wish you would vouch them if they are by the OP.
        • mjwsolo 13 hours ago |
          Thanks for vouching, noted re site rules!
      • dofm 20 hours ago |
        > 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.

  • Saturdays 9 hours ago |
    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

    • mjwsolo 5 hours ago |
      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