rait-09_obsidian-agent-client/docs/agent-setup/claude-code.md
RAIT-09 8bbe40a2a3 Add VitePress documentation site for Agent Client
Introduces a full documentation site under docs/ using VitePress, including configuration, custom theme, setup guides for supported agents (Claude Code, Codex, Gemini CLI, custom agents), usage instructions, FAQ, troubleshooting, and images. Updates .gitignore and .prettierignore to exclude VitePress build output and docs. Also updates package.json and eslint config for documentation support.
2025-12-14 01:53:46 +09:00

82 lines
2 KiB
Markdown

# Claude Code Setup
Claude Code is Anthropic's AI coding assistant. You can use it with either an **API key** or by **logging in with your Anthropic account**.
## Install and Configure
1. Install claude-code-acp:
```bash
npm install -g @zed-industries/claude-code-acp
```
2. Find the installation path:
::: code-group
```bash [macOS/Linux]
which claude-code-acp
# Example output: /usr/local/bin/claude-code-acp
```
```cmd [Windows]
where.exe claude-code-acp
# Example output: C:\Users\Username\AppData\Roaming\npm\claude-code-acp.cmd
```
:::
3. Open **Settings → Agent Client** and set the **Claude Code path** to the path found above.
## Authentication
Choose one of the following methods:
### Option A: API Key
1. Get your API key from [Anthropic Console](https://console.anthropic.com/)
2. Enter the API key in **Settings → Agent Client → Claude Code → API key**
### Option B: Account Login
If you have a Claude subscription and prefer not to use an API key, you can log in with your Anthropic account.
::: warning Important
This requires installing **Claude Code CLI** separately. The CLI creates the login session that the plugin uses.
:::
1. Install Claude Code CLI:
::: code-group
```bash [macOS/Linux]
curl -fsSL https://claude.ai/install.sh | bash
```
```powershell [Windows]
irm https://claude.ai/install.ps1 | iex
```
:::
2. Login via CLI:
```bash
claude
```
Follow the prompts to authenticate with your Anthropic account.
3. In **Settings → Agent Client**, leave the **API key field empty**.
::: tip
The Claude Desktop app uses a different authentication system. Having Claude Desktop running does **not** authenticate the plugin — you must log in via the CLI.
:::
## Verify Setup
1. Click the robot icon in the ribbon or use the command palette: **"Open agent chat"**
2. You should see the chat panel open and connect to Claude Code
3. Try sending a message to verify the connection
Having issues? See [Troubleshooting](/help/troubleshooting).