Cross-platform CLI wrapper for Claude Code with named environment profiles, arg passthrough, and zero config friction.
Switch between Claude environments — local proxies, OpenRouter, AWS Bedrock, Google Vertex AI — with a single command instead of exporting env vars every time.
# Before cc-wrapper
ANTHROPIC_BASE_URL=http://localhost:8787 ANTHROPIC_AUTH_TOKEN=my-token claude
# After cc-wrapper
cc-wrapper claude- Features
- Requirements
- Installation
- Quick Start
- Commands
- Configuration
- Supported Environment Variables
- Security
- Contributing
- License
- Named profiles — save multiple Claude environments (local, openrouter, vertex, bedrock, etc.)
- Interactive setup — searchable env var selector with descriptions and example values
- Auto
--dangerously-skip-permissions— injected by default, disable with--dd - Full arg passthrough — all extra args forwarded to
claudeunchanged - Cross-platform — Windows, macOS, Linux; config stored at correct OS path automatically
- Secret masking — API keys and tokens masked in all log output
- Live sync — fetch latest Claude env vars from official docs with
npm run sync-envs
- Node.js >= 20
- Claude Code CLI installed and accessible as
claudein PATH
npm install -g cc-wrapperVerify:
cc-wrapper --version
cc-wrapper --help1. Create your first profile:
cc-wrapper newYou will be prompted for:
- Profile name (e.g.
local,openrouter,vertex) - Which Claude env vars to set (searchable, numbered list with descriptions)
- Value for each selected env var (with examples shown inline)
- Default extra args to pass to
claude
2. Run Claude with the profile:
cc-wrapper claudeCreate a new named profile interactively.
cc-wrapper newFlow:
- Enter profile name
- Multi-select env vars from numbered list (SPACE to toggle, ENTER to confirm)
- Enter value for each selected var (example shown inline)
- Enter default claude args
- Profile saved — set as default if it's the first one
List all saved profiles. Default profile is highlighted.
cc-wrapper list● local (default)
○ openrouter
○ vertex
Set the default profile used by cc-wrapper claude.
cc-wrapper default openrouterInteractively edit an existing profile. Current values are pre-filled and masked.
cc-wrapper edit localDelete a profile (confirmation prompt required).
cc-wrapper delete vertexIf the deleted profile was the default, the next available profile becomes the new default automatically.
Display all env vars and args stored in a profile. Secret values (keys, tokens, passwords) are masked.
cc-wrapper show localOutput example:
cc-wrapper › local (default)
env:
ANTHROPIC_BASE_URL http://localhost:8787
ANTHROPIC_API_KEY sk-a*****
args: --dangerously-skip-permissions
Launch claude with the default profile's environment variables injected.
cc-wrapper claudePass extra args directly to claude:
cc-wrapper claude --print "explain this codebase"
cc-wrapper claude --model claude-opus-4-7-20250514
cc-wrapper claude --no-streamDisable automatic --dangerously-skip-permissions injection:
cc-wrapper claude --ddUse a specific profile instead of default:
cc-wrapper claude --profile openrouter
cc-wrapper claude -p vertex --print "hello"Config is stored as a single JSON file at the OS-appropriate path:
| OS | Path |
|---|---|
| Linux | ~/.config/cc-wrapper/config.json |
| macOS | ~/Library/Preferences/cc-wrapper/config.json |
| Windows | %APPDATA%\cc-wrapper\config.json |
{
"default": "local",
"configs": {
"local": {
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:8787",
"ANTHROPIC_AUTH_TOKEN": "my-token"
},
"args": []
},
"openrouter": {
"env": {
"ANTHROPIC_BASE_URL": "https://openrouter.ai/api/v1",
"ANTHROPIC_API_KEY": "sk-or-..."
},
"args": ["--model", "anthropic/claude-opus-4"]
},
"vertex": {
"env": {
"CLAUDE_CODE_USE_VERTEX": "1",
"ANTHROPIC_VERTEX_PROJECT_ID": "my-gcp-project",
"CLOUD_ML_REGION": "us-central1"
},
"args": []
}
}
}You can edit this file directly or use cc-wrapper edit <name>.
cc-wrapper supports all official Claude Code environment variables. The list is stored in src/data/env-vars.json and can be refreshed from the official docs:
npm run sync-envsKey variables include:
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Anthropic API key |
ANTHROPIC_BASE_URL |
Custom API base URL (local proxy, OpenRouter, etc.) |
ANTHROPIC_AUTH_TOKEN |
Bearer token for custom auth |
ANTHROPIC_MODEL |
Override default model |
CLAUDE_CODE_USE_VERTEX |
Use Google Vertex AI |
CLAUDE_CODE_USE_BEDROCK |
Use AWS Bedrock |
AWS_REGION |
AWS region for Bedrock |
CLOUD_ML_REGION |
GCP region for Vertex |
HTTP_PROXY / HTTPS_PROXY |
Proxy settings |
CLAUDE_CODE_MAX_OUTPUT_TOKENS |
Override max output tokens |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC |
Disable telemetry |
Full list: run cc-wrapper new and browse the interactive selector.
- API keys and tokens are never printed in logs — always masked (e.g.
sk-a*****) - Config file lives in your user data directory, not in project folders
- No values are sent anywhere other than the
claudeprocess environment
git clone https://github.com/aminechraibi/cc-wrapper
cd cc-wrapper
npm install
npm test
npm run buildRefresh Claude env var list from official docs:
npm run sync-envsMIT — Amine Chraibi