docs: update LLM agent install guide to use CLI installer

Related to #153

Co-authored-by: Taegeon Alan Go <32065632+gtg7784@users.noreply.github.com>

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-23 22:37:40 +09:00
parent 5dbd5ac6b1
commit b8e70f9529
4 changed files with 113 additions and 374 deletions

View File

@@ -157,76 +157,23 @@ Windows から Linux に初めて乗り換えた時のこと、自分の思い
あなたがユーザーの oh-my-opencode 設定を支援する LLM エージェントなら、以下の手順に従ってください:
### ステップ 0: セットアップについてユーザーに尋ねる
### ステップ 0: サブスクリプション情報を確認
OpenCode は様々なモデルをサポートしており、当プラグインは様々な最先端 LLM の使用を提案しています。そのため、ユーザーに以下の質問をする必要があります。
以下の 3 つの質問をして CLI オプションを決定してください:
**重要**: ユーザーがどのプロバイダーを持っているか追跡してください。ユーザーが Claude を持っていると確認した場合のみ、`anthropic/claude-opus-4-5` をフォールバックとして使用できます。Claude がない場合は、代わりに `opencode/big-pickle` をフォールバックとして使用してください。
1. **Claude Pro/Max のサブスクリプションをお持ちですか?**
- **はい**: **max20 (20x モード) を使用していますか?**
- **max20** → `--claude=max20`
- **max20 ではない** → `--claude=yes`
- **いいえ** → `--claude=no`
1. **Claude Pro/Max のサブスクリプションをお持ちですか?** お持ちでない場合、メインオーケストレーターモデルとして 'opencode/big-pickle' (GLM 4.6 として知られる) を使用することになります (非推奨)。
- ユーザーが**はい**と答えた場合、追加質問: **max20 (20x モード) を使用していますか?**
- **「はい」 (max20)**: ToDo 追加: "ユーザーの Claude Pro/Max 認証設定" — librarian に Claude Sonnet 4.5 をフル使用。**記憶: Claude がフォールバックとして使用可能。**
- **「いいえ」 (max20 ではない)**: ToDo 追加: "ユーザーの Claude Pro/Max 認証設定"、そして `~/.config/opencode/oh-my-opencode.json` に以下をマージ。**記憶: Claude がフォールバックとして使用可能。**
```json
{
"agents": {
"librarian": { "model": "opencode/big-pickle" }
}
}
```
- ユーザーが**「いいえ」** (Claude サブスクリプションなし) と答えた場合、`~/.config/opencode/oh-my-opencode.json` に以下を保存。**記憶: Claude は使用不可 — すべてのフォールバックは `opencode/big-pickle` を使用する必要があります。**
```json
{
"agents": {
"Sisyphus": { "model": "opencode/big-pickle" },
"librarian": { "model": "opencode/big-pickle" }
}
}
```
2. **ChatGPT のサブスクリプションをお持ちですか?**
- **はい**`--chatgpt=yes`
- **いいえ** → `--chatgpt=no`
2. **ChatGPT のサブスクリプションをお持ちですか?** お持ちでない場合、oracle エージェントにフォールバックモデルを使用することになります。
- ユーザーが**はい**と答えた場合、ToDo 追加: "ユーザーの ChatGPT 認証設定"
- ユーザーが**いいえ**と答えた場合:
- **Claude が使用可能な場合**: `oh-my-opencode.json` に以下をマージ:
```json
{
"agents": {
"oracle": { "model": "anthropic/claude-opus-4-5" }
}
}
```
- **Claude が使用不可の場合**: `oh-my-opencode.json` に以下をマージ:
```json
{
"agents": {
"oracle": { "model": "opencode/big-pickle" }
}
}
```
3. **Gemini モデルを統合しますか?** 統合しない場合、美しいデザインを享受できません。
- ユーザーが**「はい」**と答えた場合、ToDo 追加: "Google OAuth 設定"
- ユーザーが**「いいえ」**と答えた場合:
- **Claude が使用可能な場合**: `oh-my-opencode.json` に以下をマージ:
```json
{
"agents": {
"frontend-ui-ux-engineer": { "model": "anthropic/claude-opus-4-5" },
"document-writer": { "model": "anthropic/claude-opus-4-5" },
"multimodal-looker": { "model": "anthropic/claude-opus-4-5" }
}
}
```
- **Claude が使用不可の場合**: `oh-my-opencode.json` に以下をマージ:
```json
{
"agents": {
"frontend-ui-ux-engineer": { "model": "opencode/big-pickle" },
"document-writer": { "model": "opencode/big-pickle" },
"multimodal-looker": { "model": "opencode/big-pickle" }
}
}
```
3. **Gemini モデルを使用しますか?**
- **はい**`--gemini=yes`
- **いいえ**`--gemini=no`
### ステップ 1: OpenCode インストール確認
@@ -241,36 +188,28 @@ fi
OpenCode がインストールされていない場合は、[OpenCode インストールガイド](https://opencode.ai/docs)を確認し、インストールを進めてください。コンテキストを節約するため、サブエージェントを呼び出してインストールを行わせ、その結果を報告させるように案内してください。
### ステップ 2: oh-my-opencode プラグイン設定
### ステップ 2: インストーラーを実行
#### JSONC
- `~/.config/opencode/opencode.jsonc` が存在する場合は、そこで `oh-my-opencode` プラグインを追加してください。
#### JSON
- opencode.jsonc が存在しない場合は、以下のコマンドを実行して作成・登録してください。
ユーザーの回答に基づいて、適切なフラグで CLI インストーラーを実行してください:
```bash
mkdir -p ~/.config/opencode
if [ -f ~/.config/opencode/opencode.json ]; then
# 既存の設定ファイルがある場合: jq または python で plugin を追加
if command -v jq &> /dev/null; then
jq '.plugin = ((.plugin // []) + ["oh-my-opencode"] | unique)' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
else
echo "~/.config/opencode/opencode.json の plugin 配列に \"oh-my-opencode\" を追加してください"
fi
else
# 新しい設定ファイル作成
echo '{"plugin":["oh-my-opencode"]}' > ~/.config/opencode/opencode.json
fi
bunx oh-my-opencode install --no-tui --claude=<yes|no|max20> --chatgpt=<yes|no> --gemini=<yes|no>
```
**例:**
- すべてのサブスクリプション + max20: `bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes`
- Claude のみmax20 なし): `bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=no --gemini=no`
- サブスクリプションなし: `bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no`
CLI が行うこと:
- `opencode.json` にプラグインを登録
- サブスクリプションフラグに基づいてエージェントモデルを設定
- 必要な認証ステップを表示
### ステップ 3: 設定確認
```bash
opencode --version # 1.0.132 以上であること
opencode --version # 1.0.150 以上であること
cat ~/.config/opencode/opencode.json # plugin 配列に "oh-my-opencode" が含まれていること
```

View File

@@ -154,76 +154,23 @@ OpenCode 가 낭만이 사라진것같은 오늘날의 시대에, 당신에게
당신이 사용자의 oh-my-opencode 설정을 돕는 LLM Agent라면, 다음 단계를 따르세요. 업데이트 과정이라고 할지라도 아래의 내용을 그대로 따르세요. 단, 설치 과정에서 이미 답했을 질문은 또 하지 않습니다.
### 0단계: 사용자에게 설정에 대해 물어보세요.
### 0단계: 구독 정보 확인
OpenCode는 다양한 모델을 지원하며, 이 플러그인은 다양한 프론티어 LLM 사용을 제안합니다. 따라서 사용자에게 다음 질문을 해야 합니다.
사용자에게 다음 3가지 질문을 하여 CLI 옵션을 결정하세요:
**중요**: 사용자가 어떤 프로바이더를 가지고 있는지 추적하세요. 사용자가 Claude가 있다고 확인한 경우에만 `anthropic/claude-opus-4-5`를 폴백으로 사용할 수 있습니다. Claude가 없다면 `opencode/big-pickle`을 폴백으로 사용해야 합니다.
1. **Claude Pro/Max 구독이 있으신가요?**
- **예**: **max20 (20x 모드)를 사용하고 계신가요?**
- **max20** → `--claude=max20`
- **max20 아님** → `--claude=yes`
- **아니오** → `--claude=no`
1. **Claude Pro/Max 구독이 있으신가요?** 그렇지 않다면 메인 오케스트레이터 모델로 'opencode/big-pickle'(GLM 4.6으로 알려짐)을 사용하게 됩니다 (권장하지 않음).
- 사용자가 **'예'**라고 답하면, 추가 질문: **max20 (20x 모드)를 사용하고 계신가요?**
- **'예' (max20)**: 할 일 추가: "사용자 Claude Pro/Max 인증 설정" — librarian에 Claude Sonnet 4.5 전체 사용. **기억: Claude를 폴백으로 사용 가능.**
- **'아니오' (max20 아님)**: 할 일 추가: "사용자 Claude Pro/Max 인증 설정", 그리고 `~/.config/opencode/oh-my-opencode.json`에 다음을 병합. **기억: Claude를 폴백으로 사용 가능.**
```json
{
"agents": {
"librarian": { "model": "opencode/big-pickle" }
}
}
```
- 사용자가 **'아니오'** (Claude 구독 없음)라고 답하면, `~/.config/opencode/oh-my-opencode.json`에 다음을 저장. **기억: Claude 사용 불가 — 모든 폴백은 `opencode/big-pickle`을 사용해야 함.**
```json
{
"agents": {
"Sisyphus": { "model": "opencode/big-pickle" },
"librarian": { "model": "opencode/big-pickle" }
}
}
```
2. **ChatGPT 구독이 있으신가요?**
- **예** → `--chatgpt=yes`
- **아니오** → `--chatgpt=no`
2. **ChatGPT 구독이 있으신가요?** 그렇지 않다면 oracle 에이전트에 폴백 모델을 사용하게 됩니다.
- 사용자가 **'예'**라고 답하면, 할 일 추가: "사용자 ChatGPT 인증 설정"
- 사용자가 **'아니오'**라고 답하면:
- **Claude가 사용 가능한 경우**: `oh-my-opencode.json`에 다음을 병합:
```json
{
"agents": {
"oracle": { "model": "anthropic/claude-opus-4-5" }
}
}
```
- **Claude가 사용 불가능한 경우**: `oh-my-opencode.json`에 다음을 병합:
```json
{
"agents": {
"oracle": { "model": "opencode/big-pickle" }
}
}
```
3. **Gemini 모델을 통합하시겠습니까?** 그렇지 않다면 아름다운 디자인을 즐길 수 없습니다.
- 사용자가 **'예'**라고 답하면, 할 일 추가: "Google OAuth 설정"
- 사용자가 **'아니오'**라고 답하면:
- **Claude가 사용 가능한 경우**: `oh-my-opencode.json`에 다음을 병합:
```json
{
"agents": {
"frontend-ui-ux-engineer": { "model": "anthropic/claude-opus-4-5" },
"document-writer": { "model": "anthropic/claude-opus-4-5" },
"multimodal-looker": { "model": "anthropic/claude-opus-4-5" }
}
}
```
- **Claude가 사용 불가능한 경우**: `oh-my-opencode.json`에 다음을 병합:
```json
{
"agents": {
"frontend-ui-ux-engineer": { "model": "opencode/big-pickle" },
"document-writer": { "model": "opencode/big-pickle" },
"multimodal-looker": { "model": "opencode/big-pickle" }
}
}
```
3. **Gemini 모델을 사용하시겠습니까?**
- **예** → `--gemini=yes`
- **아니오**`--gemini=no`
### 1단계: OpenCode 설치 확인
@@ -238,36 +185,28 @@ fi
OpenCode가 설치되어 있지 않다면, [OpenCode 설치 가이드](https://opencode.ai/docs)를 읽고, 설치를 진행하세요. 컨텍스트를 줄이기 위해 Subagent 로 호출하여 설치를 하라고 안내하고, 그 결과를 보고 받는다고 말하세요.
### 2단계: oh-my-opencode 플러그인 설정
### 2단계: 설치 프로그램 실행
#### JSONC
- `~/.config/opencode/opencode.jsonc`가 존재한다면, 그곳에 `oh-my-opencode` 플러그인을 추가하세요.
#### JSON
- opencode.jsonc가 없다면, 다음 명령어를 실행하여 생성하고 등록하세요.
사용자의 답변을 바탕으로 적절한 플래그와 함께 CLI 설치 프로그램을 실행하세요:
```bash
mkdir -p ~/.config/opencode
if [ -f ~/.config/opencode/opencode.json ]; then
# 기존 설정 파일이 있는 경우: jq 또는 python으로 plugin 추가
if command -v jq &> /dev/null; then
jq '.plugin = ((.plugin // []) + ["oh-my-opencode"] | unique)' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
else
echo "~/.config/opencode/opencode.json의 plugin 배열에 \"oh-my-opencode\"를 추가하세요"
fi
else
# 새 설정 파일 생성
echo '{"plugin":["oh-my-opencode"]}' > ~/.config/opencode/opencode.json
fi
bunx oh-my-opencode install --no-tui --claude=<yes|no|max20> --chatgpt=<yes|no> --gemini=<yes|no>
```
**예시:**
- 모든 구독 + max20: `bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes`
- Claude만 (max20 없음): `bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=no --gemini=no`
- 구독 없음: `bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no`
CLI가 수행하는 작업:
- `opencode.json`에 플러그인 등록
- 구독 플래그에 따라 에이전트 모델 설정
- 필요한 인증 단계 안내
### 3단계: 설정 확인
```bash
opencode --version # 1.0.132 이상이어야 함
opencode --version # 1.0.150 이상이어야 함
cat ~/.config/opencode/opencode.json # plugin 배열에 "oh-my-opencode"가 있어야 함
```

142
README.md
View File

@@ -168,30 +168,15 @@ If you don't want all this, as mentioned, you can just pick and choose specific
### For Humans
**Option 1: CLI Installer (Recommended)**
The easiest way to install. Interactive prompts guide you through setup:
Run the interactive installer:
```bash
bunx oh-my-opencode install
```
Or use non-interactive mode for automation:
Follow the prompts to configure your Claude, ChatGPT, and Gemini subscriptions. After installation, authenticate your providers as instructed.
```bash
bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes
```
**CLI Options:**
| Option | Values | Description |
|--------|--------|-------------|
| `--claude` | `no`, `yes`, `max20` | Claude Pro/Max subscription |
| `--chatgpt` | `no`, `yes` | ChatGPT Plus/Pro subscription |
| `--gemini` | `no`, `yes` | Google Gemini integration |
| `--no-tui` | - | Non-interactive mode (requires all options) |
| `--skip-auth` | - | Skip authentication setup hints |
**Option 2: Let an LLM Agent do it**
**Alternative: Let an LLM Agent do it**
Paste this into a fresh opencode session:
```
@@ -207,80 +192,25 @@ If you're an LLM Agent helping set up oh-my-opencode, Welcome! You'll now help y
follow these steps:
### Step 0: Ask user about the setup.
### Step 0: Ask user about subscriptions
Since OpenCode supports various models, and our plugin suggests various frontier LLMs, you must ask user the following questions.
Ask the user these 3 questions to determine CLI options:
**IMPORTANT**: Track which providers the user has. Only use `anthropic/claude-opus-4-5` as fallback when the user confirmed they have Claude. If they don't have Claude, use `opencode/big-pickle` as fallback instead.
1. **Do you have a Claude Pro/Max Subscription?**
- If **yes**: **Are you on max20 (20x mode)?**
- **max20** → `--claude=max20`
- **not max20** → `--claude=yes`
- If **no**`--claude=no`
1. **Do you have a Claude Pro/Max Subscription?** Otherwise, we'll use 'opencode/big-pickle' (known for GLM 4.6) as a main orchestrator model (not recommended)
- If user said **yes**, ask follow-up: **Are you on max20 (20x mode)?**
- If **yes (max20)**: Add ToDo: "Setup user Claude Pro/Max Auth" — full Claude Sonnet 4.5 for librarian. **Remember: Claude is available for fallbacks.**
- If **no (not max20)**: Add ToDo: "Setup user Claude Pro/Max Auth", then merge the following to `~/.config/opencode/oh-my-opencode.json`. **Remember: Claude is available for fallbacks.**
```json
{
"agents": {
"librarian": { "model": "opencode/big-pickle" }
}
}
```
- If user said **no** (no Claude subscription), merge the following to `~/.config/opencode/oh-my-opencode.json`. **Remember: Claude is NOT available — all fallbacks must use `opencode/big-pickle`.**
```json
{
"agents": {
"Sisyphus": { "model": "opencode/big-pickle" },
"librarian": { "model": "opencode/big-pickle" }
}
}
```
2. **Do you have a ChatGPT Subscription?**
- If **yes**`--chatgpt=yes`
- If **no**`--chatgpt=no`
2. **Do you have a ChatGPT Subscription?** Otherwise, we'll use a fallback model for oracle agent.
- If user said **yes**, add ToDo: "Setup user ChatGPT Auth"
- If user said **no**:
- **If Claude is available**: merge the following to `oh-my-opencode.json`:
```json
{
"agents": {
"oracle": { "model": "anthropic/claude-opus-4-5" }
}
}
```
- **If Claude is NOT available**: merge the following to `oh-my-opencode.json`:
```json
{
"agents": {
"oracle": { "model": "opencode/big-pickle" }
}
}
```
3. **Will you integrate Gemini models?**
- If **yes**`--gemini=yes`
- If **no**`--gemini=no`
3. **Will you integrate Gemini models?** Otherwise, you cannot enjoy the beautiful design.
- If user said **yes**, add ToDo: "Setup Google OAuth"
- If user said **no**:
- **If Claude is available**: merge the following to `oh-my-opencode.json`:
```json
{
"agents": {
"frontend-ui-ux-engineer": { "model": "anthropic/claude-opus-4-5" },
"document-writer": { "model": "anthropic/claude-opus-4-5" },
"multimodal-looker": { "model": "anthropic/claude-opus-4-5" }
}
}
```
- **If Claude is NOT available**: merge the following to `oh-my-opencode.json`:
```json
{
"agents": {
"frontend-ui-ux-engineer": { "model": "opencode/big-pickle" },
"document-writer": { "model": "opencode/big-pickle" },
"multimodal-looker": { "model": "opencode/big-pickle" }
}
}
```
### Step 1: Install OpenCode, if not
Run following command to verify OpenCode Installation:
### Step 1: Install OpenCode (if not installed)
```bash
if command -v opencode &> /dev/null; then
@@ -294,37 +224,29 @@ fi
If OpenCode isn't installed, check the [OpenCode Installation Guide](https://opencode.ai/docs).
Spawn a subagent to handle installation and report back - to save context.
### Step 2: Configure oh-my-opencode Plugin
### Step 2: Run the installer
#### JSONC
- If `~/.config/opencode/opencode.jsonc` exists, work in there to add `oh-my-opencode` plugin
#### JSON
- If no opencode.jsonc exists, run following command to create and register it.
Based on user's answers, run the CLI installer with appropriate flags:
```bash
mkdir -p ~/.config/opencode
if [ -f ~/.config/opencode/opencode.json ]; then
# Existing config: add plugin using jq or python
if command -v jq &> /dev/null; then
jq '.plugin = ((.plugin // []) + ["oh-my-opencode"] | unique)' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
else
echo "Please add \"oh-my-opencode\" to the plugin array in ~/.config/opencode/opencode.json"
fi
else
# Create new config
echo '{"plugin":["oh-my-opencode"]}' > ~/.config/opencode/opencode.json
fi
bunx oh-my-opencode install --no-tui --claude=<yes|no|max20> --chatgpt=<yes|no> --gemini=<yes|no>
```
**Examples:**
- User has all subscriptions with max20: `bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes`
- User has only Claude (no max20): `bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=no --gemini=no`
- User has no subscriptions: `bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no`
The CLI will:
- Register the plugin in `opencode.json`
- Configure agent models based on subscription flags
- Show which auth steps are needed
### Step 3: Verify Setup
```bash
opencode --version # Should be 1.0.132 or higher
cat ~/.config/opencode/opencode.json # Should contain "oh-my-opencode" in plugin array, or maybe check jsonc
opencode --version # Should be 1.0.150 or higher
cat ~/.config/opencode/opencode.json # Should contain "oh-my-opencode" in plugin array
```
### Step 4: Configure Authentication

View File

@@ -163,76 +163,23 @@ Install and configure by following the instructions here https://raw.githubuserc
按步骤来:
### 步骤 0摸清用户底细
### 步骤 0确认订阅情况
OpenCode 支持各种模型,我们这个插件也建议用各种前沿 LLM。所以先问清楚。
问用户这 3 个问题来确定 CLI 参数:
**重要**:追踪用户有哪些 provider。只有用户确认有 Claude 的情况下,才能用 `anthropic/claude-opus-4-5` 做 fallback。没有 Claude 就用 `opencode/big-pickle` 做 fallback。
1. **有 Claude Pro/Max 订阅吗?**
- **有****用的是 max20 (20x 模式) 吗?**
- **max20** → `--claude=max20`
- **不是 max20** → `--claude=yes`
- **没有** → `--claude=no`
1. **有 Claude Pro/Max 订阅吗?** 没有的话,主编排模型只能用 'opencode/big-pickle'(也就是 GLM 4.6),这体验可不太好(不推荐)。
- 用户说**有**,继续问:**你用的是 max20 (20x 模式) 吗?**
- **是 (max20)**:加个待办:"配置用户 Claude Pro/Max 认证" — librarian 用完整的 Claude Sonnet 4.5。**记住Claude 可以做 fallback。**
- **不是 (没有 max20)**:加个待办:"配置用户 Claude Pro/Max 认证",然后把这个合并到 `~/.config/opencode/oh-my-opencode.json`。**记住Claude 可以做 fallback。**
```json
{
"agents": {
"librarian": { "model": "opencode/big-pickle" }
}
}
```
- 用户说**没有** (没有 Claude 订阅),把这坨配置写到 `~/.config/opencode/oh-my-opencode.json`。**记住:没有 Claude — 所有 fallback 都得用 `opencode/big-pickle`。**
```json
{
"agents": {
"Sisyphus": { "model": "opencode/big-pickle" },
"librarian": { "model": "opencode/big-pickle" }
}
}
```
2. **有 ChatGPT 订阅吗?**
- **有**`--chatgpt=yes`
- **没有** → `--chatgpt=no`
2. **有 ChatGPT 订阅吗?** 没有的话oracle Agent 就用 fallback 模型了。
- 用户说****,加个待办:"配置用户 ChatGPT 认证"
- 用户说**没有**
- **有 Claude 的情况下**:把这个合并到 `oh-my-opencode.json`
```json
{
"agents": {
"oracle": { "model": "anthropic/claude-opus-4-5" }
}
}
```
- **没有 Claude 的情况下**:把这个合并到 `oh-my-opencode.json`
```json
{
"agents": {
"oracle": { "model": "opencode/big-pickle" }
}
}
```
3. **要接 Gemini 模型吗?** 不接的话,那么漂亮的 UI 设计你就无福消受了。
- 用户说**要**,加个待办:"配置 Google OAuth"
- 用户说**不要**
- **有 Claude 的情况下**:把这个合并到 `oh-my-opencode.json`
```json
{
"agents": {
"frontend-ui-ux-engineer": { "model": "anthropic/claude-opus-4-5" },
"document-writer": { "model": "anthropic/claude-opus-4-5" },
"multimodal-looker": { "model": "anthropic/claude-opus-4-5" }
}
}
```
- **没有 Claude 的情况下**:把这个合并到 `oh-my-opencode.json`
```json
{
"agents": {
"frontend-ui-ux-engineer": { "model": "opencode/big-pickle" },
"document-writer": { "model": "opencode/big-pickle" },
"multimodal-looker": { "model": "opencode/big-pickle" }
}
}
```
3. **要用 Gemini 模型吗?**
- ****`--gemini=yes`
- **不要** → `--gemini=no`
### 步骤 1确认 OpenCode 装没装
@@ -249,36 +196,28 @@ fi
如果没装,看 [OpenCode 安装指南](https://opencode.ai/docs)。可以生成个子 Agent 去搞定安装,完事汇报——省点上下文。
### 步骤 2配置 oh-my-opencode 插件
### 步骤 2跑安装程序
#### JSONC
- 如果 `~/.config/opencode/opencode.jsonc` 存在,就在里面加 `oh-my-opencode` 插件。
#### JSON
- 如果没 opencode.jsonc跑这个命令创建并注册
根据用户的回答,用对应的参数运行 CLI 安装程序:
```bash
mkdir -p ~/.config/opencode
if [ -f ~/.config/opencode/opencode.json ]; then
# 已有配置:用 jq 或 python 加插件
if command -v jq &> /dev/null; then
jq '.plugin = ((.plugin // []) + ["oh-my-opencode"] | unique)' \
~/.config/opencode/opencode.json > /tmp/oc.json && \
mv /tmp/oc.json ~/.config/opencode/opencode.json
else
echo "请手动在 ~/.config/opencode/opencode.json 的 plugin 数组里加上 \"oh-my-opencode\""
fi
else
# 新建配置
echo '{"plugin":["oh-my-opencode"]}' > ~/.config/opencode/opencode.json
fi
bunx oh-my-opencode install --no-tui --claude=<yes|no|max20> --chatgpt=<yes|no> --gemini=<yes|no>
```
**例子:**
- 全套订阅 + max20`bunx oh-my-opencode install --no-tui --claude=max20 --chatgpt=yes --gemini=yes`
- 只有 Claude没 max20`bunx oh-my-opencode install --no-tui --claude=yes --chatgpt=no --gemini=no`
- 啥订阅都没有:`bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no`
CLI 会干这些事:
-`opencode.json` 注册插件
- 根据订阅参数配置 Agent 模型
- 告诉你接下来要做哪些认证
### 步骤 3验货
```bash
opencode --version # 得是 1.0.132 以上
opencode --version # 得是 1.0.150 以上
cat ~/.config/opencode/opencode.json # plugin 数组里得有 "oh-my-opencode"
```