Local AI coding on a Mac: apps, models and setup

A local model keeps your code on your Mac and keeps working with no internet. Here's what you need, which apps support it, and where it still falls short.

Most AI coding tools send your code to a company's servers to be processed. Local AI coding works differently: an open model runs on your own Mac, so your code stays with you and the AI keeps working on a plane, in a café with bad Wi-Fi or on a locked-down network. This guide brings together everything you need to get started on a Mac, with links to more detail on each topic.

What "local" means

Anything you send to a cloud AI, such as Claude, GPT or Gemini, is received and handled by another company, under its terms. A local model runs on your Mac's own chip and memory. Once the model is downloaded, your prompts and code don't leave your machine, and it works offline.

  • Cloud: the strongest models, no hardware demands, but you need the internet, usage is often metered, and your code goes to the provider.
  • Local: private, offline and no usage fees, but limited by your Mac's memory and speed, and the models are smaller.

One exception to watch: Ollama also offers cloud models, which run on Ollama's servers, not your Mac. Setting OLLAMA_NO_CLOUD=1 keeps it local-only. For the full picture, see local vs cloud AI coding.

MLX, Ollama and LM Studio in short

These are the three most popular free ways to run models on a Mac. They overlap: Ollama and LM Studio both use Apple's MLX under the hood for MLX models.

Best forInterfaceLicence
OllamaA simple model server that coding tools connect toApp and command lineOpen source (MIT)
LM StudioBrowsing, downloading and chatting with models in a polished appFull graphical app, plus command lineProprietary app, free for home and work
MLX (mlx-lm)Converting, quantising or fine-tuning models in PythonCommand line and Python onlyOpen source (MIT)

All three need macOS 14 Sonoma or later. LM Studio and MLX also need Apple silicon; Ollama runs on Intel Macs too, but only on the processor, not the graphics. The detailed comparison is in Ollama vs LM Studio vs MLX.

Which models fit your Mac

Memory decides which models you can load; memory bandwidth decides how fast they answer. Leave room for the model's working context and your other apps.

Your memoryWhat runs comfortablyExamples
8 GBOnly the smallest models, and tightQwen3 4B (about a 2.5 GB download)
16 GBSmall modelsGemma 4 E2B, E4B or 12B
32 GBCapable 20B to 30B models, with a modest context lengthQwen3.8-27B (~18 GB), Devstral Small 2 (~15 GB), Gemma 4 31B (~20 GB), gpt-oss-20b (~14 GB)
64 GBThe same models with long context, or larger ones at a squeezeQwen3-Coder-Next (short context, raised GPU memory limit)
96 to 128 GB and upLarge models comfortablyQwen3-Coder-Next (~52 GB), gpt-oss-120b

A rough guide based on Ollama's download sizes in November 2026. Actual needs depend on the version and context length you use.

All the models above use the Apache 2.0 licence, which allows commercial use. More detail: what computer you need to run local AI and the best open-source coding models.

Mac apps and editors that run local models

AppWhat it isPriceLocal models throughMac requirements
NexusMac app for building with AI: chat, live preview, diffs, restore points$199 USD one-time purchase (coming soon)Built-in MLX engine or OllamaApple silicon, macOS 12+ (14+ for local models and the Codex app, 13+ for Claude Code)
Local Code (Draw Things)Private AI agent with Python, Node.js and a shell built inFree; optional hosted-model credits from $9.99Its own built-in model selectorApple silicon, macOS 26+, 16 GB or more
JetBrains Junie LocalJetBrains' Junie agent running on your own hardwareFreeA tuned ~20 GB model downloaded onceM5 chip, macOS 26+, 64 GB
VS Code + ClineFree editor with an open-source coding agentFree (you pay only for any cloud AI)Ollama or LM StudioAny Mac that runs your model
ZedFast open-source editorFree personal planOllama, LM Studio, llama.cpp or any OpenAI-compatible serverAny Mac that runs your model
XcodeApple's IDE for Apple platformsFreeA "Locally Hosted" chat provider, such as OllamaXcode 27 needs macOS Tahoe 26.6+

Prices and requirements as listed on each vendor's site in November 2026.

Local Code by Draw Things

Local Code is a free, open-source (GPL-3.0) agent from the team behind the Draw Things image app. It bundles Python, Node.js and a shell, and only touches folders you share with it. You pick a model from its own list, such as Qwen3.8-27B (which it says runs from 16 GB, recommended at 32 GB) or DeepSeek Flash models that stream from the SSD on 32 GB Macs. Once a model is downloaded it works with no connection. It's a general agent for code, documents and data rather than a project workspace, and it needs macOS 26.

JetBrains Junie Local

Junie Local runs JetBrains' Junie agent entirely on your machine, free and unmetered. After the one-time download of about 20 GB, JetBrains says nothing is sent off the machine. The catch is the hardware: on a Mac it needs an M5 chip, macOS 26 and 64 GB of memory. Note that JetBrains says the agents in its regular AI Assistant can't use local models; Junie Local is the separate route.

VS Code with Cline (or Continue)

VS Code's documentation says local models for chat work without a GitHub account, a Copilot plan or an internet connection; Copilot's own inline suggestions still need its service. For agent-style work, the open-source Cline extension connects to Ollama (localhost:11434) or LM Studio (localhost:1234) in its settings. Continue, another open-source assistant, was acquired by Cursor in 2026; its code remains available, but the project is no longer actively maintained, so Cline is the safer choice for a new setup.

Zed with Ollama

Zed's agent and inline assistant can use Ollama, LM Studio, llama.cpp or any OpenAI-compatible server on your Mac, and edit predictions can come from a local model too. Start the server (for example ollama serve) and Zed finds your downloaded models. Its default edit-prediction model runs online, so switch it if you want everything local.

Xcode

Apple's documentation says you can add a chat provider "hosted locally on your Mac" in Xcode's Intelligence settings by choosing Locally Hosted and entering a port, such as Ollama's 11434. The provider must support the Chat Completions API. Its predictive code completion also runs on your Mac. Xcode's built-in agents (from Anthropic, OpenAI and others) are cloud services.

Setup steps

  1. Check your memory (Apple menu > About This Mac) and pick a model from the table above.
  2. Install a model runner. Ollama is the easiest for coding tools: install it from ollama.com, then run, for example, ollama run qwen3.8 on a 32 GB Mac or ollama run gemma4:e2b on a 16 GB Mac. The first run downloads the model.
  3. Give it enough context. Ollama recommends at least 64,000 tokens for coding tools: OLLAMA_CONTEXT_LENGTH=64000 ollama serve. More context needs more memory.
  4. Connect your tool. Choose Ollama (or LM Studio) as the provider in Cline, Zed or Xcode, and select your model.
  5. Test offline. Turn off Wi-Fi and try a small task, to be sure nothing is quietly using a cloud service.

The step-by-step version, including LM Studio and MLX, is in how to run an AI coding model locally. Apps such as Nexus and Local Code skip the runner entirely: you download the model inside the app.

Honest limits

  • Quality: the models that fit a 32 GB Mac are good for everyday work, but the strongest cloud models still handle large, multi-step changes better.
  • Speed: answers come at the pace your Mac's memory bandwidth allows. A base chip is noticeably slower than a Max or Ultra.
  • Memory: 8 and 16 GB Macs are limited to small models, and long context eats memory quickly.
  • Downloads and disk space: models range from a few gigabytes to over 50 GB, and you need the internet to fetch them.
  • Not everything is offline: installing packages, pushing to Git and any web lookup still need a connection.
  • Battery: long runs are power-hungry; JetBrains recommends staying plugged in for Junie Local.

More on local AI

Nexus: local models in a visual workspace

Nexus is a native Mac app for building with AI: a chat, live preview, diffs and restore points, with projects kept in folders on your Mac. Its built-in MLX engine lets you download open models such as Qwen, Gemma or Mistral inside the app, with no terminal, or you can use your Ollama models. With a local model, Nexus and the AI run entirely on your Mac and work offline once the model is downloaded. When a task needs more, you can switch to Claude Code by Anthropic or the Codex app by OpenAI, each used with your own plan; Anthropic or OpenAI then receives what each request needs. Nexus does not include AI models and does not host or deploy your projects. Nexus will be a one-time purchase of $199 USD, with no Nexus subscription; a 14-day free trial and lifetime updates are planned. Connecting third-party AI services such as Claude Code or Codex is optional and at your own expense (see Nexus pricing). It's for Apple silicon Macs with macOS 12 or later (macOS 14 or later for local models and the Codex app, 13 or later for Claude Code), and it's coming soon.

Frequently asked questions

Can I use AI for coding on a Mac with no internet?

Yes, with a local model. Once the model is downloaded, apps such as Nexus (coming soon), Local Code by Draw Things, Zed, VS Code with Cline and Xcode's locally hosted providers can use it with no connection. Cloud tools such as Claude Code and Codex need the internet.

How much memory do I need for local AI coding?

16 GB runs small models comfortably and 8 GB only the smallest. 32 GB opens up capable 20B to 30B models such as Qwen3.8-27B or Devstral Small 2. 64 GB or more lets you use longer context or larger models.

Is MLX or Ollama better for coding on a Mac?

Both work. Ollama is the easier server for coding tools to connect to, and it uses MLX on Apple silicon itself. MLX through mlx-lm suits people comfortable in Python who want to convert or fine-tune models.

Are local models as good as Claude or GPT?

Not yet for most hard tasks. The best models that fit a 32 GB Mac are good for everyday coding, but the strongest cloud models still handle large, multi-step changes better. Many people use local models day to day and switch to a cloud model when needed.