Skip to content

Commit 9c50bc4

Browse files
committed
docs: Clarify API key usage and setup instructions for Claude Code provider
1 parent bfc92bf commit 9c50bc4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/providers/claude-code.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar_label: Claude Code
44

55
# Claude Code Provider
66

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+
79
:::info Setup Instructions
810
Before using the Claude Code provider, ensure you have completed the following steps:
911

@@ -18,12 +20,11 @@ Before using the Claude Code provider, ensure you have completed the following s
1820
Once configured, Roo Code will use your local Claude CLI installation to interact with Anthropic's models, leveraging your existing subscription.
1921
:::
2022

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.
2223

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 Anthropic SDKs, can use the `ANTHROPIC_API_KEY` environment variable for authentication. This is a common method for authorizing CLI tools in non-interactive environments.
2526

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.
2728
:::
2829

2930
**Website:** [https://docs.anthropic.com/en/docs/claude-code/setup](https://docs.anthropic.com/en/docs/claude-code/setup)
@@ -92,8 +93,8 @@ The specific models available depend on your Claude CLI subscription and plan.
9293
## Common Questions
9394

9495
**"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.
9798

9899
**"How do I install the Claude CLI?"**
99100
- Visit [Anthropic's CLI documentation](https://docs.anthropic.com/en/docs/claude-code/setup) for installation instructions

0 commit comments

Comments
 (0)