Manage API keys, default providers, and global settings via environment variables or ~/.seek/config.json.
通过环境变量或 ~/.seek/config.json 管理 API 密钥、默认 provider 和其他全局设置。
From highest to lowest priority:
从高到低优先级:
DEEPSEEK_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY. Best for CI, secret managers, one-off invocations.DEEPSEEK_API_KEY、ANTHROPIC_API_KEY、OPENAI_API_KEY、GEMINI_API_KEY。适合 CI、secret manager、单次调用。~/.seek/config.json — written by the first-run wizard or hand-edited.~/.seek/config.json——由首次运行向导写入或手动编辑。{
"default_provider": "deepseek",
"providers": {
"deepseek": {
"api_key": "sk-..."
},
"anthropic": {
"api_key": "sk-ant-..."
}
}
}
| Field | 字段 | Type | 类型 | Description | 说明 |
|---|---|---|---|---|---|
default_provider | string | Default provider (deepseek / anthropic / openai / gemini). Empty = auto-detect. | 默认 provider,空字符串走自动检测。 | ||
providers | object | Per-provider credential config, keyed by provider name. | 各 provider 的凭证配置。 | ||
path_prompt_done | bool | Whether the "add to PATH" prompt has been shown (Windows). | Windows 上"添加到 PATH"提示是否已显示。 | ||
suggest_reply | *bool | Enable/disable suggested replies. Absent = enabled. | 启用/禁用建议回复。缺省 = 启用。 | ||
push_webhooks | array | Push notification webhook targets. | 推送通知 webhook 配置。 | ||
session_notify_seconds | *int | Interactive turn threshold for push notification. Default 60s, 0 = disabled. | 交互回合推送通知阈值秒数。缺省 60s,0 禁用。 |
| Provider | Provider | Env Variable | 环境变量 | Config Name | 配置名 |
|---|---|---|---|---|---|
| DeepSeek (default) | DEEPSEEK_API_KEY | deepseek | |||
| Anthropic | ANTHROPIC_API_KEY | anthropic | |||
| OpenAI | OPENAI_API_KEY | openai | |||
| Gemini | GEMINI_API_KEY | gemini |
$ DEEPSEEK_API_KEY=sk-xxx seek # via env var $ seek --provider anthropic # via CLI flag
On first launch with no API key configured, seek starts an interactive wizard:
首次运行且未配置 API 密钥时,自动启动交互式向导:
~/.seek/config.json.| Platform | 平台 | Config Path | 配置文件路径 |
|---|---|---|---|
| Linux / macOS | ~/.seek/config.json | ||
| Windows | %USERPROFILE%\.seek\config.json |
Override ~/.seek/ location with the $SEEK_HOME environment variable.
可通过 $SEEK_HOME 环境变量覆盖 ~/.seek/ 的位置。