nicedreamzapp/claude-code-local
Local Anthropic-compatible inference to resume Claude Code after usage limits
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Claude Code remains the client and tool runner. On Apple Silicon, a launcher points ANTHROPIC_BASE_URL at the Python MLX service in proxy/server.py, which serves the Anthropic Messages API with streaming. The server translates Gemma, Qwen, and Llama-style tool output and repairs malformed tool JSON. Unlike an OpenAI-compatible server paired with a separate Anthropic adapter, this path handles protocol compatibility at the inference endpoint.
The MLX service reuses the prompt cache across turns. Separately, agent/agent.py provides a standalone terminal coding agent with a short, fixed system prompt designed to preserve cache reuse. Session handoff sits in the launcher layer: bin/keepgoing and bin/keepgoing.py locate the last Claude Code conversation for the current folder; Linux and Windows use portable/ccl.py keepgoing with llama.cpp. The core integration is at the model API, not through an MCP server.
Key Capabilities & Differentiators
keep going is the main workflow: exit hosted Claude Code and resume the conversation with a local model while retaining the client’s file editing and command tools. OpenRouter is an optional keyed cloud route, not part of offline inference. The macOS setup selects among Qwen 3.5 2B/4B, Gemma 4 12B/31B, and Qwen 3.8 27B by memory tier. Qwen 4 is not part of the available lineup.
The 8 GB and 16 GB Mac profiles both use 16K context and support image input. On an M4 Pro, the 2B and 4B profiles recorded about 92 and 22 tokens/s, with server memory peaks of 4.2 GB and 10.6 GB, respectively. Both passed a scoped Claude Code check covering file reads, edits, script execution, and image description. The 27B Agent-12 result (12/12 easy, 7/8 hard) came from that benchmark’s own harness, not from Claude Code.
Trade-offs & Limitations
This is a practical fallback for teams that want to keep the Claude Code interface after hitting hosted usage limits. The handoff preserves the conversation, not the model’s behavior: a 2B or 4B local model is better suited to one clear step at a time than a long, loosely specified refactor. The M4 Pro token rates measure generation under specific configurations; they do not establish end-to-end edit latency or cross-platform performance.
Compared with assembling a generic local server and protocol translator, the MLX route reduces integration work for this client but makes model-specific tool parsing part of the stack you depend on. Local execution shifts cost toward hardware, memory, and maintenance. Keep the endpoint on loopback: sk-local is not checked. Treat OpenRouter and logged-in browser or remote-access add-ons as separate trust decisions, and review their data paths and terms independently.
Hardware & Deployment Guide
On an M1-or-newer Mac, setup.sh provisions Python 3.12, selects and downloads a model, and creates Claude Local.command. A manual MLX setup uses a Python 3.12 virtual environment with mlx-lm and starts the service via scripts/start-mlx-server.sh; the local API example uses localhost:4000. Linux uses install.sh and Windows uses install.ps1 to select a pinned llama.cpp build and a model for the available hardware.
Plan for initial downloads of dependencies and model weights; afterward, the local inference path needs no Anthropic key or subscription. scripts/doctor.sh checks core components on macOS and Linux. Operationally, v0.6.0 introduced the add-on bundle, v0.7.0 added automatic model selection for 8 GB and 16 GB Macs, and v1.0.0 foregrounded the exit-and-resume workflow. Start with the core install and add browser, voice, or remote-access components only if needed.
proxy/server.py streams Anthropic Messages responses directly from the MLX service.keep going finds the last Claude Code conversation for the current folder; plain claude retains the hosted path.Claude Code users who want a self-hosted fallback for scoped edits, local commands, and conversation continuity after hosted usage limits.
You need hosted Claude’s model behavior, consistent results on long multi-step changes, or an authenticated shared inference endpoint out of the box.
Quick Start & Installation
curl -fsSL https://raw.githubusercontent.com/nicedreamzapp/claude-code-local/main/install.sh | bash
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| claude-code-local ★ | 3.6k | +37 | Python | MIT | Local Anthropic-compatible inference to resume Claude Code after usage limits |
| oh-my-pi | 40.5k | +483 | TypeScript | MIT | A Bun/Rust terminal agent for model-flexible coding with LSP and editor integrat |
| openinterpreter | 69k | +65 | Rust | Apache-2.0 | A Rust coding CLI with swappable harnesses for low-cost models |
| warp | 66.2k | +78 | Rust | AGPL-3.0 | A Rust terminal workspace for built-in and external coding agents |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/nicedreamzapp/claude-code-local.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about claude-code-local
How does Claude Code connect to a local model?
ANTHROPIC_BASE_URL for the local Claude Code launcher. On Apple Silicon, proxy/server.py serves Anthropic Messages API streams directly and maps model output to Claude Code tool calls. The documented sk-local key is a placeholder, not an authentication control.What memory should I budget for local inference?
Can a company self-host this under the MIT license?
Why choose this over a generic local server or hosted Claude?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy