Claude Code のはじめ方

● Claude Code のインストール

npm install -g @anthropic-ai/claude-code

バージョンを確認する

claude --version
1.0.3 (Claude Code)

● Claude Codeの起動と基本コマンド

1. Claude Codeの起動

claude

// (  Do you trust the files in this folder? ) と聞かれるので Yes を選択して Enter

2. コストの確認

/cost

3. ProプランやMaxプランの場合に API ではなく Maxプラン内で使用する

(ProプランやMaxプラン以外方はAPIでの使用になります)
(2025/06/05 からProプラン内でも 定額課金内で使えるようになりました)

/logout
claude

(プラン選択から Claude account with subscription を選択するとProやMaxプラン内の定額課金内で使用できます。)

 ❯ 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

● Claude Code + GitHub Actions のインストール

claude

起動したら、次のコマンドでインストールします

/install-github-app

GitHub CLI が、インストールされていない場合は、次のメッセージが出ます

│ ⚠ Setup Warnings                                                                                                                                             │
│ We found some potential issues, but you can continue anyway                                                                                                  │
│                                                                                                                                                              │
│ GitHub CLI not found                                                                                                                                         │
│ GitHub CLI (gh) does not appear to be installed or accessible.                                                                                               │
│                                                                                                                                                              │
│   • Install GitHub CLI from https://cli.github.com/                                                                                                          │
│   • macOS: brew install gh                                                                                                                                   │
│   • Windows: winget install --id GitHub.cli                                                                                                                  │
│   • Linux: See installation instructions at https://github.com/cli/cli#installation                                                                          │
│                                                                                                                                                              │
│ GitHub CLI not authenticated                                                                                                                                 │
│ GitHub CLI does not appear to be authenticated.                                                                                                              │
│                                                                                                                                                              │
│   • Run: gh auth login                                                                                                                                       │
│   • Follow the prompts to authenticate with GitHub                                                                                                           │
│   • Or set up authentication using environment variables or other methods  

● GitHub CLI のインストール

brew install gh
gh version
gh version 2.73.0 (2025-05-19)
No.2612
06/06 09:10

edit