Claude Code Source Code Just Leaked. Here's How to Run It Free (Llama + OpenClaude)
OpenClaude and Llama let you run Claude Code's leaked source code locally. Zero cost. Full setup guide with step-by-step instructions inside.
Claude Code is the best AI coding tool right now. No debate.
But even Anthropic makes mistakes.
On March 31, the Claude Code source code leaked online.
Within hours, developers forked it across GitHub.
Anthropic filed DMCA takedowns and removed most of them.
Then a Korean developer did something clever: he rewrote the Claude Code source code using AI, making it completely legit.
The result? 150K+ stars in 4 days.
One of the fastest-growing repos in GitHub history.
Then Gitlawb forked that repo and built OpenClaude, a fully open-source version you can run for free.

There’s one catch: OpenClaude still needs an API.
Why pay for an API when the whole point is running this for free?
That’s where Ollama comes in. A free, local AI API that replaces the paid one.
Let me show you how it works.
What is Ollama?

Ollama is a free, open-source platform that lets you download and run AI models like Llama, Mistral, and Gemma locally on your machine.
If your hardware isn't powerful enough, Ollama Cloud lets you run these models remotely using a free API key.
This makes it the ideal backend for running OpenClaude without any cost.
To use models on your pc without downloading, you should use Cloud models.
To do that, go to Settings → Keys and grab your free API key.
This lets you run models on Ollama Cloud instead of your local machine.
No GPU required.
Browse the available models, but make sure they support Ollama Cloud.
Now you have a free AI API.
This is the key to running Claude Code source code without paying a cent.
Time to install OpenClaude.
How to install OpenClaude?
OpenClaude is an open-source version built from the Claude Code source code.
You can install it in 2 minutes using npm.
After installation, connect it to Ollama’s free API by setting three environment variables: your API key, the Ollama base URL, and your preferred model.
No paid subscription required.
Here are the steps.
Visit the GitHub page of OpenClaude and follow these steps.
Step 1: Open your terminal
Step 2: Run this code
npm install -g @gitlawb/openclaudeStep 3: Launch OpenClaude with your free Ollama API:
CLAUDE_CODE_USE_OPENAI=1 OPENAI_API_KEY="your-ollama-cloud-api-key" OPENAI_BASE_URL="https://ollama.com/v1" OPENAI_MODEL="minimax-m2.7" openclaudeReplace “your-ollama-cloud-api-key” with the API key you grabbed from Ollama.
That’s it.
Here’s what OpenClaude looks like:
Tips: If you want to run Claude Code locally, check out my full guide to running Claude Code locally
Now let’s build something with it.
How to Build a Macro Tracker with OpenClaude?
OpenClaude can build full applications using a single prompt, just like the original Claude Code.
By giving it a natural language description of your app, it generates the complete code, loads existing skills, and asks setup questions automatically.
No coding experience needed.
Just paste this prompt:
Build an app that takes a photo of my food and breaks it down into calories
and macronutrients like protein, carbs, and fat.Here’s the first output:
OpenClaude automatically loaded my existing skills (superpowers) and asked 2-3 setup questions, just like the original Claude Code.
And after a few minutes, it’s finished, let’s test it.
Is OpenClaude Worth Using?
OpenClaude is a free, open-source alternative to Claude Code that runs with Ollama’s free API. It’s not as fast as the original yet, but it can build real applications from a single prompt.
For developers who want Claude Code’s power without the subscription cost, OpenClaude is the best free option available today.
Pair it with Ollama, and you have the most powerful AI coding tool running on your machine without spending a cent.
I still am a Claude Max member, but you get the idea.
If you want to learn how to use Claude Code, check out my MasterClass. You’ll find all the essential information without a paywall, while my personal experiences are behind the paywall.
Thanks for reading.












Hi GenCay ! We run The Internship Guy, a 50,000 subscriber student audience focused on high school and university students actively exploring internships, admissions and early career pathways. Instead of selling generic sponsorships, we work with partners to deliver measurable outcomes by driving targeted student interest through dedicated campaigns, capturing qualified leads via our own landing pages and sharing these directly with you. A typical campaign generates 30 to 100 interested student leads depending on targeting, and we handle distribution, positioning and conversion end to end. Open to a chat?