HomeClaude Code › Open source?
OverviewInstallCLI referencePricing & limitsAgent SDKSkills & pluginsGitHubWeb, desktop & IDEModelsErrorsOpen source?TutorialFor studentsQA automation中文指南
Last updated: September 22, 2026

Is Claude Code open source?

No. The Claude Code CLI ships as a compiled, minified JavaScript package, and Anthropic has not published its source. Several things around it are open, which is where the confusion comes from.

TLDR

  • The CLI itself: proprietary, distributed via npm as built JavaScript.
  • Open: the Agent SDK, the GitHub Action, the official skills repository, the plugin format and the public issue tracker.
  • A source-map exposure in an npm release let people read unminified internals for a while; it was not a licence change.
  • Open-source agents — OpenCode, Aider, Cline, Goose — work against this gateway with the same key.

What is open and what is not

The source-map exposure

In 2026 an npm release shipped with source maps, exposing readable internals of the CLI. It circulated widely and was analysed in detail — our write-up is linked below. It did not make Claude Code open source: the licence is unchanged, and the exposed code cannot be legally redistributed or built upon. What it did do is confirm the architecture people had inferred: an agent loop over a tool set, a permission system, and a lot of prompt engineering.

Open-source alternatives that use the same API

Does it matter?

For most users, no: the tool's value is the model behind it, and that is available through the API to any client. Where it matters is auditability and lock-in, and the open agents above are the answer to both.

Frequently asked questions

Can I read the Claude Code source code?

Not legitimately as a licensed source release. The npm package is minified; the 2026 source-map exposure was an accident, not a publication.

Is there an open-source version of Claude Code?

No official one. OpenCode, Aider, Cline and Goose are open agents that cover the same ground and work with the same API.

Is the Claude Code SDK open source?

Yes — the Claude Agent SDK for Python and TypeScript is published openly, as is the GitHub Action.

Run Claude Code on the gateway

Same models, two environment variables, credits at 7.69× face value — or a flat-rate unlimited plan.

Get an API key See unlimited plans

AI Prime Tech is an independent API gateway and is not affiliated with, endorsed by, or sponsored by Anthropic. “Claude” and “Claude Code” are trademarks of Anthropic. Claude Code features described here follow Anthropic’s public documentation at the time of writing and change frequently; prices and model lists on this page are read from this gateway’s live settings.

More Claude Code guides

Claude Code: the complete guideHow to install Claude CodeClaude Code CLI documentation: commands and flagsClaude Code pricing and limits, explainedThe Claude Code SDK, now the Claude Agent SDKClaude Code skills and pluginsClaude Code in GitHub: the App, the Action and @claudeDoes Claude Code have a web interface? Web, desktop and IDE explainedWhich model Claude Code uses, and how to change itClaude Code errors and how to fix themClaude Code tutorial: your first real sessionClaude Code for studentsHow to use Claude Code for QA automationClaude Code 怎么用:从安装到日常使用