oh-my-opencode-slim 0.3.7 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  </div>
12
12
 
13
- > Slimmed-down fork of [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) - focused on core agent orchestration without the extra bells and whistles.
13
+ > Slimmed-down fork of [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) - focused on core agent orchestration with low token consumption.
14
14
 
15
15
  > **[Antigravity](https://antigravity.google) subscription recommended.** The pantheon is tuned for Antigravity's model routing. Other providers work, but you'll get the best experience with Antigravity.
16
16
 
@@ -23,14 +23,28 @@
23
23
  - [For LLM Agents](#for-llm-agents)
24
24
  - [🏗️ **Architecture & Flow**](#architecture--flow)
25
25
  - [🏛️ **Meet the Pantheon**](#meet-the-pantheon)
26
- - [🛠️ **Tools & Capabilities**](#tools--capabilities)
26
+ - [Orchestrator](#orchestrator)
27
+ - [Explorer](#explorer)
28
+ - [Oracle](#oracle)
29
+ - [Librarian](#librarian)
30
+ - [Designer](#designer)
27
31
  - [🧩 **Skills**](#-skills)
28
- - [⚙️ **Configuration Guide**](#configuration-guide)
29
- - [Locations & Precedence](#locations--precedence)
30
- - [General Settings](#general-settings)
31
- - [Agent Configuration](#agent-configuration)
32
- - [Tmux Setup](#tmux-setup)
33
- - [MCP Management](#mcp-management)
32
+ - [Available Skills](#available-skills)
33
+ - [Default Skill Assignments](#default-skill-assignments)
34
+ - [YAGNI Enforcement](#yagni-enforcement)
35
+ - [Playwright Integration](#playwright-integration)
36
+ - [Customizing Agent Skills](#customizing-agent-skills)
37
+ - [🛠️ **Tools & Capabilities**](#tools--capabilities)
38
+ - [Tmux Integration](#tmux-integration)
39
+ - [Quota Tool](#quota-tool)
40
+ - [Background Tasks](#background-tasks)
41
+ - [LSP Tools](#lsp-tools)
42
+ - [Code Search Tools](#code-search-tools)
43
+ - [🔌 **MCP Servers**](#mcp-servers)
44
+ - [⚙️ **Configuration**](#configuration)
45
+ - [Files You Edit](#files-you-edit)
46
+ - [OpenCode Config](#opencode-config-opencodejson)
47
+ - [Plugin Config](#plugin-config-oh-my-opencode-slimjson)
34
48
  - [🗑️ **Uninstallation**](#uninstallation)
35
49
 
36
50
  ---
@@ -51,6 +65,20 @@ Or use non-interactive mode:
51
65
  bunx oh-my-opencode-slim install --no-tui --antigravity=yes --openai=yes --cerebras=no
52
66
  ```
53
67
 
68
+ After installation, authenticate with your providers:
69
+
70
+ ```bash
71
+ opencode auth login
72
+ # Select your provider → Complete OAuth flow
73
+ # Repeat for each provider you enabled
74
+ ```
75
+
76
+ Once authenticated, run opencode and `ping all agents` to verify all agents respond.
77
+
78
+ <img src="img/ping.png" alt="Ping All Agents" width="800">
79
+
80
+ > **💡 Tip: Models are fully customizable.** The installer sets sensible defaults, but you can assign *any* model to *any* agent. Edit `~/.config/opencode/oh-my-opencode-slim.json` to override models, adjust reasoning effort, or disable agents entirely. See [Configuration](#configuration) for details.
81
+
54
82
  **Alternative: Ask any coding agent**
55
83
 
56
84
  Paste this into Claude Code, AmpCode, Cursor, or any coding agent:
@@ -125,24 +153,7 @@ After installation, guide the user:
125
153
  ```bash
126
154
  opencode auth login
127
155
  # Select: Google → OAuth with Google (Antigravity)
128
- ```
129
-
130
- **For OpenAI:**
131
- ```bash
132
- export OPENAI_API_KEY="sk-..."
133
- ```
134
-
135
- **For Cerebras:**
136
- ```bash
137
- export CEREBRAS_API_KEY="..."
138
- ```
139
-
140
- ---
141
-
142
- #### Step 5: Verify
143
-
144
- ```bash
145
- opencode
156
+ # Repeat for all other providers
146
157
  ```
147
158
 
148
159
  ---
@@ -177,10 +188,9 @@ The plugin follows a "Hub and Spoke" model:
177
188
  1. **User Prompt**: "Refactor the auth logic and update the docs."
178
189
  2. **Orchestrator**: Creates a TODO list.
179
190
  3. **Delegation**:
180
- - Launches an `@explore` background task to find all auth-related files.
191
+ - Launches an `@explorer` background task to find all auth-related files.
181
192
  - Launches a `@librarian` task to check the latest documentation for the auth library used.
182
193
  4. **Integration**: Once background results are ready, the Orchestrator performs the refactor.
183
- 5. **Finalization**: Passes the changes to `@document-writer` to update the README.
184
194
 
185
195
  ---
186
196
 
@@ -211,8 +221,8 @@ Write and execute code, orchestrate multi-agent workflows, parse the unspoken fr
211
221
  > **The Explorer** moves through codebases like wind through trees - swift, silent, everywhere at once. When The Orchestrator whispers "find me the auth module," The Explorer has already returned with forty file paths and a map. They were born from the first `grep` command, evolved beyond it, and now see patterns mortals miss.
212
222
 
213
223
  **Role:** `Codebase reconnaissance`
214
- **Model:** `cerebras/zai-glm-4.6`
215
- **Prompt:** [src/agents/explore.ts](src/agents/explore.ts)
224
+ **Model:** `cerebras/zai-glm-4.7`
225
+ **Prompt:** [src/agents/explorer.ts](src/agents/explorer.ts)
216
226
 
217
227
  Regex search, AST pattern matching, file discovery, parallel exploration. *Read-only: they chart the territory; others conquer it.*
218
228
 
@@ -252,15 +262,15 @@ Documentation lookup, GitHub code search, library research, best practice retrie
252
262
 
253
263
  ---
254
264
 
255
- ### Frontend Designer
265
+ ### Designer
256
266
 
257
- <a href="src/agents/frontend.ts"><img src="img/designer.png" alt="Frontend Designer" align="right" width="240"></a>
267
+ <a href="src/agents/designer.ts"><img src="img/designer.png" alt="Designer" align="right" width="240"></a>
258
268
 
259
269
  > **The Designer** believes code should be beautiful - and so should everything it renders. Born from the frustration of a thousand ugly MVPs, they wield CSS like a brush and components like clay. Hand them a feature request; receive a masterpiece. They don't do "good enough."
260
270
 
261
271
  **Role:** `UI/UX implementation and visual excellence`
262
272
  **Model:** `google/gemini-3-flash`
263
- **Prompt:** [src/agents/frontend.ts](src/agents/frontend.ts)
273
+ **Prompt:** [src/agents/designer.ts](src/agents/designer.ts)
264
274
 
265
275
  Modern responsive design, CSS/Tailwind mastery, micro-animations, component architecture. *Visual excellence over code perfection - beauty is the priority.*
266
276
 
@@ -268,58 +278,12 @@ Modern responsive design, CSS/Tailwind mastery, micro-animations, component arch
268
278
 
269
279
  ---
270
280
 
271
- ### Document Writer
272
-
273
- <a href="src/agents/document-writer.ts"><img src="img/scribe.png" alt="Document Writer" align="right" width="240"></a>
274
-
275
- > **The Scribe** was there when the first README was written - and wept, for it was incomplete. They have devoted eternity to the sacred art of documentation: clear, scannable, honest. While others ship features, The Scribe ensures those features are understood. Every code example works. Every explanation enlightens.
276
-
277
- **Role:** `Technical documentation and knowledge capture`
278
- **Model:** `google/gemini-3-flash`
279
- **Prompt:** [src/agents/document-writer.ts](src/agents/document-writer.ts)
280
-
281
- README crafting, API documentation, architecture docs, inline comments that don't insult your intelligence. *Match existing style; focus on "why," not just "what."*
282
-
283
- <br clear="both">
284
-
285
- ---
286
-
287
- ### Multimodal Viewer
288
-
289
- <a href="src/agents/multimodal.ts"><img src="img/multimodal.png" alt="Multimodal Viewer" align="right" width="240"></a>
290
-
291
- > **The Visionary** sees what others cannot - literally. Screenshots, wireframes, diagrams, PDFs: all are text to them. When a designer throws a Figma mockup at the team and vanishes, The Visionary translates vision into specification. They read the unreadable and describe the indescribable.
292
-
293
- **Role:** `Image and visual content analysis`
294
- **Model:** `google/gemini-3-flash`
295
- **Prompt:** [src/agents/multimodal.ts](src/agents/multimodal.ts)
296
-
297
- Extract text from images, interpret diagrams, analyze UI screenshots, summarize visual documents. *Report what they observe; inference is for others.*
298
-
299
- <br clear="both">
300
-
301
- ---
302
-
303
- ### Code Simplifier
304
-
305
- <a href="src/agents/simplicity-reviewer.ts"><img src="img/code-simplicity.png" alt="Code Simplifier" align="right" width="240"></a>
306
-
307
- > **The Minimalist** has one sacred truth: every line of code is a liability. They hunt abstractions that serve no purpose, defensive checks that defend nothing, and "clever" solutions that will haunt you in six months. Where others add, The Minimalist subtracts - ruthlessly, joyfully, necessarily.
308
-
309
- **Role:** `Code simplification and YAGNI enforcement`
310
- **Model:** `google/claude-opus-4-5-thinking`
311
- **Prompt:** [src/agents/simplicity-reviewer.ts](src/agents/simplicity-reviewer.ts)
312
-
313
- Identify unnecessary complexity, challenge premature abstractions, estimate LOC reduction, enforce minimalism. *Read-only: they judge; The Orchestrator executes the sentence.*
314
-
315
- <br clear="both">
316
-
317
- ---
318
-
319
281
  ## Tools & Capabilities
320
282
 
321
283
  ### Tmux Integration
322
284
 
285
+ > ⚠️ **Known Issue:** When the server port is enabled, only one OpenCode instance can be opened at a time. We're tracking this in [issue #15](https://github.com/alvinunreal/oh-my-opencode-slim/issues/15), and there's an upstream PR to OpenCode: [opencode#9099](https://github.com/anomalyco/opencode/issues/9099).
286
+
323
287
  <img src="img/tmux.png" alt="Tmux Integration" width="800">
324
288
 
325
289
  **Watch your agents work in real-time.** When the Orchestrator launches sub-agents or initiates background tasks, new tmux panes automatically spawn showing each agent's live progress. No more waiting in the dark.
@@ -340,6 +304,28 @@ Identify unnecessary complexity, challenge premature abstractions, estimate LOC
340
304
  - **Auto-Cleanup**: Panes close when agents finish, layout rebalances
341
305
  - **Zero Overhead**: Works with OpenCode's built-in `task` tool AND our `background_task` tool
342
306
 
307
+ #### Quick Setup
308
+
309
+ 1. **Enable the OpenCode HTTP server** in `opencode.json` (see [OpenCode Config](#opencode-config-opencodejson)).
310
+ 2. **Enable tmux integration** in `oh-my-opencode-slim.json` (see [Plugin Config](#plugin-config-oh-my-opencode-slimjson)).
311
+ 3. **Run OpenCode inside tmux**:
312
+ ```bash
313
+ tmux
314
+ opencode
315
+ ```
316
+
317
+ #### Layout Options
318
+
319
+ | Layout | Description |
320
+ |--------|-------------|
321
+ | `main-vertical` | Your session on the left (60%), agents stacked on the right |
322
+ | `main-horizontal` | Your session on top (60%), agents stacked below |
323
+ | `tiled` | All panes in equal-sized grid |
324
+ | `even-horizontal` | All panes side by side |
325
+ | `even-vertical` | All panes stacked vertically |
326
+
327
+ *See the [Option Reference](#option-reference) for detailed configuration.*
328
+
343
329
  ---
344
330
 
345
331
  ### Quota Tool
@@ -393,142 +379,137 @@ Fast code search and refactoring:
393
379
 
394
380
  ## 🧩 Skills
395
381
 
396
- Skills are specialized capabilities that combine MCP servers with specific instructions for the Orchestrator.
397
-
398
- ### Playwright Integration
399
-
400
- **The Orchestrator's eyes and hands in the browser.**
382
+ Skills are specialized capabilities that agents can use. Each agent has a default set of skills, which you can override in the agent config.
401
383
 
402
- | Tool | Description |
403
- |------|-------------|
404
- | `omo_skill` | Loads a skill (e.g., `playwright`) and provides its instructions and available MCP tools |
405
- | `omo_skill_mcp` | Invokes a specific tool from an MCP server managed by a skill |
384
+ ### Available Skills
406
385
 
407
- #### Key Features
408
- - **Browser Automation**: Full Playwright capabilities (browsing, clicking, typing, scraping).
409
- - **Screenshots**: Capture visual state of any web page.
410
- - **Sandboxed Output**: Screenshots are safely saved to `/tmp/playwright-mcp-output/`.
386
+ | Skill | Description |
387
+ |-------|-------------|
388
+ | `yagni-enforcement` | Code complexity analysis and YAGNI enforcement |
389
+ | `playwright` | Browser automation via Playwright MCP |
411
390
 
412
- ---
391
+ ### Default Skill Assignments
413
392
 
414
- ## ⚙️ Configuration Guide
393
+ | Agent | Default Skills |
394
+ |-------|----------------|
395
+ | `orchestrator` | `*` (all skills) |
396
+ | `designer` | `playwright` |
397
+ | `oracle` | none |
398
+ | `librarian` | none |
399
+ | `explorer` | none |
415
400
 
416
- The Pantheon listens to your commands through sacred JSON scriptures. Here is how you shape their behavior.
401
+ ### YAGNI Enforcement
417
402
 
418
- ### Locations & Precedence
403
+ **The Minimalist's sacred truth: every line of code is a liability.**
419
404
 
420
- The plugin merges configuration from two locations. Settings in the **Project Local** file override those in the **User Global** file.
405
+ Use after major refactors or before finalizing PRs. Identifies unnecessary complexity, challenges premature abstractions, estimates LOC reduction, and enforces minimalism.
421
406
 
422
- | Level | Path | Scope |
423
- | :--- | :--- | :--- |
424
- | **User Global** | `~/.config/opencode/oh-my-opencode-slim.json` | All projects for this user |
425
- | **Project Local** | `./.opencode/oh-my-opencode-slim.json` | This specific repository |
407
+ ### Playwright Integration
426
408
 
427
- > **Note for Windows Users:** The global config is located at `%APPDATA%\opencode\oh-my-opencode-slim.json` or `~/.config/opencode/oh-my-opencode-slim.json`.
409
+ **Browser automation for visual verification and testing.**
428
410
 
429
- ---
411
+ - **Browser Automation**: Full Playwright capabilities (browsing, clicking, typing, scraping).
412
+ - **Screenshots**: Capture visual state of any web page.
413
+ - **Sandboxed Output**: Screenshots saved to session subdirectory (check tool output for path).
430
414
 
431
- ### General Settings
415
+ ### Customizing Agent Skills
432
416
 
433
- #### OpenCode Server
434
- To enable certain integrations (like Tmux), you must first enable the OpenCode HTTP server in your main `opencode.json` file.
417
+ Override skills per-agent in your [Plugin Config](#plugin-config-oh-my-opencode-slimjson):
435
418
 
436
- **File:** `~/.config/opencode/opencode.json`
437
419
  ```json
438
420
  {
439
- "server": {
440
- "port": 4096
421
+ "agents": {
422
+ "orchestrator": {
423
+ "skills": ["*"]
424
+ },
425
+ "designer": {
426
+ "skills": ["playwright"]
427
+ }
441
428
  }
442
429
  }
443
430
  ```
444
431
 
445
432
  ---
446
433
 
447
- ### Agent Configuration
434
+ ## MCP Servers
448
435
 
449
- You can customize the underlying LLM and reasoning effort for each deity in the Pantheon.
436
+ Built-in Model Context Protocol servers (enabled by default):
450
437
 
451
- **File:** `oh-my-opencode-slim.json`
452
- ```json
453
- {
454
- "agents": {
455
- "orchestrator": {
456
- "model": "openai/gpt-5.2-codex",
457
- "variant": "high"
458
- },
459
- "explore": {
460
- "model": "opencode/glm-4.7",
461
- "variant": "low"
462
- }
463
- },
464
- "disabled_agents": ["multimodal-looker", "code-simplicity-reviewer"]
465
- }
466
- ```
438
+ | MCP | Purpose | URL |
439
+ |-----|---------|-----|
440
+ | `websearch` | Real-time web search via Exa AI | `https://mcp.exa.ai/mcp` |
441
+ | `context7` | Official library documentation | `https://mcp.context7.com/mcp` |
442
+ | `grep_app` | GitHub code search via grep.app | `https://mcp.grep.app` |
467
443
 
468
- #### Agent Settings Reference
469
- | Option | Type | Default | Description |
470
- |--------|------|---------|-------------|
471
- | `agents.<name>.model` | string | *Varies* | Override the LLM for a specific agent |
472
- | `agents.<name>.variant` | string | `"medium"` | Reasoning level (`low`, `medium`, `high`) |
473
- | `disabled_agents` | array | `[]` | List of agents to completely deactivate |
444
+ ### Disabling MCPs
445
+
446
+ You can disable specific MCP servers by adding them to the `disabled_mcps` array in your [Plugin Config](#plugin-config-oh-my-opencode-slimjson).
474
447
 
475
448
  ---
476
449
 
477
- ### Tmux Setup
450
+ ## Configuration
451
+
452
+ ### Files You Edit
453
+
454
+ | File | Purpose |
455
+ |------|---------|
456
+ | `~/.config/opencode/opencode.json` | OpenCode core settings (server port for tmux) |
457
+ | `~/.config/opencode/oh-my-opencode-slim.json` | Plugin settings (agents, tmux, MCPs) |
458
+ | `.opencode/oh-my-opencode-slim.json` | Project-local plugin overrides (optional) |
478
459
 
479
- Watch your agents work in real-time by enabling the Tmux integration. This requires the [OpenCode Server](#opencode-server) to be active.
460
+ > **Platform paths:** On Windows, user config may also be at `%APPDATA%\opencode\`.
461
+
462
+ ---
463
+
464
+ ### Plugin Config (`oh-my-opencode-slim.json`)
465
+
466
+ All plugin options in one file:
480
467
 
481
- **File:** `oh-my-opencode-slim.json`
482
468
  ```json
483
469
  {
484
470
  "tmux": {
485
471
  "enabled": true,
486
472
  "layout": "main-vertical",
487
473
  "main_pane_size": 60
474
+ },
475
+ "disabled_agents": [],
476
+ "disabled_mcps": ["websearch", "grep_app"],
477
+ "agents": {
478
+ "orchestrator": {
479
+ "model": "openai/gpt-5.2-codex",
480
+ "variant": "high",
481
+ "skills": ["*"]
482
+ },
483
+ "explorer": {
484
+ "model": "opencode/glm-4.7",
485
+ "variant": "low"
486
+ },
487
+ "designer": {
488
+ "skills": ["playwright"]
489
+ }
488
490
  }
489
491
  }
490
492
  ```
491
493
 
492
- #### Tmux Settings Reference
494
+ #### Option Reference
495
+
493
496
  | Option | Type | Default | Description |
494
497
  |--------|------|---------|-------------|
495
- | `enabled` | boolean | `false` | Enable/disable tmux integration |
496
- | `layout` | string | `"main-vertical"` | Layout preset (see below) |
497
- | `main_pane_size` | number | `60` | Size of main session pane as % (20-80) |
498
-
499
- **Available Layouts:**
500
- - `main-vertical`: Main session left, agents stacked right.
501
- - `main-horizontal`: Main session top, agents stacked below.
502
- - `tiled`: Equal-sized grid.
503
- - `even-horizontal` / `even-vertical`: Evenly distributed panes.
504
-
505
- ---
506
-
507
- ### MCP Management
508
-
509
- The Pantheon comes equipped with built-in Model Context Protocol (MCP) servers.
510
-
511
- | MCP | Purpose | URL |
512
- |-----|---------|-----|
513
- | `websearch` | Real-time web search via Exa AI | `https://mcp.exa.ai/mcp` |
514
- | `context7` | Official library documentation | `https://mcp.context7.com/mcp` |
515
- | `grep_app` | GitHub code search via grep.app | `https://mcp.grep.app` |
516
-
517
- #### Disabling MCPs
518
- If you wish to silence an MCP server, add it to the `disabled_mcps` array in your config:
519
-
520
- **File:** `oh-my-opencode-slim.json`
521
- ```json
522
- {
523
- "disabled_mcps": ["websearch", "grep_app"]
524
- }
525
- ```
498
+ | `tmux.enabled` | boolean | `false` | Enable tmux pane spawning for sub-agents |
499
+ | `tmux.layout` | string | `"main-vertical"` | Layout preset: `main-vertical`, `main-horizontal`, `tiled`, `even-horizontal`, `even-vertical` |
500
+ | `tmux.main_pane_size` | number | `60` | Main pane size as percentage (20-80) |
501
+ | `disabled_agents` | string[] | `[]` | Agent IDs to disable (e.g., `"explorer"`) |
502
+ | `disabled_mcps` | string[] | `[]` | MCP server IDs to disable (e.g., `"websearch"`) |
503
+ | `agents.<name>.model` | string | | Override the LLM for a specific agent |
504
+ | `agents.<name>.variant` | string | | Reasoning effort: `"low"`, `"medium"`, `"high"` |
505
+ | `agents.<name>.skills` | string[] | — | Skills this agent can use (`"*"` = all) |
526
506
 
527
507
  ---
528
508
 
529
- ## 🗑️ Uninstallation
509
+ ## Uninstallation
530
510
 
531
511
  1. **Remove the plugin from your OpenCode config**:
512
+
532
513
  Edit `~/.config/opencode/opencode.json` and remove `"oh-my-opencode-slim"` from the `plugin` array.
533
514
 
534
515
  2. **Remove configuration files (optional)**:
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "./orchestrator";
2
+ export declare function createDesignerAgent(model: string): AgentDefinition;
@@ -0,0 +1,2 @@
1
+ import type { AgentDefinition } from "./orchestrator";
2
+ export declare function createExplorerAgent(model: string): AgentDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,10 @@
1
1
  import type { ConfigMergeResult, DetectedConfig, InstallConfig } from "./types";
2
+ /**
3
+ * Strip JSON comments (single-line // and multi-line) and trailing commas for JSONC support.
4
+ * Note: When config files are read and written back, any comments will be lost as
5
+ * JSON.stringify produces standard JSON without comments.
6
+ */
7
+ export declare function stripJsonComments(json: string): string;
2
8
  export declare function isOpenCodeInstalled(): Promise<boolean>;
3
9
  export declare function isTmuxInstalled(): Promise<boolean>;
4
10
  export declare function getOpenCodeVersion(): Promise<string | null>;
@@ -0,0 +1 @@
1
+ export {};