Is Claude Code Open Source? What's Free
Is Claude Code open source?
Yes - partially. The Claude Code CLI itself is open source under the Apache 2.0 license. You can find the full source code on GitHub. Anyone can read it, fork it, contribute to it, or build on top of it.
But "open source" doesn't mean "completely free to use." The CLI is the interface. The intelligence behind it - Anthropic's Claude models - requires a paid subscription or API credits. Think of it like VS Code being open source while the extensions and cloud services on top of it have their own pricing.
This distinction matters because most developers searching "is Claude Code free" or "Claude Code open source" are really asking one of two questions: Can I see how it works? And can I use it without paying? The answers are yes and sort of.
What's actually in the open source repo
The Claude Code GitHub repository contains the complete CLI application. That includes:
- The terminal interface - the interactive REPL you type commands into
- Tool execution engine - how Claude reads files, runs bash commands, edits code, and searches your codebase
- Permission system - the allow/deny controls that gate what Claude can do
- Hook infrastructure - lifecycle events (PreToolUse, PostToolUse, Stop) where you can attach custom scripts
- Command system - both built-in commands like
/compactand the framework for custom commands - MCP client - the protocol layer that connects Claude Code to external tool servers
- Context management - how conversation history is compressed, compacted, and maintained
What you won't find in the open source repo is the model itself. Claude Sonnet, Opus, and Haiku run on Anthropic's servers. The CLI sends your prompts to those models and receives responses. That API call is what costs money.
The free tier - what you get without paying
Claude Code works with two billing models, and the free options differ for each:
Anthropic console (API credits)
New Anthropic accounts get a small amount of free API credits. You can install Claude Code, set your API key, and start using it immediately. The free credits won't last long with heavy usage - Claude Code sends substantial context with each request - but it's enough to evaluate whether the tool fits your workflow.
After the free credits run out, you pay per token. Input tokens, output tokens, and cached tokens each have different rates. For most developers, a working session costs between $2 and $15 depending on the model and how much code you're working with. Our pricing breakdown covers the exact rates.
Claude Pro/Max subscription
With a Claude Pro ($20/month) or Max ($100-200/month) subscription, Claude Code is included. Pro gives you limited usage, Max gives you substantially more. There's no separate Claude Code subscription - it's bundled into your existing Anthropic plan.
The Max plan is what most professional developers use. The Pro plan's rate limits make heavy coding sessions frustrating. If you're evaluating Claude Code seriously, start with Max for at least one month to see what unrestricted usage feels like.
Open source CLI vs. the ecosystem on top
Here's where it gets interesting. Claude Code the CLI is one layer. The ecosystem built on top of it is a separate thing entirely.
Layer 1: The CLI (open source)
This is the foundation. Install it with npm install -g @anthropic-ai/claude-code, point it at a project, and start working. It reads your files, runs your commands, writes code, and manages context. The CLI is powerful on its own - most developers never go beyond this layer.
Layer 2: Configuration (your own, free)
Claude Code becomes significantly more useful when you configure it for your specific project. This layer includes:
- CLAUDE.md files - project instructions that Claude reads automatically. Our CLAUDE.md guide covers how to write effective ones.
- Custom commands - markdown files in
.claude/commands/that create slash commands for common workflows - Hooks - shell scripts that run at specific lifecycle points to enforce rules or add automation
- Settings - permission presets, model selection, and behavioral configuration
All of this is free. You write the files, check them into your repo, and they work. No additional cost beyond the API/subscription you're already paying for.
Layer 3: Skills and agents (where it gets advanced)
Skills are domain knowledge files that Claude loads on demand. Agents are specialized sub-processes that handle specific types of work. Neither of these exist in the base CLI - they're patterns built using the CLI's extension points.
You can build your own skills and agents from scratch. The CLI provides the infrastructure: subagent spawning, memory persistence, tool scoping. But building a production-quality system of agents that coordinate, share memory, and maintain quality across sessions takes significant effort.
This is where products like Claudify fit in. Instead of building your own agent system from zero, you get a pre-built operating system with tested commands, skills, agents, and workflows. It's the difference between building a house from lumber versus buying one that's already wired and plumbed.
Layer 4: MCP servers (mixed)
The Model Context Protocol lets Claude Code connect to external services - databases, APIs, file systems, anything that implements the MCP spec. Many MCP servers are open source. Some are commercial products. The protocol itself is open.
You can connect Claude Code to GitHub, Slack, your database, your CMS, or any other service with an MCP server. The MCP servers guide walks through the setup. The CLI's MCP client is open source; individual servers vary.
What being open source actually means for you
You can audit the code
Claude Code runs in your terminal with access to your files, your shell, and potentially your credentials. Being open source means you can verify exactly what it does. Read the permission checks. Review the tool execution code. Confirm that your code isn't being sent anywhere unexpected.
This matters more for Claude Code than for most developer tools because of the access level involved. A code formatter doesn't need trust. A tool that can run arbitrary bash commands does.
You can extend it
The open source codebase means you can build your own tools, modify behavior, or create forks for specialized use cases. Some teams have built internal versions with custom tool sets or modified permission models. The Apache 2.0 license allows commercial use.
You can contribute
Bug fixes, feature requests, and improvements go through the standard GitHub PR process. The repository is actively maintained by Anthropic's team. Community contributions shape the tool's direction - several major features originated from community PRs.
You can learn from it
The Claude Code source code is one of the best examples of how to build an agentic coding system. The tool execution architecture, context management, and permission model are well-designed patterns that developers borrow for their own AI-powered tools.
Common misconceptions
"Open source means I don't need to pay anything." The CLI is free. The AI models that power it are not. You need either API credits or a subscription to make Claude Code actually work. Without a model behind it, the CLI is just a shell that can't think.
"I can run Claude Code with local models." Not natively. Claude Code is designed to work with Anthropic's API. Community forks exist that route to other providers or local models, but they're unofficial and typically lag behind the main release. The experience with non-Claude models is degraded because the CLI's prompt engineering is optimized for Claude's capabilities.
"The free tier is enough for real work." The initial free API credits will get you through an evaluation session, maybe two. For daily development work, you need a paid plan. Claude Code consumes more tokens than a chat interface because it sends file contents, command outputs, and project context with every request.
"Skills and agents are part of Claude Code." Skills and agents are patterns, not features. The CLI provides the primitives - file reading, command execution, subagent spawning, memory files. What you build with those primitives is up to you. Products like Claudify package pre-built systems of skills and agents, but they're built on top of the open source CLI, not part of it.
Should you use the free tier or pay?
If you're evaluating whether Claude Code fits your workflow, start with the free API credits. Install the CLI, run it on a real project, and see how it handles your specific codebase. That evaluation should take 30-60 minutes.
If you decide to adopt it, skip Pro and go straight to Max. The rate limits on Pro create frustrating interruptions during focused coding sessions. Max at $100/month is less than most developers' coffee budget and provides enough capacity for full-day usage.
For teams, the Teams and Enterprise plans add collaboration features and centralized billing. The per-seat cost is reasonable for the productivity gain.
The bottom line
Claude Code's CLI is genuinely open source - Apache 2.0, full source on GitHub, active community. The models powering it require payment. The ecosystem of skills, agents, and configurations built on top of it ranges from free (build your own) to paid (buy pre-built systems).
For most developers, the right approach is: install the free CLI, evaluate with free credits, subscribe to Max if it clicks, and then decide whether to build your own configuration system or use something like Claudify that ships one out of the box.
Get Claudify - 21 commands, 9 agents, 1,727 skills. Installed in one command.
Frequently asked questions
Is the Claude Code CLI completely free to download and install?
Yes. The CLI is open source under Apache 2.0 and free to install via npm install -g @anthropic-ai/claude-code. You need an Anthropic API key or subscription to use it, but the software itself costs nothing to download.
Can I use Claude Code with models other than Claude?
Not with the official CLI. Claude Code is built for Anthropic's models and the prompt engineering is optimized for Claude's capabilities. Community forks exist that route to other providers, but they're unofficial and the experience is degraded compared to using Claude models.
What's the difference between Claude Code and Claudify?
Claude Code is the open source CLI from Anthropic - the terminal interface that connects to Claude's AI models. Claudify is a pre-built operating system that installs on top of Claude Code, adding 21 commands, 9 agents, and 1,727 skills for production workflows. Claude Code is the engine; Claudify is the car built around it.
More like this
Ready to upgrade your Claude Code setup?
Get Claudify