Skip to content

Quickstart

Jeremy edited this page Mar 31, 2026 · 1 revision

Quickstart

Get a swarm running in under 5 minutes.

1. Install the plugin

mkdir -p .opencode/plugins
cp /path/to/opencode-omoc-swarm/plugins/omoc-swarm.ts .opencode/plugins/omoc-swarm.ts

Or from the published npm package:

npx degit Delqhi/opencode-omoc-swarm/plugins .opencode/plugins

2. Start OpenCode

opencode

The plugin auto-loads from .opencode/plugins/. You'll see the swarm tools appear in the tool list.

3. Create a swarm

In your OpenCode session, call:

swarm.create

This spawns 4 default member sessions: plan, build, explore, reviewer.

4. Send a parallel task

swarm.parallel  prompt="Analyze the codebase and find any security vulnerabilities"

All members run the prompt simultaneously. Results come back as a combined report.

5. Use MAX mode for coding tasks

swarm.max  prompt="Refactor the auth module to use JWT"  tries=3

3 agents each attempt the refactor in isolated git worktrees. A selector agent reviews all 3 and applies the best one.

6. Check swarm status

swarm.status

Shows all members, their session IDs, and current swarm ID.


Using the oc-swarm Launcher (tmux)

For a full side-by-side terminal layout:

# Copy the launcher
mkdir -p bin
cp /path/to/opencode-omoc-swarm/bin/oc-swarm bin/oc-swarm
cp /path/to/opencode-omoc-swarm/templates/bin/opencode bin/opencode
cp /path/to/opencode-omoc-swarm/templates/.envrc .envrc
chmod +x bin/oc-swarm bin/opencode
direnv allow

# Launch
./bin/oc-swarm --dir /path/to/your/project

This opens a tmux layout with one pane per swarm member, all attached to the same project directory.

Clone this wiki locally