はじめに
VScodeにClaude Codeのプラグインが追加されました。
このプラグインはClaude Codeをインストールする必要があります。
Claude Codeをインストールしてみましたので手順をまとめました。
▪︎Claude Code for VSCode
前提条件
- Claudeの有料プラン(PRO/MAX)を契約していること
- Nodeをインストールしていること
インストール手順
1. Claude Codeのインストール
まずはnpmでClaude Codeをグローバルインストールします
npm install -g @anthropic-ai/claude-code
2. 認証方法の選択
インストール後、Claude Codeを起動すると課金方法を選択する画面が表示されます。
Claude Code can now be used with your Claude
subscription or billed based on API usage through your
Console account.
Select login method:
❯ 1. Claude account with subscription
Starting at $20/mo for Pro, $100/mo for Max - Best
value, predictable pricing
2. Anthropic Console account
API usage billing
今回は1. Claude account with subscriptionを選択しました。
3. ブラウザでの認証
認証用のURLが表示されるので、ブラウザでClaudeにサインインします
Browser didn't open? Use the url below to sign in:
https://claude.ai/oauth/authorize?code=true&client_id=xxx
Logged in as xxx123@example.com
Login successful. Press Enter to continue…
4. ターミナル設定
最適な開発体験のため、推奨設定を使用するか選択できます
Use Claude Code's terminal setup?
For the optimal coding experience, enable the recommended settings
for your terminal: Shift+Enter for newlines
❯ 1. Yes, use recommended settings
2. No, maybe later with /terminal-setup
Enter to confirm · Esc to skip
今回は1. Yes, use recommended settings(推奨設定)を選択しました。
5. フォルダアクセス許可
セキュリティ確認として、Claudeがフォルダ内のファイルを参照することに同意するか聞かれます
╭───────────────────────────────────────────────────────╮
│ │
│ Do you trust the files in this folder? │
│ │
│ /Users/xxx/xxx │
│ │
│ Claude Code may read files in this folder. Reading │
│ untrusted files may lead Claude Code to behave in │
│ unexpected ways. │
│ │
│ With your permission Claude Code may execute files in │
│ this folder. Executing untrusted code is unsafe. │
│ │
│ https://docs.anthropic.com/s/claude-code-security │
│ │
│ ❯ 1. Yes, proceed │
│ 2. No, exit │
│ │
╰───────────────────────────────────────────────────────╯
Enter to confirm · Esc to exit
信頼できるプロジェクトフォルダであることを確認してYes, proceedを選択します。
6. セットアップ完了!
以下の画面が表示されれば、セットアップ完了です!
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code! │
│ │
│ /help for help, /status for your current setup │
│ │
│ cwd: /Users/xxx/xxx │
╰───────────────────────────────────────────────────╯
Tips for getting started:
1. Run /init to create a CLAUDE.md file with instructions
for Claude
2. Use Claude to help with file analysis, editing, bash
commands and git
3. Be as specific as you would with another engineer for
the best results
4. ✔ Run /terminal-setup to set up terminal integration
※ Tip: Cmd+Escape to launch Claude in your IDE
╭───────────────────────────────────────────────────────╮
│ > Try "how does <filepath> work?" │
╰───────────────────────────────────────────────────────╯
? for shortcuts ◯
使い始めのコツ
セットアップが完了したら、以下のコマンドで使い始めましょう:
-
/init
- プロジェクト用のCLAUDE.mdファイルを作成 -
/help
- 利用可能なコマンド一覧を表示 -
/status
- 現在の設定状況を確認
具体的な質問をする際は、他のエンジニアに依頼するときと同じように詳細に説明するのがコツです。