oh-my-opencode-slim 0.3.6 → 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,9 +10,9 @@
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
- > **[Antigravity](https://antigravity.ai) subscription recommended.** The pantheon is tuned for Antigravity's model routing. Other providers work, but you'll get the best experience with Antigravity.
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
 
17
17
  ---
18
18
 
@@ -27,20 +27,24 @@
27
27
  - [Explorer](#explorer)
28
28
  - [Oracle](#oracle)
29
29
  - [Librarian](#librarian)
30
- - [Frontend Designer](#frontend-designer)
31
- - [Document Writer](#document-writer)
32
- - [Multimodal Viewer](#multimodal-viewer)
33
- - [Code Simplifier](#code-simplifier)
30
+ - [Designer](#designer)
31
+ - [🧩 **Skills**](#-skills)
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)
34
37
  - [🛠️ **Tools & Capabilities**](#tools--capabilities)
35
38
  - [Tmux Integration](#tmux-integration)
36
39
  - [Quota Tool](#quota-tool)
37
40
  - [Background Tasks](#background-tasks)
38
41
  - [LSP Tools](#lsp-tools)
39
42
  - [Code Search Tools](#code-search-tools)
40
- - [🧩 **Skills**](#-skills)
41
- - [Playwright Integration](#playwright-integration)
42
43
  - [🔌 **MCP Servers**](#mcp-servers)
43
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)
44
48
  - [🗑️ **Uninstallation**](#uninstallation)
45
49
 
46
50
  ---
@@ -61,6 +65,20 @@ Or use non-interactive mode:
61
65
  bunx oh-my-opencode-slim install --no-tui --antigravity=yes --openai=yes --cerebras=no
62
66
  ```
63
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
+
64
82
  **Alternative: Ask any coding agent**
65
83
 
66
84
  Paste this into Claude Code, AmpCode, Cursor, or any coding agent:
@@ -135,24 +153,7 @@ After installation, guide the user:
135
153
  ```bash
136
154
  opencode auth login
137
155
  # Select: Google → OAuth with Google (Antigravity)
138
- ```
139
-
140
- **For OpenAI:**
141
- ```bash
142
- export OPENAI_API_KEY="sk-..."
143
- ```
144
-
145
- **For Cerebras:**
146
- ```bash
147
- export CEREBRAS_API_KEY="..."
148
- ```
149
-
150
- ---
151
-
152
- #### Step 5: Verify
153
-
154
- ```bash
155
- opencode
156
+ # Repeat for all other providers
156
157
  ```
157
158
 
158
159
  ---
@@ -187,10 +188,9 @@ The plugin follows a "Hub and Spoke" model:
187
188
  1. **User Prompt**: "Refactor the auth logic and update the docs."
188
189
  2. **Orchestrator**: Creates a TODO list.
189
190
  3. **Delegation**:
190
- - Launches an `@explore` background task to find all auth-related files.
191
+ - Launches an `@explorer` background task to find all auth-related files.
191
192
  - Launches a `@librarian` task to check the latest documentation for the auth library used.
192
193
  4. **Integration**: Once background results are ready, the Orchestrator performs the refactor.
193
- 5. **Finalization**: Passes the changes to `@document-writer` to update the README.
194
194
 
195
195
  ---
196
196
 
@@ -221,8 +221,8 @@ Write and execute code, orchestrate multi-agent workflows, parse the unspoken fr
221
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.
222
222
 
223
223
  **Role:** `Codebase reconnaissance`
224
- **Model:** `cerebras/zai-glm-4.6`
225
- **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)
226
226
 
227
227
  Regex search, AST pattern matching, file discovery, parallel exploration. *Read-only: they chart the territory; others conquer it.*
228
228
 
@@ -262,15 +262,15 @@ Documentation lookup, GitHub code search, library research, best practice retrie
262
262
 
263
263
  ---
264
264
 
265
- ### Frontend Designer
265
+ ### Designer
266
266
 
267
- <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>
268
268
 
269
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."
270
270
 
271
271
  **Role:** `UI/UX implementation and visual excellence`
272
272
  **Model:** `google/gemini-3-flash`
273
- **Prompt:** [src/agents/frontend.ts](src/agents/frontend.ts)
273
+ **Prompt:** [src/agents/designer.ts](src/agents/designer.ts)
274
274
 
275
275
  Modern responsive design, CSS/Tailwind mastery, micro-animations, component architecture. *Visual excellence over code perfection - beauty is the priority.*
276
276
 
@@ -278,58 +278,12 @@ Modern responsive design, CSS/Tailwind mastery, micro-animations, component arch
278
278
 
279
279
  ---
280
280
 
281
- ### Document Writer
282
-
283
- <a href="src/agents/document-writer.ts"><img src="img/scribe.png" alt="Document Writer" align="right" width="240"></a>
284
-
285
- > **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.
286
-
287
- **Role:** `Technical documentation and knowledge capture`
288
- **Model:** `google/gemini-3-flash`
289
- **Prompt:** [src/agents/document-writer.ts](src/agents/document-writer.ts)
290
-
291
- README crafting, API documentation, architecture docs, inline comments that don't insult your intelligence. *Match existing style; focus on "why," not just "what."*
292
-
293
- <br clear="both">
294
-
295
- ---
296
-
297
- ### Multimodal Viewer
298
-
299
- <a href="src/agents/multimodal.ts"><img src="img/multimodal.png" alt="Multimodal Viewer" align="right" width="240"></a>
300
-
301
- > **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.
302
-
303
- **Role:** `Image and visual content analysis`
304
- **Model:** `google/gemini-3-flash`
305
- **Prompt:** [src/agents/multimodal.ts](src/agents/multimodal.ts)
306
-
307
- Extract text from images, interpret diagrams, analyze UI screenshots, summarize visual documents. *Report what they observe; inference is for others.*
308
-
309
- <br clear="both">
310
-
311
- ---
312
-
313
- ### Code Simplifier
314
-
315
- <a href="src/agents/simplicity-reviewer.ts"><img src="img/code-simplicity.png" alt="Code Simplifier" align="right" width="240"></a>
316
-
317
- > **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.
318
-
319
- **Role:** `Code simplification and YAGNI enforcement`
320
- **Model:** `google/claude-opus-4-5-thinking`
321
- **Prompt:** [src/agents/simplicity-reviewer.ts](src/agents/simplicity-reviewer.ts)
322
-
323
- Identify unnecessary complexity, challenge premature abstractions, estimate LOC reduction, enforce minimalism. *Read-only: they judge; The Orchestrator executes the sentence.*
324
-
325
- <br clear="both">
326
-
327
- ---
328
-
329
281
  ## Tools & Capabilities
330
282
 
331
283
  ### Tmux Integration
332
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
+
333
287
  <img src="img/tmux.png" alt="Tmux Integration" width="800">
334
288
 
335
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.
@@ -352,40 +306,13 @@ Identify unnecessary complexity, challenge premature abstractions, estimate LOC
352
306
 
353
307
  #### Quick Setup
354
308
 
355
- **1. Enable the OpenCode HTTP server** (one-time setup)
356
-
357
- Add to your `~/.config/opencode/opencode.json`:
358
-
359
- ```json
360
- {
361
- "server": {
362
- "port": 4096
363
- }
364
- }
365
- ```
366
-
367
- **2. Enable tmux integration in the plugin**
368
-
369
- Add to your `~/.config/opencode/oh-my-opencode-slim.json`:
370
-
371
- ```json
372
- {
373
- "tmux": {
374
- "enabled": true,
375
- "layout": "main-vertical",
376
- "main_pane_size": 60
377
- }
378
- }
379
- ```
380
-
381
- **3. Run OpenCode inside tmux**
382
-
383
- ```bash
384
- tmux
385
- opencode
386
- ```
387
-
388
- That's it. When agents spawn, they'll appear in new panes.
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
+ ```
389
316
 
390
317
  #### Layout Options
391
318
 
@@ -397,23 +324,7 @@ That's it. When agents spawn, they'll appear in new panes.
397
324
  | `even-horizontal` | All panes side by side |
398
325
  | `even-vertical` | All panes stacked vertically |
399
326
 
400
- #### Configuration Reference
401
-
402
- ```json
403
- {
404
- "tmux": {
405
- "enabled": true,
406
- "layout": "main-vertical",
407
- "main_pane_size": 60
408
- }
409
- }
410
- ```
411
-
412
- | Option | Type | Default | Description |
413
- |--------|------|---------|-------------|
414
- | `enabled` | boolean | `false` | Enable/disable tmux integration |
415
- | `layout` | string | `"main-vertical"` | Tmux layout preset |
416
- | `main_pane_size` | number | `60` | Size of main pane as percentage (20-80) |
327
+ *See the [Option Reference](#option-reference) for detailed configuration.*
417
328
 
418
329
  ---
419
330
 
@@ -431,7 +342,6 @@ For Antigravity users. You can trigger this at any time by asking the agent to *
431
342
 
432
343
  ### Background Tasks
433
344
 
434
-
435
345
  The plugin provides tools to manage asynchronous work:
436
346
 
437
347
  | Tool | Description |
@@ -469,21 +379,55 @@ Fast code search and refactoring:
469
379
 
470
380
  ## 🧩 Skills
471
381
 
472
- Skills are specialized capabilities that combine MCP servers with specific instructions for the Orchestrator.
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.
473
383
 
474
- ### Playwright Integration
384
+ ### Available Skills
475
385
 
476
- **The Orchestrator's eyes and hands in the browser.**
386
+ | Skill | Description |
387
+ |-------|-------------|
388
+ | `yagni-enforcement` | Code complexity analysis and YAGNI enforcement |
389
+ | `playwright` | Browser automation via Playwright MCP |
477
390
 
478
- | Tool | Description |
479
- |------|-------------|
480
- | `omo_skill` | Loads a skill (e.g., `playwright`) and provides its instructions and available MCP tools |
481
- | `omo_skill_mcp` | Invokes a specific tool from an MCP server managed by a skill |
391
+ ### Default Skill Assignments
392
+
393
+ | Agent | Default Skills |
394
+ |-------|----------------|
395
+ | `orchestrator` | `*` (all skills) |
396
+ | `designer` | `playwright` |
397
+ | `oracle` | none |
398
+ | `librarian` | none |
399
+ | `explorer` | none |
400
+
401
+ ### YAGNI Enforcement
402
+
403
+ **The Minimalist's sacred truth: every line of code is a liability.**
404
+
405
+ Use after major refactors or before finalizing PRs. Identifies unnecessary complexity, challenges premature abstractions, estimates LOC reduction, and enforces minimalism.
406
+
407
+ ### Playwright Integration
408
+
409
+ **Browser automation for visual verification and testing.**
482
410
 
483
- #### Key Features
484
411
  - **Browser Automation**: Full Playwright capabilities (browsing, clicking, typing, scraping).
485
412
  - **Screenshots**: Capture visual state of any web page.
486
- - **Sandboxed Output**: Screenshots are safely saved to `/tmp/playwright-mcp-output/`.
413
+ - **Sandboxed Output**: Screenshots saved to session subdirectory (check tool output for path).
414
+
415
+ ### Customizing Agent Skills
416
+
417
+ Override skills per-agent in your [Plugin Config](#plugin-config-oh-my-opencode-slimjson):
418
+
419
+ ```json
420
+ {
421
+ "agents": {
422
+ "orchestrator": {
423
+ "skills": ["*"]
424
+ },
425
+ "designer": {
426
+ "skills": ["playwright"]
427
+ }
428
+ }
429
+ }
430
+ ```
487
431
 
488
432
  ---
489
433
 
@@ -499,42 +443,67 @@ Built-in Model Context Protocol servers (enabled by default):
499
443
 
500
444
  ### Disabling MCPs
501
445
 
502
- You can disable specific MCP servers in your config:
503
-
504
- ```json
505
- {
506
- "disabled_mcps": ["websearch", "grep_app"]
507
- }
508
- ```
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).
509
447
 
510
448
  ---
511
449
 
512
450
  ## Configuration
513
451
 
514
- You can customize the behavior of the plugin via JSON configuration files.
515
-
516
- ### Configuration Files
452
+ ### Files You Edit
517
453
 
518
- The plugin looks for configuration in two places (and merges them):
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) |
519
459
 
520
- 1. **User Global**: `~/.config/opencode/oh-my-opencode-slim.json` (or OS equivalent)
521
- 2. **Project Local**: `./.opencode/oh-my-opencode-slim.json`
460
+ > **Platform paths:** On Windows, user config may also be at `%APPDATA%\opencode\`.
522
461
 
523
- | Platform | User Config Path |
524
- | :--- | :--- |
525
- | **Windows** | `~/.config/opencode/oh-my-opencode-slim.json` or `%APPDATA%\opencode\oh-my-opencode-slim.json` |
526
- | **macOS/Linux** | `~/.config/opencode/oh-my-opencode-slim.json` |
462
+ ---
527
463
 
528
- ### Disabling Agents
464
+ ### Plugin Config (`oh-my-opencode-slim.json`)
529
465
 
530
- You can disable specific agents using the `disabled_agents` array:
466
+ All plugin options in one file:
531
467
 
532
468
  ```json
533
469
  {
534
- "disabled_agents": ["multimodal-looker", "code-simplicity-reviewer"]
470
+ "tmux": {
471
+ "enabled": true,
472
+ "layout": "main-vertical",
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
+ }
490
+ }
535
491
  }
536
492
  ```
537
493
 
494
+ #### Option Reference
495
+
496
+ | Option | Type | Default | Description |
497
+ |--------|------|---------|-------------|
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) |
506
+
538
507
  ---
539
508
 
540
509
  ## Uninstallation
@@ -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 {};