forked from agents/opencode
Compare commits
7 Commits
838e615af6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ab05fac87 | |||
| b5717759ba | |||
| cc38835300 | |||
| f3a9562301 | |||
| 6450117296 | |||
| 1440291655 | |||
| ec0aff2728 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,4 +4,3 @@ bun.lock
|
|||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
.env
|
|
||||||
|
|||||||
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# opencode-config
|
||||||
|
|
||||||
|
个人 [OpenCode](https://opencode.ai) 配置文件。
|
||||||
|
|
||||||
|
## 使用
|
||||||
|
|
||||||
|
1. 安装 OpenCode
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm i -g opencode-ai
|
||||||
|
# 或
|
||||||
|
bun add -g opencode-ai
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 克隆配置到 `~/.config/opencode`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone <repo-url> ~/.config/opencode
|
||||||
|
```
|
||||||
|
|
||||||
|
3. 参考 `.env.example` 将以下环境变量配置到系统中
|
||||||
|
|
||||||
|
| 变量 | 必填 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| `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`
|
||||||
Reference in New Issue
Block a user