forked from agents/opencode
docs: 展开环境变量配置说明
This commit is contained in:
13
README.md
13
README.md
@@ -18,11 +18,18 @@
|
|||||||
git clone <repo-url> ~/.config/opencode
|
git clone <repo-url> ~/.config/opencode
|
||||||
```
|
```
|
||||||
|
|
||||||
3. 参考 `.env.example` 配置环境变量
|
3. 复制 `.env.example` 为 `.env` 并填写环境变量
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export LITELLM_BASE_URL="https://your-litellm-endpoint"
|
cp .env.example .env
|
||||||
export LITELLM_API_KEY="your-api-key"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
| 变量 | 必填 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| `LITELLM_BASE_URL` | 是 | 模型服务端点 |
|
||||||
|
| `LITELLM_API_KEY` | 是 | 模型服务密钥 |
|
||||||
|
| `EXA_API_KEY` | 否 | [Exa](https://exa.ai) 搜索,提供联网能力 |
|
||||||
|
| `CONTEXT7_API_KEY` | 否 | [Context7](https://context7.com) 文档查询,提供库文档检索 |
|
||||||
|
| `OPENCODE_GIT_BASH_PATH` | 否 | Windows 用户需指定 Git Bash 路径,否则工具调用可能异常 |
|
||||||
|
|
||||||
4. 运行 `opencode`
|
4. 运行 `opencode`
|
||||||
|
|||||||
Reference in New Issue
Block a user