Skip to content

Latest commit

History

15,534 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Dispatch

A multi-agent dashboard built on top of OpenCode, the open source AI coding agent.

Fork notice: This project is a fork of opencode (MIT License, Copyright 2025 opencode). It is not built by the OpenCode team and is not affiliated with them. See LICENSE for the full license text.


What is Dispatch?

image

demo2.mp4

Dispatch replaces OpenCode's single-session TUI with a multi-agent dashboard and adds the Claude Agent SDK as a backend for routing Anthropic API requests, authenticating with your existing Claude Code subscription. The Vercel AI SDK is retained for other providers.

Features added in this fork

Agent Dashboard (home screen)

  • Table view showing all active agents with columns: #, Name, Status, Activity
  • Agent registry backed by a KV store, decoupled from sessions
  • Live status per agent: Working (with spinner), Retrying, Waiting for user, Approve (y/n)
  • Inline permission approval: y to allow, n to reject pending tool-use requests directly from the dashboard
  • Detail row showing tool request context (bash command, diff preview, glob patterns)
  • Activity summary showing +additions -deletions files from the session

Dashboard Keybindings

Navigation

KeyAction
j / Move selection down
k / Move selection up
19Jump to agent #1–#9
0Jump to agent #10
!@#$%^&*()Jump to agents #11–#20

Agent Management

KeyAction
aCreate a new agent (prompts for directory and name)
wCreate a new worktree agent (git worktree + session)
dRemove selected agent from the dashboard
xDelete the worktree and all agents in that directory

Session Actions

KeyAction
EnterOpen the selected agent's session
iSend a message to the agent without leaving the dashboard
DOpen diff view for the agent's directory
tAttach a terminal to the agent's directory
cCopy the agent's directory path to the clipboard

Permission Approval

KeyAction
yApprove the pending tool-use request
nReject the pending tool-use request

GitHub / PR(visible only when GitHub is authenticated)

KeyAction
PCreate a pull request for the selected worktree branch
oCopy the PR URL to the clipboard
MMerge the open PR for the selected worktree branch
rRefresh diff stats and PR statuses

Claude Agent SDK backend

  • Added @anthropic-ai/claude-agent-sdk for routing Anthropic API requests (Vercel AI SDK retained for other providers)
  • Uses your existing Claude Code login (API key or subscription auth)
  • SDK owns the tool loop and execution (Read, Write, Edit, Bash, Glob, Grep)
  • App owns TUI rendering, permission UI, message persistence, and auth
  • Bridge architecture documented in packages/opencode/AGENTS.md

Installation

Option 1: curl (recommended)

Installs a pre-built binary for your platform to ~/.dispatch/bin/dispatch and adds it to your PATH:

curl -fsSL https://raw.githubusercontent.com/achin90/Dispatch/claudesdk/install | bash

To install a specific version:

curl -fsSL https://raw.githubusercontent.com/achin90/Dispatch/claudesdk/install | bash -s -- --version 0.1.0

Then run from any directory:

dispatch
dispatch ~/Documents/workspace

Option 2: Build from source

Requires Bun v1.3.11 or later. Clones, builds, and installs to ~/.dispatch/bin/dispatch:

git clone https://github.com/achin90/Dispatch.git
cd Dispatch
./install-from-source

To update, pull the latest changes and rerun:

git pull && ./install-from-source

Option 3: Development mode

Runs the TypeScript source directly via Bun without a build step:

git clone https://github.com/achin90/Dispatch.git
cd Dispatch
bun install
bun run dev
bun run dev ~/Documents/workspace

Usage

Database note

The built binary and bun run dev use separate SQLite databases by default (opencode.db vs opencode-local.db). To share the same database as dev mode:

OPENCODE_DB=opencode-local.db dispatch

Common Options

These flags work with both bun run dev and the built binary:

FlagDescription
[project]Path to project directory (positional arg)
--model, -mModel to use in the format provider/model
--continue, -cContinue the last session
--session, -sSession ID to continue
--help, -hShow help
--version, -vShow version

Subcommands

Dispatch also supports subcommands for headless/non-interactive use:

# run a single message non-interactively
bun run dev -- run "explain this codebase"# run in a specific directory non-interactively
bun run dev -- run --dir ~/Documents/workspace "explain this codebase"

Configuration

Dispatch respects the same configuration system as OpenCode. Config files use JSON or JSONC (JSON with Comments) format and are merged together, with later sources overriding earlier ones.

For full documentation see the OpenCode configuration docs.

Config File Locations (by precedence)

PrioritySourceLocation
1Remote config.well-known/opencode endpoint (organizational defaults)
2Global config~/.config/opencode/opencode.json
3Custom configPath specified via OPENCODE_CONFIG env var
4Project configopencode.json in project root
5Directory configs.opencode/ subdirectories (agents/, commands/, plugins/, etc.)
6Inline configOPENCODE_CONFIG_CONTENT env var

Key Configuration Options

  • model -- Main LLM model (e.g., "anthropic/claude-sonnet-4-5")
  • small_model -- Lightweight model for tasks like title generation
  • provider -- Provider configuration with timeout/cache settings
  • disabled_providers / enabled_providers -- Control which providers are available
  • tools -- Configure which tools the LLM can access (write, bash, edit, etc.)
  • agent -- Define custom specialized agents
  • mcp -- Model Context Protocol server configuration
  • autoupdate -- Auto-update handling (true/false/"notify")
  • permission -- Tool approval requirements ("ask" for confirmation)
  • instructions -- Path to custom instruction/rules files

Variable Substitution

Config values support variable substitution:

  • Environment variables:{env:VARIABLE_NAME} -- replaced with the env var value (empty string if not set)
  • File contents:{file:path/to/file} -- inlines the file contents (useful for API keys stored separately)

Schema

JSON schema files are available for editor autocompletion and validation:

  • Main config: https://opencode.ai/config.json
  • TUI config: https://opencode.ai/tui.json

Upstream OpenCode

This project tracks upstream opencode. For general OpenCode information:


License

MIT License -- see LICENSE.

This project includes code from opencode, Copyright 2025 opencode, used under the MIT License.

About

Dispatch TUI

Resources

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages