npm install -g @anthropic-ai/claude-code
claude migrate-installer
(もしくはスラッシュコマンド/migrate-installer
をClaude Code上で打って、何回かの確認をエンター押してもできる)
※homebrewで権限があれっぽい?
ビフォア
Claude CLI Diagnostic
Currently running: npm-global (1.0.65)
Path: /opt/homebrew/Cellar/node/24.2.0/bin/node
Invoked: /opt/homebrew/bin/claude
Config install method: local
Auto-updates enabled: true
Update permissions: No (requires sudo)
Warning: Insufficient permissions for auto-updates
Fix: Run: sudo chown -R $USER:$(id -gn) $(npm -g config
get prefix)or use `claude migrate-installer` to migrate to
local installation
アフター
Diagnostics
└ Currently running: npm-local (1.0.93)
└ Path: /opt/homebrew/Cellar/node/24.2.0/bin/node
└ Invoked: /Users/myname/.claude/local/node_modules
/.bin/claude
└ Config install method: local
└ Auto-updates enabled: true
└ Search: OK (vendor)
Warning: Insufficient permissions for auto-updates
Fix: Run: sudo chown -R $USER:$(id -gn) $(npm -g config get prefix)or use
claude migrate-installer
to migrate to local installation
Migrate from global npm installation to
local installation
npm install -g @anthropic-ai/claude-code
Warning: Insufficient permissions for auto-updates
npm install -g @anthropic-ai/claude-code