- Reset master to upstream/main (16,697 commits) - Overlay 2,271 local-only files (skills, tools, workspace, configs, apps) - Restore IDENTITY.md and USER.md templates - Build verified, gateway running, Discord working Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.9 KiB
Quick Start: Using Claude Code Subscription
This guide shows you how to use your Claude.ai subscription with OpenClaw instead of paying for API calls.
Why Use Claude Code Subscription?
- No API costs: Use your existing Claude Pro subscription
- Same capabilities: Full access to Claude Opus 4.6, Sonnet 4.5, and Haiku 4.5
- Simple setup: Just install the CLI and authenticate
- All features: Works with all OpenClaw channels and features
Setup (5 minutes)
Step 1: Install Claude Code CLI
Choose your preferred installation method:
Option A: Install script (recommended)
curl -fsSL https://claude.ai/install.sh | sh
Option B: npm
npm install -g @anthropic-ai/claude-code
Option C: Homebrew (macOS)
brew install anthropics/tap/claude
Step 2: Authenticate
claude login
This will open your browser to authenticate with Claude.ai.
Step 3: Configure OpenClaw
Run the interactive configuration wizard:
openclaw configure --section model
When prompted:
- Select Anthropic
- Choose Claude Code subscription (recommended)
- Select your preferred primary model (Sonnet recommended)
- Optionally select fallback models
That's it! OpenClaw is now configured to use your subscription.
Quick Test
Send a test message:
openclaw message send "Hello! This message uses my Claude subscription."
You should see a response using your subscription instead of API calls.
What's Next?
-
Set up channels: Link WhatsApp, Telegram, or other messaging platforms
openclaw configure --section channels -
Configure gateway: Set up remote access
openclaw configure --section gateway -
Check status: View your configuration
openclaw models list openclaw channels status
Manual Configuration
If you prefer to edit the config file directly:
# ~/.openclaw/config.yaml
agents:
defaults:
# Register models (required)
models:
claude-cli/opus: {}
claude-cli/sonnet: {}
claude-cli/haiku: {}
# Set primary and fallbacks
model:
primary: claude-cli/sonnet
fallbacks:
- claude-cli/opus
- claude-cli/haiku
Available Models
When using claude-cli provider:
| Model ID | Description | Best For |
|---|---|---|
claude-cli/opus |
Claude Opus 4.6 | Complex tasks, analysis |
claude-cli/sonnet |
Claude Sonnet 4.5 | Balanced performance |
claude-cli/haiku |
Claude Haiku 4.5 | Fast, simple tasks |
Switching Between Subscription and API
You can use both subscription and API models:
agents:
defaults:
# Register both CLI and API models
models:
claude-cli/opus: {}
claude-cli/sonnet: {}
anthropic/claude-opus-4-6: {}
model:
primary: claude-cli/sonnet # Use subscription first
fallbacks:
- anthropic/claude-opus-4-6 # Fall back to API if needed
Troubleshooting
"claude: command not found"
The CLI isn't installed or not in PATH. Reinstall:
curl -fsSL https://claude.ai/install.sh | sh
"Not authenticated"
Run authentication again:
claude login
"Command failed"
Check your Claude CLI status:
claude whoami
claude --version
Cost Comparison
With API (pay-per-token):
- Opus 4.6: $60/million output tokens
- Sonnet 4.5: $15/million output tokens
- Haiku 4.5: $5/million output tokens
With Subscription (fixed monthly cost):
- Unlimited usage within subscription limits
- No per-request costs
- Ideal for development and personal use