If your company prohibits sending source code to third-party APIs, Claude Code is effectively off the table in its normal form, even if you want to use it.
QwenCode is a local shim that lets you run Claude Code’s full terminal agent against a model running on your own machine via Ollama. No API key. No data leaves your network. No per-token cost.
The main technical problem it solves: local models like Qwen don’t speak Claude’s tool-calling protocol correctly. They frequently write out what they would do instead of actually invoking the tool. QwenCode detects that pattern, executes the correct file operation directly, and verifies the result byte-for-byte. You get the actual edit, not a description of the edit.
What works out of the box:
- File editing and bash command execution through Claude Code’s exact terminal interface
- Tool orchestration across multi-step tasks
- Windows, macOS, and Linux support. Clone the repo and run it, zero npm dependencies
- Environment variables for context window size, model choice, and timeouts so you can tune it to your GPU
- Real error messages with specific codes when something goes wrong. If Ollama is down or returns garbage, you’ll know why
Setup is straightforward: install Ollama, pull a code-capable model (Qwen2.5-Coder works well), clone the QwenCode repo, set the endpoint environment variable, and point Claude Code at it.
It’s MIT licensed and free. The repo has full setup instructions including the environment variable reference and some notes on model selection based on available VRAM.
If you’ve been blocked from using Claude Code by data policy restrictions, this is a direct solution to that specific problem.