Shirei
Local daemon + CLI to supervise agent jobs (OpenCode) in isolated git worktrees and watch GitHub/GitLab PR/MR comments for commands.
Quick start
Install bundled binaries from crates.io:
This installs shirei, shirei-daemon, and shirei-tui together.
# required for GitHub provider (unless using mock):
# optional: for GitLab
In another terminal:
TOKEN=
# list jobs for a project
# attach opencode to an existing job session
CLI config
Optional config path: ~/.config/shirei/config.toml (or override with SHIREI_CONFIG).
[]
= "code --reuse-window {path}"
{path} is replaced with the job worktree path (or job cwd when no worktree is attached).
Polling-first PR/MR watching
Create a watch:
- GitHub:
github:owner/repo - GitLab:
gitlab:group/subgroup/project
Commands recognized in PR/MR comments:
/shirei fix <description>/shirei stop/shirei respond/shirei approve/shirei request-changes <feedback>
Manual jobs now enter a review loop when the agent run exits: Shirei marks them AWAITING_REVIEW, auto-creates a draft PR/MR when it can (and attaches a watch), and waits for /shirei approve or /shirei request-changes ....
Open a job branch/worktree in your configured editor:
TUI
Run the terminal UI against a running daemon:
Useful keys: d discover project, n create job, y approve, c request changes (rerun), g grant permission once, G grant permission always, x reject permission, 1-9 answer first pending question option, 0 reject question, a ack, u unack, k kill, r refresh, m maximize logs, t attach in background, e edit in background, o open linked PR in browser. Logs are colorized by source (agent, output, stderr).
Configuration
Shirei daemon loads config from ~/.local/share/shirei/config.json by default (or from
$SHIREI_STATE_DIR/config.json when SHIREI_STATE_DIR is set).
Current schema:
commands.opencodemay be a string ("opencode") or an argv array.- If omitted, default is
opencode. SHIREI_OPENCODE_CMDstill works and overrides config for compatibility.
Testing (mock opencode)
Tests may set SHIREI_OPENCODE_CMD or write config.json in the temp state dir.