docs: 精简 README 至最小可用说明
This commit is contained in:
80
README.md
80
README.md
@@ -1,72 +1,28 @@
|
|||||||
# opencode-config
|
# opencode-config
|
||||||
|
|
||||||
我的 [OpenCode](https://opencode.ai) 配置,对应 `~/.config/opencode` 目录。
|
我的 [OpenCode](https://opencode.ai) 配置。
|
||||||
|
|
||||||
## 特性
|
## 使用
|
||||||
|
|
||||||
- 通过 [LiteLLM](https://docs.litellm.ai/) 代理统一接入多家模型
|
1. 安装 OpenCode
|
||||||
- 使用 [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) 插件,支持多 Agent 模型分配
|
|
||||||
- 默认主模型 `anthropic/claude-opus-4-6`,小模型 `anthropic/claude-haiku-4-5`
|
|
||||||
- 配置了 Anthropic / OpenAI / Google / LiteLLM 四个 Provider
|
|
||||||
|
|
||||||
## 快速开始
|
```bash
|
||||||
|
npm i -g opencode-ai
|
||||||
|
# 或
|
||||||
|
bun add -g opencode-ai
|
||||||
|
```
|
||||||
|
|
||||||
### 安装 OpenCode
|
2. 克隆配置到 `~/.config/opencode`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL https://opencode.ai/install | bash
|
git clone <repo-url> ~/.config/opencode
|
||||||
```
|
```
|
||||||
|
|
||||||
### 克隆配置
|
3. 参考 `.env.example` 配置环境变量
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 如果已有该目录,请先备份
|
export LITELLM_BASE_URL="https://your-litellm-endpoint"
|
||||||
git clone <repo-url> ~/.config/opencode
|
export LITELLM_API_KEY="your-api-key"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 配置环境变量
|
4. 运行 `opencode`
|
||||||
|
|
||||||
参考 `.env.example`,设置以下环境变量:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export LITELLM_BASE_URL="https://your-litellm-endpoint"
|
|
||||||
export LITELLM_API_KEY="your-api-key"
|
|
||||||
```
|
|
||||||
|
|
||||||
> 可选:如果使用了 Exa 或 Context7 的 MCP 工具,还需设置 `EXA_API_KEY` 和 `CONTEXT7_API_KEY`。
|
|
||||||
|
|
||||||
### 启动
|
|
||||||
|
|
||||||
```bash
|
|
||||||
opencode
|
|
||||||
```
|
|
||||||
|
|
||||||
## 文件说明
|
|
||||||
|
|
||||||
| 文件 | 说明 |
|
|
||||||
|------|------|
|
|
||||||
| `opencode.jsonc` | 主配置:Provider、模型定义、插件 |
|
|
||||||
| `oh-my-opencode.jsonc` | oh-my-opencode 插件配置:Agent 模型分配、任务分类 |
|
|
||||||
| `tui.jsonc` | TUI 主题配置 |
|
|
||||||
| `AGENTS.md` | 运行时行为指令(如默认使用简体中文回复) |
|
|
||||||
| `.env.example` | 环境变量模板 |
|
|
||||||
|
|
||||||
## 模型配置概览
|
|
||||||
|
|
||||||
| Provider | 模型 | 用途 |
|
|
||||||
|----------|------|------|
|
|
||||||
| Anthropic | Claude Opus 4.6 | 主模型 / Sisyphus / Prometheus / Metis |
|
|
||||||
| Anthropic | Claude Sonnet 4.6 | Atlas / Sisyphus-Junior |
|
|
||||||
| Anthropic | Claude Haiku 4.5 | 小模型(快速任务) |
|
|
||||||
| OpenAI | GPT-5.4 | Oracle / Multimodal / Momus |
|
|
||||||
| OpenAI | GPT-5.3-Codex | Hephaestus / Deep 任务 |
|
|
||||||
| OpenAI | GPT-5.4 mini | Quick 任务 |
|
|
||||||
| Google | Gemini 3.1 Pro | Visual Engineering / Artistry |
|
|
||||||
| Google | Gemini 3 Flash | Writing 任务 |
|
|
||||||
| LiteLLM | Grok Code Fast 1 | Explore |
|
|
||||||
| LiteLLM | MiniMax M2.5 | Librarian |
|
|
||||||
| LiteLLM | Kimi K2.5 / GLM-5 | 备用 |
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
个人配置,仅供参考。
|
|
||||||
|
|||||||
Reference in New Issue
Block a user