mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
- Set up VitePress with bilingual support (Chinese root + English /en/) - Create unified sidebar navigation with all doc sections - Add custom Anthropic brand theme (#D97757) - Create Quick Start pages (zh/en) from README content - Migrate 7 .en.md files to docs/en/ directory structure - Translate memory/agent/skills docs to English (9 files) - Generate English-only architecture diagrams (11 images via PicTactic) - Copy English-ready images for agent/skills sections (21 images) - Configure custom domain (claudecodehaha.relakkesyang.org) - Localize Chinese UI labels (sidebar, outline, footer) - Add documentation site badge to READMEs - Fix dead links and update cross-references for VitePress Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
62 lines
2.1 KiB
Markdown
62 lines
2.1 KiB
Markdown
# Environment Variables
|
|
|
|
|
|
| Variable | Required | Description |
|
|
|------|------|------|
|
|
| `ANTHROPIC_API_KEY` | One of two | API key sent via the `x-api-key` header |
|
|
| `ANTHROPIC_AUTH_TOKEN` | One of two | Auth token sent via the `Authorization: Bearer` header |
|
|
| `ANTHROPIC_BASE_URL` | No | Custom API endpoint, defaults to Anthropic |
|
|
| `ANTHROPIC_MODEL` | No | Default model |
|
|
| `ANTHROPIC_DEFAULT_SONNET_MODEL` | No | Sonnet-tier model mapping |
|
|
| `ANTHROPIC_DEFAULT_HAIKU_MODEL` | No | Haiku-tier model mapping |
|
|
| `ANTHROPIC_DEFAULT_OPUS_MODEL` | No | Opus-tier model mapping |
|
|
| `API_TIMEOUT_MS` | No | API request timeout, default `600000` (10min) |
|
|
| `DISABLE_TELEMETRY` | No | Set to `1` to disable telemetry |
|
|
| `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | No | Set to `1` to disable non-essential network traffic |
|
|
|
|
## Configuration Methods
|
|
|
|
### Option 1: `.env` File
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
|
|
Edit `.env` (the example below uses [MiniMax](https://platform.minimaxi.com/subscribe/token-plan?code=1TG2Cseab2&source=link) as the API provider — you can replace it with any compatible service):
|
|
|
|
```env
|
|
# API authentication (choose one)
|
|
ANTHROPIC_API_KEY=sk-xxx # Standard API key via x-api-key header
|
|
ANTHROPIC_AUTH_TOKEN=sk-xxx # Bearer token via Authorization header
|
|
|
|
# API endpoint (optional, defaults to Anthropic)
|
|
ANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic
|
|
|
|
# Model configuration
|
|
ANTHROPIC_MODEL=MiniMax-M2.7-highspeed
|
|
ANTHROPIC_DEFAULT_SONNET_MODEL=MiniMax-M2.7-highspeed
|
|
ANTHROPIC_DEFAULT_HAIKU_MODEL=MiniMax-M2.7-highspeed
|
|
ANTHROPIC_DEFAULT_OPUS_MODEL=MiniMax-M2.7-highspeed
|
|
|
|
# Timeout in milliseconds
|
|
API_TIMEOUT_MS=3000000
|
|
|
|
# Disable telemetry and non-essential network traffic
|
|
DISABLE_TELEMETRY=1
|
|
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
|
|
```
|
|
|
|
### Option 2: `~/.claude/settings.json`
|
|
|
|
```json
|
|
{
|
|
"env": {
|
|
"ANTHROPIC_AUTH_TOKEN": "sk-xxx",
|
|
"ANTHROPIC_BASE_URL": "https://api.minimaxi.com/anthropic",
|
|
"ANTHROPIC_MODEL": "MiniMax-M2.7-highspeed"
|
|
}
|
|
}
|
|
```
|
|
|
|
> Priority: Environment variables > `.env` file > `~/.claude/settings.json`
|