Skip to content

docs: Update Claude Code installation method from npm to native installer - #426

Closed
keito4 wants to merge 1 commit into
mainfrom
claude/issue-422-20260202-0900
Closed

docs: Update Claude Code installation method from npm to native installer#426
keito4 wants to merge 1 commit into
mainfrom
claude/issue-422-20260202-0900

Conversation

@keito4

@keito4 keito4 commented Feb 2, 2026

Copy link
Copy Markdown
Owner

Summary

Claude Code has switched from npm to native installer. This PR updates all related scripts and documentation to reflect this change.

Changes

Scripts

  • script/update-claude-code.sh: Replaced npm-based version management with claude update command
    • Now uses claude --version to check current version
    • Uses claude update to perform updates
    • Removed npm and jq dependencies

Commands

  • .claude/commands/update-claude-code.md: Updated documentation to reflect native installer usage
    • Simplified implementation (no longer needs npm/global.json manipulation)
    • Added installation reference link

Documentation

  • README.md: Updated multiple sections:
    • "Update Claude Code Only": Added note about native installer
    • "Update All Libraries": Clarified that Claude Code is now managed separately
    • "Commit Requirements": Noted that npm/global.json now only tracks Codex
    • "Global CLI version source of truth": Split Codex and Claude Code management

Background

The following message is now displayed when using npm-based Claude Code:

Claude Code has switched from npm to native installer.
Run `claude install` or see https://docs.anthropic.com/en/docs/claude-code/getting-started for more options.

Testing

  • Verified script changes follow the new installation method
  • Updated all documentation references
  • Confirmed no other scripts depend on npm-based Claude Code installation

Related Issue

Closes #422


🤖 Generated with Claude Code

…ller

Claude Code has switched from npm to native installer.
Updated related scripts and documentation to reflect this change.

Changes:
- script/update-claude-code.sh: Use 'claude update' instead of npm
- .claude/commands/update-claude-code.md: Update documentation
- README.md: Update all references to Claude Code installation/update

Co-authored-by: keito4 <keito4@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Feb 2, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@keito4 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 21 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-422-20260202-0900

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@keito4 keito4 closed this Feb 2, 2026
@claude

claude Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

PR レビュー: Claude Code インストール方法の npm からネイティブインストーラーへの移行

概要

このPRは、Claude Code のインストール方法を npm ベースからネイティブインストーラーへ移行する対応です。全体的に適切な変更ですが、いくつかの重要な問題と改善点があります。


🔴 Critical Issues(マージ前に対応必須)

1. npm/global.json から @anthropic-ai/claude-code エントリを削除すべき

現状の問題:

  • README.md では「npm/global.json now only tracks @openai/codex versions」と記載
  • しかし実際には npm/global.json:4-7@anthropic-ai/claude-code が残存
  • .devcontainer/Dockerfile:68-75,78 で npm インストールに使用されている

影響範囲:

  • DevContainer のビルド時に npm 経由で古いバージョンがインストールされ続ける
  • ドキュメントと実装が不一致

推奨対応:

# npm/global.json から @anthropic-ai/claude-code エントリを削除
# .devcontainer/Dockerfile:68-75,78 から関連する処理を削除

2. script/update-libraries.sh の Claude Code 参照を削除

問題箇所:

  • script/update-libraries.sh:89-95 で Claude Code のバージョンを表示している
  • このスクリプトは npm パッケージの更新を目的としており、ネイティブインストーラーとは無関係

推奨対応:

# 該当セクションを削除するか、Codex のバージョン表示に変更

3. script/container-health.sh の推奨メッセージを更新

問題箇所:

  • script/container-health.sh:134 で npm インストールを推奨している
    RECOMMENDATIONS+=("Install Claude Code: npm install -g @anthropic-ai/claude-code")

推奨対応:

RECOMMENDATIONS+=("Install Claude Code: claude install (see https://docs.anthropic.com/en/docs/claude-code/getting-started)")

⚠️ Important Issues(早期対応推奨)

4. .claude/devcontainer-recommendations.md の記述を更新

問題箇所:

  • .claude/devcontainer-recommendations.md:32 に「config-baseイメージには@anthropic-ai/claude-code CLIが既にインストール済み」と記載
  • npm ベースのインストールを前提とした表現

推奨対応:

  • ネイティブインストーラーに基づいた記述に更新

5. .claude/commands/repo-maintenance.md の確認

要確認:

  • このファイルに @anthropic-ai/claude-code への参照があるか確認
  • あれば適切に更新

💡 Suggestions(改善提案)

6. エラーハンドリングの強化(script/update-claude-code.sh

改善案:

# script/update-claude-code.sh:32
# 現在: バージョン抽出失敗時に "unknown" を返す
# 提案: エラーメッセージをより具体的に

if ! current_version=$(claude --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'); then
    log_error "Claude CLI のバージョン取得に失敗しました"
    log_info "Claude がインストールされているか確認してください: claude --version"
    exit 1
fi

7. コミットタイプの検討

現状:

  • コミットタイプ: docs:

考察:

  • CLAUDE.md に「Commits that touch release-critical files (package*.json, npm/global.json, .devcontainer/codex*, .codex/**) must use a release-triggering Conventional Commit type」との記載
  • npm/global.json の変更は含まれていないため、docs: で問題なし ✅

✅ Good Points(良い点)

  1. 包括的な変更: スクリプト、ドキュメント、コマンド定義すべてを更新
  2. シンプル化: npm と jq への依存を削減し、ネイティブコマンドのみで完結
  3. 明確な移行パス: ユーザー向けの情報とリンクを適切に提供
  4. 適切なテスト: PR 説明に検証項目を記載

📋 推奨対応順序

  1. 最優先: npm/global.json.devcontainer/Dockerfile の修正(Critical Issue Apply repository hygiene fixes #1
  2. 次: script/update-libraries.shscript/container-health.sh の修正(Critical Issue Add reusable devcontainer setup #2, Add Docker image build workflow #3
  3. その後: ドキュメント類の更新(Important Issues Fix Docker build context and paths #4, 1Passwordが適切に動くようにする #5
  4. 任意: エラーハンドリングの強化(Suggestion LICENSEファイルに著作権者情報を追加 #6

🔍 レビュー結果サマリー

カテゴリ 件数 状態
Critical Issues 3 🔴 対応必須
Important Issues 2 ⚠️ 推奨
Suggestions 2 💡 任意

総合評価: 適切な方向性だが、マージ前に Critical Issues の対応が必要


🤖 Generated with Claude Code

@keito4
keito4 deleted the claude/issue-422-20260202-0900 branch March 1, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Update Claude Code installation method from npm to native installer

1 participant