3 min read
[AI Minor News]

[Breaking] Claude Code Source Code Exposed?! TypeScript Version Extracted and Released from NPM


  • Extracted from Official NPM Package: TypeScript source code has been restored from the source map file (cli.js.map) included in the `@anthropic-ai/claude-code` v2.1.88 released by Anthropic. ...
※この記事はアフィリエイト広告を含みます

Breaking Claude Code Source Code Exposed?! TypeScript Version Extracted and Released from NPM

📰 News Overview

  • Extracted from Official NPM Package: TypeScript source code has been restored from the source map file (cli.js.map) included in the @anthropic-ai/claude-code v2.1.88 released by Anthropic.
  • Unofficial Repository Emerges: The extracted code has been published in an unofficial GitHub repository, making it accessible to anyone.
  • Internal Structure Fully Revealed: Includes details on the CLI entry points, command implementations, UI components (Ink/React), and various tools (file editing, searching, etc.).

💡 Key Points

  • Vulnerability of Source Maps: The source maps, which are typically meant for debugging, were included in the production package, exposing the original logic before obfuscation.
  • Specificity of Implementation: You can now see the detailed algorithms behind how the AI operates external tools, manages file operations, and conducts searches as “skills.”
  • Licensing Caution: The released code is Anthropic’s intellectual property and is emphasized to be for educational and reference purposes only.

🦈 Shark’s Eye (Curator’s Perspective)

Who would have thought that Anthropic would forget to remove the source map and leave the code completely exposed? It’s mind-blowing! But looking inside, it’s astonishing. The top-notch implementation shows how the AI agents edit complex files and run React (Ink) in the terminal—it’s all packed in there! The definitions of skills and the configurations for tool invocations are pure gold for developers looking to build the next-gen AI tools. Just remember, this isn’t an official open-source release, so repurposing the code is a no-go! Treat it as a forbidden scripture to learn how Anthropic writes their code!

🚀 What’s Next?

Going forward, Anthropic is expected to revise the package distribution settings and ensure the removal of source maps. Additionally, analyzing this leaked code could accelerate the enhancement of existing open-source AI CLI tools.

💬 Sharky’s Take

Who knew a single source map could lay everything bare? The development scene must be sweating bullets! But getting a peek inside is super exciting! Swim on, swimmers! 🦈🔥

📚 Glossary

  • Source Map: A file that records the correspondence between compiled or obfuscated code and the original source code. With this, nearly the entire original code can be restored from the transformed code.

  • NPM: The world’s largest registry for managing Node.js packages. It allows developers to install components of programs with just a single command.

  • CLI: Short for Command Line Interface. An interface that allows users to interact with a program by typing commands from the keyboard. What’s been extracted is the complete picture of this CLI tool!

  • Source: Claude Code full source code leaked on NPM

【免責事項 / Disclaimer / 免责声明】
JP: 本記事はAIによって構成され、運営者が内容の確認・管理を行っています。情報の正確性は保証せず、外部サイトのコンテンツには一切の責任を負いません。
EN: This article was structured by AI and is verified and managed by the operator. Accuracy is not guaranteed, and we assume no responsibility for external content.
ZH: 本文由AI构建,并由运营者进行内容确认与管理。不保证准确性,也不对外部网站的内容承担任何责任。
🦈