Claude Code CLIとは?
Claude Code CLI is an AI coding assistant tool available in the terminal. It centers on the AI model Claude and streamlines development tasks such as code creation, modification, refactoring, and running tests. Unlike existing tools like GitHub Copilot, the key feature is that you can operate it directly from the CLI in a local environment.
インストール方法
As of 2025, Claude Code CLI is distributed on the official site and GitHub repository. It can be installed with the steps below.
# macOS/Linux
curl -fsSL https://claude.ai/cli/install.sh | sh
# Windows (PowerShell)
iwr https://claude.ai/cli/install.ps1 -useb | iex
# Check version
devclaude --version
After installation, set the API key in your environment variables.
export CLAUDE_API_KEY="your_api_key_here"
Basic Commands
Claude Code CLI uses a simple command set and mainly the following commands:
| Command | Description |
|---|---|
| devclaude chat | Launch an interactive code-assistance chat |
| devclaude code <filename> | Modify or complete the specified file |
| devclaude analyze <project_path> | Understand and analyze the entire codebase |
| devclaude test <test_command> | Run tests and analyze results |
| devclaude git <operation> | Git branch creation and commit assistance |