A Rust CLI and TUI that detects your CPU, RAM and GPU, then ranks open LLMs by how well they will run on your machine.
nicedreamzapp/claude-code-local
Runs open AI models locally on Apple Silicon Macs via MLX and serves them through an Anthropic-API-compatible server so Claude Code works offline.
Open-source alternative to:Claude Code
- Stars
- 3,372
- Forks
- 652
- Open issues
- 3
- Last commit
- 4 days ago
What is it?
Claude Code Local is a small Python server (proxy/server.py) that runs open models on a Mac's chip using Apple's MLX framework and answers Claude Code in Anthropic's Messages API format. Because Claude Code talks to the local server directly, no cloud model or API key is needed, and prompts and code stay on the machine.
The server converts each supported model's own tool-call format, including Gemma 4, Qwen and Llama JSON, into Claude Code tool calls, repairs malformed tool JSON, and reuses the prompt cache between turns. Setup checks the Mac's memory and selects a model that fits, from Gemma 4 E4B on 8 GB machines up to Qwen 3.8 27B on 96 GB and larger.
The project also includes launchers for coding, a lightweight terminal agent, a browser agent, voice mode, and a free cloud fallback called keep going for continuing a conversation when Claude usage runs out. It is MIT licensed and requires Apple Silicon with Python 3.12.
Key features
- 01Serves the Anthropic Messages API with streaming for Claude Code on a local MLX model.
- 02Converts model-specific tool-call formats into Claude Code tool calls.
- 03Reuses the prompt cache between turns to speed up long sessions.
- 04Selects a local model based on the Mac's available memory.
- 05Offers a keep-going option to continue a conversation with a free cloud or local model.
Use cases
- Keep using Claude Code when a Claude usage limit has been reached.
- Work with source code offline or in an airgapped environment on a Mac.
- Keep prompts and code off third-party servers for sensitive work such as legal or healthcare projects.
- Experiment with open models inside the Claude Code workflow on Apple Silicon.
Quick start
- 1
Install with one command
curl -fsSL https://raw.githubusercontent.com/nicedreamzapp/claude-code-local/main/install.sh | bash - 2
Or clone the repo and run setup
git clone https://github.com/nicedreamzapp/claude-code-local && cd claude-code-local && bash setup.sh - 3
Double-click Claude Local.command on your Desktop to start coding locally
Things to know
- Requires a Mac with Apple Silicon (M1 or newer); it does not run on other platforms.
- Larger models need substantial unified memory, and 8 GB Macs get a model with known tool-use problems.
Topics
FAQ
- What is claude-code-local?
- Runs open AI models locally on Apple Silicon Macs via MLX and serves them through an Anthropic-API-compatible server so Claude Code works offline. Claude Code Local is a small Python server (proxy/server.py) that runs open models on a Mac's chip using Apple's MLX framework and answers Claude Code in Anthropic's Messages API format. Because Claude Code talks to the local server directly, no cloud model or API key is needed, and prompts and code stay on the machine.
- Is claude-code-local free to use? What license does it have?
- claude-code-local is open source under the MIT license. Check the license terms before using it in commercial products.
- Is claude-code-local still maintained?
- Actively maintained. The last commit to claude-code-local was on Oct 15, 2026.
- What can I use claude-code-local for?
- Keep using Claude Code when a Claude usage limit has been reached. Work with source code offline or in an airgapped environment on a Mac. Keep prompts and code off third-party servers for sensitive work such as legal or healthcare projects. Experiment with open models inside the Claude Code workflow on Apple Silicon.
- How do I install claude-code-local?
- Install with one command: curl -fsSL https://raw.githubusercontent.com/nicedreamzapp/claude-code-local/main/install.sh | bash Or clone the repo and run setup: git clone https://github.com/nicedreamzapp/claude-code-local && cd claude-code-local && bash setup.sh Double-click Claude Local.command on your Desktop to start coding locally
- Where can I get claude-code-local?
- The source code and installation instructions are on GitHub: https://github.com/nicedreamzapp/claude-code-local
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open source inference engine that tunes its kernels to your hardware to run open models faster on Apple Silicon, NVIDIA, AMD, or CPU.
Swift and Metal runtime that runs the 26B Gemma 4 26B-A4B model on Apple Silicon Macs with about 2 GB of RAM by streaming experts from SSD.
Pairs an iPhone with a Mac over USB-C so the phone's GPU helps run a Qwen 27B model locally, speeding up prompt reading and extending context.
A small educational project for running vision-language model inference on Apple Silicon with MLX, scoring candidate answers about one image.
A Claude Code skill that reads your local session logs to explain where token usage went and why you hit limits.