Claude Code 전체 소스 코드가 NPM에서 유출되었습니다.
hackernews
|
|
📦 오픈소스
#ai 딜
#anthropic
#chatgpt
#claude
#claude code
#npm
#보안
#소스코드 유출
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
비공식 GitHub 저장소에 앤스로픽(Anthropic)의 CLI 도구인 '클로드 코드(Claude Code)'의 타입스크립트(TypeScript) 소스 코드가 유출되어 공개되었습니다. 이 코드는 npm에 공식 배포된 패키지(v2.1.88) 내에 포함된 소스 맵 파일(cli.js.map)을 역추출하여 얻은 것입니다. 공개된 소스에는 파일 편집, 검색 도구, 터미널 UI 등을 포함한 CLI 구현체의 전체 폴더 구조와 원본 코드가 담겨 있습니다. 해당 비공식 저장소 운영자는 이 코드가 앤스로픽의 지적 재산임을 명시하며, 교육 및 참고 목적으로만 제공되었고 공식적인 소속이나 지원을 받지 않음을 강력히 경고했습니다.
본문
This is NOT an official Anthropic repository. This repository contains the extracted TypeScript source code of Anthropic's Claude Code CLI tool. The source was obtained by unpacking the source map (cli.js.map ) bundled with the officially published npm package. - npm package: @anthropic-ai/claude-code v2.1.88 - Official homepage: github.com/anthropics/claude-code Anthropic publishes Claude Code as a bundled JavaScript CLI on npm. The published package includes a source map file (cli.js.map ) that contains the original TypeScript source. This repository simply extracts and preserves that source for easier reading and reference. git clone [email protected]:chatgptprojects/claude-code.git cd claude-code - Install the package: mkdir claude-code-extract && cd claude-code-extract npm pack @anthropic-ai/[email protected] tar -xzf anthropic-ai-claude-code-2.1.88.tgz cd package - Run the unpack script: Create a file called unpack.mjs : import { readFileSync, writeFileSync, mkdirSync } from "fs"; import { dirname, join } from "path"; const mapFile = join(import.meta.dirname, "cli.js.map"); const outDir = join(import.meta.dirname, "unpacked"); console.log("Reading source map..."); const map = JSON.parse(readFileSync(mapFile, "utf-8")); const sources = map.sources || []; const contents = map.sourcesContent || []; console.log(`Found ${sources.length} source files.`); let written = 0; let skipped = 0; for (let i = 0; i 0) console.log(`Skipped ${skipped} files with no content.`); - Run it: node unpack.mjs The extracted source will be in the unpacked/ directory. src/ ├── cli/ # CLI entrypoint and argument parsing ├── commands/ # Command implementations ├── components/ # UI components (Ink/React) ├── constants/ # App constants and configuration ├── context/ # Context management ├── hooks/ # React hooks ├── ink/ # Terminal UI (Ink framework) ├── services/ # Core services ├── skills/ # Skill definitions ├── tools/ # Tool implementations (file editing, search, etc.) ├── types/ # TypeScript type definitions ├── utils/ # Utility functions ├── main.tsx # Main application entry ├── query.ts # Query handling └── ... All code in this repository is the intellectual property of Anthropic. This repository is provided for educational and reference purposes only. Please refer to Anthropic's license terms for usage restrictions. This is not affiliated with, endorsed by, or supported by Anthropic.
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유