You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/providers/claude-code.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ sidebar_label: Claude Code
4
4
5
5
# Claude Code Provider
6
6
7
+
The Claude Code provider allows you to use Anthropic's Claude models through their official CLI (Command Line Interface) instead of the web API. This provides direct access to your Claude Max subscription right from Roo Code.
8
+
7
9
:::info Setup Instructions
8
10
Before using the Claude Code provider, ensure you have completed the following steps:
9
11
@@ -18,12 +20,11 @@ Before using the Claude Code provider, ensure you have completed the following s
18
20
Once configured, Roo Code will use your local Claude CLI installation to interact with Anthropic's models, leveraging your existing subscription.
19
21
:::
20
22
21
-
The Claude Code provider allows you to use Anthropic's Claude models through their official CLI (Command Line Interface) instead of the web API. This provides direct access to your Claude Max subscription right from Roo Code.
22
23
23
-
:::warning API Key Precedence
24
-
The Claude Code provider executes the `claude` command-line tool, which is built on Anthropic's official SDKs. These SDKs are designed to automatically use the `ANTHROPIC_API_KEY` environment variable for authentication if it is set.
24
+
:::warning Environment Variable Usage
25
+
The `claude` command-line tool, like other AnthropicSDKs, can use the `ANTHROPIC_API_KEY` environment variable for authentication. This is a common method for authorizing CLI tools in non-interactive environments.
25
26
26
-
If you have this environment variable defined, it will take precedence over the CLI's internal login (`/login`). Roo Code will reflect that an API key is being used, which is the expected behavior of the underlying `claude`tool.
27
+
If this environment variable is set on your system, the `claude` tool may use it for authentication instead of the interactive `/login` method. When Roo Code executes the tool, it will accurately reflect that an API key is being used, as this is the underlying behavior of the `claude`CLI itself.
@@ -92,8 +93,8 @@ The specific models available depend on your Claude CLI subscription and plan.
92
93
## Common Questions
93
94
94
95
**"Do I need a Claude API key for this provider?"**
95
-
-No, the primary authentication method is the CLI's built-in `/login` command.
96
-
- However, if the `ANTHROPIC_API_KEY` environment variable is set in your system, the Claude CLI will use it for authentication, and it will take precedence.
96
+
-Typically no. You can authenticate interactively using the `/login` command within the `claude` application.
97
+
- However, if the `ANTHROPIC_API_KEY` environment variable is set, the Claude CLI may use it for authentication. See the warning above for details.
97
98
98
99
**"How do I install the Claude CLI?"**
99
100
- Visit [Anthropic's CLI documentation](https://docs.anthropic.com/en/docs/claude-code/setup) for installation instructions
0 commit comments