claude-code.mdx 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ---
  2. title: "Claude Code"
  3. description: "Use your Claude Max or Pro subscription with Cline instead of paying per token. Learn how to set up and configure the Claude Code provider."
  4. ---
  5. **Website:** [https://docs.anthropic.com/en/docs/claude-code/setup](https://docs.anthropic.com/en/docs/claude-code/setup)
  6. The Claude Code provider lets you use your existing Claude subscription with Cline. If you have Claude Max or Pro, this means you can use Claude in Cline without paying extra API costs.
  7. <Frame>
  8. <img
  9. src="https://storage.googleapis.com/cline_public_images/docs/assets/claude-code-use-opus.gif"
  10. alt="Using the Claude Code provider in Cline with Opus model"
  11. />
  12. </Frame>
  13. ## Setup
  14. First, you'll need to install and authenticate Claude Code on your system:
  15. 1. **Install Claude Code**: Follow Anthropic's [official setup guide](https://docs.anthropic.com/en/docs/claude-code/setup) to install and authenticate the Claude CLI.
  16. 2. **Configure in Cline**:
  17. - Open Cline settings (⚙️ icon)
  18. - Select **Claude Code** from the **API Provider** dropdown
  19. - Set the path to your Claude CLI executable (usually just `claude` if it's in your PATH)
  20. <Frame>
  21. <img
  22. src="https://storage.googleapis.com/cline_public_images/docs/assets/claude-code-setup.gif"
  23. alt="Setting up the Claude Code provider in Cline"
  24. />
  25. </Frame>
  26. <br />
  27. ### Finding your Claude Code path
  28. - **macOS / Linux / WSL / Git Bash**: `which claude`
  29. - **Windows Command Prompt**: `where claude`
  30. ## Supported Models
  31. The Claude Code provider supports these models:
  32. - `claude-sonnet-4-20250514` (Recommended)
  33. - `claude-opus-4-1-20250805`
  34. - `claude-opus-4-20250514`
  35. - `claude-3-7-sonnet-20250219`
  36. - `claude-3-5-sonnet-20241022`
  37. - `claude-3-5-haiku-20241022`
  38. ## How it works
  39. When you use Claude Code with Cline, here's what happens behind the scenes:
  40. Cline wraps the Claude Code CLI to handle your requests. Each time you send a message, Cline starts a new `claude` process, sends your conversation, and streams the response back. The AI reasoning comes from Claude Code, but all the actual file editing, terminal commands, and other tools are handled by Cline.
  41. The main difference you'll notice is that responses don't stream character-by-character like other providers. Instead, Claude Code processes your full request before sending back the complete response.
  42. ## Limitations
  43. There are a few things to keep in mind with Claude Code:
  44. - Images in your messages get converted to text placeholders since Claude Code doesn't support image uploads through the CLI
  45. - Prompt caching isn't available with this provider
  46. - Responses don't stream in real-time like other providers
  47. ## Troubleshooting
  48. If you run into issues:
  49. **Authentication problems**: Make sure you're logged into Claude Code with your subscription account. Run `claude auth status` to check.
  50. **Path issues**: Double-check that the Claude CLI path in Cline's settings is correct. Try running `claude --version` in your terminal to verify it's working.
  51. **Still having trouble?** We're actively improving this integration. Report issues on our [GitHub](https://github.com/cline/cline/issues) or ask for help in our [Discord](https://discord.gg/cline).
  52. ## Usage with subscriptions
  53. If you have a Claude Max subscription, your usage in Cline shows up as $0.00 in the billing interface since you're not paying additional API costs. Your usage still counts against your subscription limits, but you won't see per-token charges.
  54. For more details about using Claude Code with your subscription, check out Anthropic's documentation:
  55. - [Claude Code Setup Guide](https://docs.anthropic.com/en/docs/claude-code/setup)
  56. - [Using Claude Code with Pro/Max Plans](https://support.anthropic.com/en/articles/11145838-using-claude-code-with-your-pro-or-max-plan)