| name | pull-claude-code-source-code |
| description | Download, prettify, and archive @anthropic-ai/claude-code npm packages. Use when user asks to "archive claude code", "download claude code", "get latest claude code", "npm pack claude code", or needs to set up a new Claude Code version in ~/swe/archive with prettified cli.js and git history. |
Claude Code Archiver
Archive Claude Code npm packages with prettified source and git tracking.
Quick Reference
Archive locations:
- Archive:
~/swe/archive/claude-code-{version}/
- Production:
~/swe/claude-code-{version}/
- Tarballs kept:
~/swe/archive/anthropic-ai-claude-code-{version}.tgz
First commit message: Sotola: Pristine from Anthropic
Workflow
1. Download and Archive
cd ~/swe/archive
npm pack @anthropic-ai/claude-code
tar -xzf anthropic-ai-claude-code-X.Y.Z.tgz
mv package claude-code-X.Y.Z
cd claude-code-X.Y.Z
npx prettier --write --tab-width 2 --use-tabs false --print-width 80 cli.js
git init && git add -A
git commit -m "Sotola: Pristine from Anthropic"
2. Clone to Production
git clone ~/swe/archive/claude-code-X.Y.Z ~/swe/claude-code-X.Y.Z
Scripts
Two helper scripts in scripts/:
- archive-claude-code.sh - Downloads latest, extracts, prettifies, commits
- clone-to-production.sh VERSION - Clones archived version to ~/swe/
Notes
- Prettification expands cli.js from ~11MB to ~16MB (formatting adds whitespace)
- Keep .tgz files in archive for reference
- Production clones track the archive as origin remote