インストール • Before/After • ベンチマーク • English • 한국어 • 日本語 • 中文 • Español • Português • हिन्दी • Français • Deutsch • Русский • Türkçe • Tiếng Việt
30行のnode_modulesスタックトレース → 3行
150行のnpm deprecatedの警告 → 3行
50行のDockerビルドハッシュ → 1行
ANSIカラー、スピナー、プログレスバー → 削除
npx contextzipClaude Codeを再起動。すべてのコマンドが自動圧縮される。設定不要。
macOS · Linux · Windows
他のインストール方法
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/jee599/contextzip/main/install.sh | bash
brew install jee599/tap/contextzip
# Windows (PowerShell)
npx contextzip
# Rust開発者
cargo install --git https://github.com/jee599/contextzip|
❌ Before |
✅ After |
|
❌ Before |
✅ After |
|
❌ Before |
✅ After |
|
❌ Before |
✅ After |
|
❌ Before |
✅ After |
|
❌ Before |
✅ After |
|
❌ Before (curl出力) |
✅ After |
|
❌ Before (raw terminal) |
✅ After |
🐳 Docker失敗 — コンテキスト保持
✗ Docker build failed at step 7/12
Step 5/12 : COPY package*.json ./ (cached ✓)
Step 6/12 : RUN npm install (cached ✓)
Step 7/12 : RUN npm run build ← FAILED
error: Module not found: 'react-dom/client'
Exit code: 1
失敗ステップ + 前2ステップ + エラーメッセージ + 終了コード。常に。
☕ Java / 🐹 Goスタックトレース
Java — java.lang.reflect、sun.reflect、org.springframework、org.apache、jdk.internalを除去:
- java.lang.NullPointerException: Cannot invoke method on null
- at com.myapp.UserService.getUser(UserService.java:42)
- at com.myapp.Controller.handle(Controller.java:15)
- at java.lang.reflect.Method.invoke(Method.java:498)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(...)
- at org.springframework.web.servlet.FrameworkServlet.service(...)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(...)
+ java.lang.NullPointerException: Cannot invoke method on null
+ at com.myapp.UserService.getUser(UserService.java:42)
+ at com.myapp.Controller.handle(Controller.java:15)
+ (+ 4 framework frames hidden)Go — runtime/、runtime.gopanic、runtime.mainを除去:
- goroutine 1 [running]:
- runtime/debug.Stack()
- /usr/local/go/src/runtime/debug/stack.go:24
- runtime.gopanic({0x1234, 0x5678})
- /usr/local/go/src/runtime/panic.go:884
- main.handler()
- /app/handler.go:42 +0x1a4
- main.main()
- /app/main.go:15 +0x58
+ goroutine 1 [running]:
+ (+ 2 framework frames hidden)
+ → main.handler() /app/handler.go:42
+ → main.main() /app/main.go:15
+ (+ 1 framework frames hidden)102件の実戦テスト。チェリーピッキングなし。
| カテゴリ | テスト | 平均削減 | 🏆 最高 | 💀 最低 |
|---|---|---|---|---|
| 🐳 Dockerビルド | 10 | 88% | 97% | 77% |
| 🎨 ANSI/スピナー | 15 | 83% | 98% | 0% |
| 💥 エラートレース | 20 | 59% | 97% | -12% |
| 🔨 ビルドエラー | 15 | 56% | 90% | -10% |
| 🌐 Webページ | 15 | 43% | 64% | 5% |
| 💻 CLIコマンド | 12 | 42% | 99% | -56% |
| 📦 パッケージインストール | 15 | 39% | 99% | 2% |
加重平均: 61%削減 → 326K chars in, 127K chars out
Note
マイナス = 出力が増加。極小入力で発生する。最低値も隠さず公開している。全ベンチマーク →
┌─────────────────────────────────────────────┐
│ Claude Code runs: git status │
│ ↓ │
│ Hook rewrites → contextzip git status │
│ ↓ │
│ ┌──────────────────────────────────────┐ │
│ │ [1] ANSI preprocessor strip junk │ │
│ │ [2] Command router 40+ filters │ │
│ │ [3] Error post-proc compress stack │ │
│ │ [4] SQLite tracker record savings │ │
│ └──────────────────────────────────────┘ │
│ ↓ │
│ Compressed output → Claude's context │
│ 💾 contextzip: 200 → 40 tokens (80%) │
└─────────────────────────────────────────────┘
RTK(28k⭐)ベース。RTKの全34コマンドを含む。さらに:
| RTK | ContextZip | |
|---|---|---|
| CLI圧縮 (git, test, ls) | ✅ | ✅ |
| エラースタックトレース (Node/Python/Rust/Go/Java) | ❌ | ✅ |
| Webページコンテンツ抽出 | ❌ | ✅ |
| ANSI / スピナー / デコレーション除去 | 🟡 | ✅ |
| ビルドエラーグルーピング (tsc/eslint/cargo) | 🟡 | ✅ |
| パッケージインストールノイズ (npm/pip/cargo) | ❌ | ✅ |
| Dockerビルド圧縮 | 🟡 | ✅ |
| コマンド別削減量表示 | ❌ | ✅ |
$ contextzip gain
📊 ContextZip Token Savings
════════════════════════════════════════
Total commands: 2,927
Tokens saved: 10.3M (89.2%)
Efficiency meter: █████████████████████░░░ 89%
$ contextzip gain --by-feature
Feature Commands Saved Avg%
cli (RTK) 2,100 6.8M 78%
error 89 1.2M 93%
web 43 0.9M 73%
build 112 0.4M 81%
pkg 34 0.3M 95%
docker 22 0.2M 85%
--graph 日別チャート • --history 最近のコマンド
| 🔴 エラーメッセージ | 常に保持 |
| 📍 ビルドエラーのファイル:行番号 | 絶対に除去しない |
| 🔒 セキュリティ警告 (CVE, GHSA) | 常に保持 |
| 🐳 Docker失敗コンテキスト | 常に保持 |
| ⏎ 終了コード | 常に伝播 |
Important
ContextZipは確認済みのノイズのみ除去する。判断に迷う場合、元の出力をそのまま通す。
# 自動(フックが変換 — プレフィックス不要):
git status npm install cargo test
docker build . pip install flask go test ./...
# 手動:
contextzip web https://docs.example.com # ページ → コンテンツのみ
contextzip err node server.js # エラー特化出力
# 分析:
contextzip gain # ダッシュボード
contextzip gain --by-feature # フィルター別統計
contextzip gain --graph # 日別チャート
contextzip gain --history # 最近のコマンド
# 管理:
contextzip init --show # セットアップ確認
contextzip update # セルフアップデート
contextzip uninstall # クリーンアンインストールgit clone https://github.com/jee599/contextzip.git && cd contextzip
cargo test # 1,056 tests
cargo clippy # lintContextZipは匿名の使用統計(コマンド数、削減率)を収集し、ツールの改善に活用する。個人情報やコマンド内容は送信しない。
無効化:
export CONTEXTZIP_TELEMETRY_DISABLED=1
# または ~/.config/contextzip/config.toml:
# [telemetry]
# enabled = falseMIT — RTK by rtk-aiのフォーク。
⚡ ノイズを減らし、コードに集中し、もっと速くシップ。