AI Agent Loop Orchestrator - A terminal UI for orchestrating AI coding agents to work through task lists autonomously.
$ npx -y skills add subsy/ralph-tui --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
Repo: subsy/ralph-tui
What's inside
AI Agent Loop Orchestrator - A terminal UI for orchestrating AI coding agents to work through task lists autonomously.
Ralph TUI connects your AI coding assistant (Claude Code, OpenCode, Factory Droid, Cursor CLI, Gemini CLI, Codex, Kiro CLI) to your task tracker and runs them in an autonomous loop, completing tasks one-by-one with intelligent selection, error handling, and full visibility.

# Install
bun install -g ralph-tui
# Setup your project
cd your-project
ralph-tui setup
# Create a PRD with AI assistance
ralph-tui create-prd --chat
# Run Ralph!
ralph-tui run --prd ./prd.json
That's it! Ralph will work through your tasks autonomously.
ralph-tui.com - Full documentation, guides, and examples.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β 1. SELECT ββββββΆβ 2. BUILD ββββββΆβ 3. EXECUTE β β
β β TASK β β PROMPT β β AGENT β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β² β β
β β βΌ β
β ββββββββββββββββ ββββββββββββββββ β
β β 5. NEXT βββββββββββββββββββββββββββ 4. DETECT β β
β β TASK β β COMPLETION β β
β ββββββββββββββββ ββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Ralph selects the highest-priority task, builds a prompt, executes your AI agent, detects completion, and repeats until all tasks are done.
| Command | Description |
|---|---|
ralph-tui | Launch the interactive TUI |
ralph-tui run [options] | Start Ralph execution |
ralph-tui resume | Resume an interrupted session |
ralph-tui status | Check session status |
ralph-tui logs | View iteration output logs |
ralph-tui setup | Run interactive project setup |
ralph-tui create-prd | Create a new PRD interactively |
ralph-tui convert | Convert PRD to tracker format |
ralph-tui config show | Display merged configuration |
ralph-tui template show | Display current prompt template |
ralph-tui plugins agents | List available agent plugins |
ralph-tui plugins trackers | List available tracker plugins |
ralph-tui run --listen | Run with remote listener enabled |
ralph-tui remote <cmd> | Manage remote server connections |
# Run with a PRD file
ralph-tui run --prd ./prd.json
# Run with a Beads epic
ralph-tui run --epic my-epic-id
# Run one parallel session across multiple Beads epics
ralph-tui run --parallel --epic ui-epic --epic backend-epic
ralph-tui run --parallel --epics ui-epic,backend-epic
# Override agent or model
ralph-tui run --agent claude --model sonnet
ralph-tui run --agent opencode --model anthropic/claude-3-5-sonnet
# Limit iterations
ralph-tui run --iterations 5
# Run headless (no TUI)
ralph-tui run --headless
# Run agent in isolated sandbox (bwrap on Linux, sandbox-exec on macOS)
# Requires bwrap to be installed and on PATH (Linux) or uses built-in sandbox-exec (macOS)
ralph-tui run --sandbox
# Use a bundled color theme by name
ralph-tui run --theme dracula
# Create a PRD with AI assistance (default chat mode)
ralph-tui create-prd
ralph-tui prime # Alias
# Use a custom PRD skill from skills_dir
ralph-tui create-prd --prd-skill my-custom-skill
# Override agent
ralph-tui create-prd --agent claude
# Output to custom directory
ralph-tui create-prd --output ./docs
| Key | Action |
|---|---|
s | Start execution |
p | Pause/Resume |
d | Toggle dashboard |
g | Cycle scope filter in multi-epic sessions |
G | Reset scope filter to All |
T | Toggle subagent tree panel (Shift+T) |
t | Cycle subagent detail level |
o | Cycle right panel views |
a | Open agent/model picker (local tab only) |
, | Open settings (local tab only) |
C | Open read-only config viewer (Shift+C, works on local and remote tabs) |
q | Quit |
? | Show help |
1-9 | Switch to tab 1-9 (remote instances) |
[ / ] | Previous/Next tab |
A | Add new remote instance |
e | Edit current remote (when viewing remote tab) |
x | Delete current remote (when viewing remote tab) |
Multi-epic sessions: Repeated --epic and comma-separated --epics create one Ralph session across all selected hierarchy-tracker epics. Ralph uses one scheduler, one repo lock, one session branch, one merge queue, and task-scoped worktrees. The TUI scope filter (g/G) is only a local view filter over that session.
Dashboard (d key): Toggle a status panel showing:
claude-code, anthropic/claude-sonnet)prd, beads)See the full CLI reference for all options.
Ralph TUI supports custom color themes via the --theme option:
# Use a bundled theme by name
ralph-tui run --theme dracula
# Or use a custom theme file
ralph-tui run --theme ./my-custom-theme.json

Bundled themes: bright, catppuccin, dracula, high-contrast, solarized-light
See the Themes documentation for the full theme schema and creating custom themes.
Install ralph-tui skills to your agent using add-skill:
# Install all skills to all detected agents globally
bunx add-skill subsy/ralph-tui --all
# Install to a specific agent
bunx add-skill subsy/ralph-tui -a claude-code -g -y
bunx add-skill subsy/ralph-tui -a kiro-cli -g -y
# Or use the ralph-tui wrapper (maps agent IDs automatically)
ralph-tui skills install
ralph-tui skills install --agent claude
ralph-tui skills install --agent kiro
# If symlinked installs are problematic, copy files instead:
ralph-tui skills install --copy
Use these slash commands in your agent:
/ralph-tui-prd # Create a PRD interactively
/ralph-tui-create-json # Convert PRD to prd.json
/ralph-tui-create-beads # Convert PRD to Beads issues
This lets you create PRDs while referencing source files (@filename) and using your full conversation contextβthen use ralph-tui run for autonomous execution.
You can configure a custom skills_dir in your config file to use custom PRD skills:
# In .ralph-tui/config.toml or ~/.config/ralph-tui/config.toml
skills_dir = "/path/to/my-skills"
# Then use custom skills
ralph-tui create-prd --prd-skill my-custom-skill
Skills must be folders inside skills_dir containing a SKILL.md file.
Control multiple ralph-tui instances running on different machines (VPS servers, CI/CD environments, development boxes) from a single TUI.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LOCAL [1]β β prod [2]β β staging [3]β β dev [4]β + β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Your local TUI can connect to and control remote instances β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
On the remote machine (server):
# Start ralph with remote listener enabled
ralph-tui run --listen --prd ./prd.json
# First run generates a secure token - save it!
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Remote Listener Enabled
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Port: 7890
# New server token generated:
# OGQwNTcxMjM0NTY3ODkwYWJjZGVmMDEyMzQ1Njc4OQ
# β οΈ Save this token securely - it won't be shown again!
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
On your local machine (client):
# Add the remote server
ralph-tui remote add prod server.example.com:7890 --token OGQwNTcxMjM0NTY3...
# Test the connection
ralph-tui remote test prod
# Launch TUI - you'll see tabs for local + remote instances
ralph-tui
Recommended: Use run --listen (runs engine with remote access):
# Start with remote listener on default port (7890)
ralph-tui run --listen --prd ./prd.json
# Start with custom port
ralph-tui run --listen --listen-port 8080 --epic my-epic
Token management:
# Rotate authentication token (invalidates old token immediately)
ralph-tui run --listen --rotate-token --prd ./prd.json
# View remote listener options
ralph-tui run --help
# Add a remote server
ralph-tui remote add <alias> <host:port> --token <token>
# List all remotes with connection status
ralph-tui remote list
# Test connectivity to a specific remote
ralph-tui remote test <alias>
# Remove a remote
ralph-tui remote remove <alias>
# Push config to a remote (propagate your local settings)
ralph-tui remote push-config <alias>
ralph-tui remote push-config --all # Push to all remotes
When managing multiple ralph-tui instances, you typically want them all to use the same configuration. The push-config command lets you propagate your local config to remote instances:
# Push config to a specific remote
ralph-tui remote push-config prod
# Preview what would be pushed (without applying)
ralph-tui remote push-config prod --preview
# Push to all configured remotes
ralph-tui remote push-config --all
# Force overwrite existing config without confirmation
ralph-tui remote push-config prod --force
# Push specific scope (global or project config)
ralph-tui remote push-config prod --scope global
ralph-tui remote push-config prod --scope project
How it works:
~/.config/ralph-tui/config.toml or .ralph-tui/config.toml)config.toml.backup.2026-01-19T12-30-00-000Z)Scope selection:
--scope global: Push to ~/.config/ralph-tui/config.toml on remote--scope project: Push to .ralph-tui/config.toml in remote's working directory--scope: Auto-detects based on what exists locally and remotelyRalph uses a two-tier token system for secure remote access:
| Token Type | Lifetime | Purpose |
|---|---|---|
| Server Token | 90 days | Initial authentication, stored on disk |
| Connection Token | 24 hours | Session authentication, auto-refreshed |
Security features:
~/.config/ralph-tui/audit.logRemote connections automatically handle network interruptions:
β connected, β connecting, β³ reconnecting, β disconnectedWhen connected to remote instances, a tab bar appears at the top of the TUI:
| Key | Action |
|---|---|
1-9 | Jump directly to tab 1-9 |
[ | Previous tab |
] | Next tab |
Ctrl+Tab | Next tab |
Ctrl+Shift+Tab | Previous tab |
The first tab is always "Local" (your current machine). Remote tabs show the alias you configured with connection status.
You can add, edit, and delete remote servers directly from the TUI without leaving the interface:
Add Remote (A key):
Opens a form dialog to configure a new remote:
--listen)Use Tab/Shift+Tab to move between fields, Enter to save, Esc to cancel.
Edit Remote (e key):
When viewing a remote tab, press e to edit its configuration. The form pre-fills with current values. You can change any field, including the alias.
Delete Remote (x key):
When viewing a remote tab, press x to delete it. A confirmation dialog shows the remote details before deletion.
When connected to a remote instance, you have full control:
All operations work identically to local control with <100ms perceived latency.
| File | Purpose |
|---|---|
~/.config/ralph-tui/remote.json | Server token storage |
~/.config/ralph-tui/remotes.toml | Remote server configurations |
~/.config/ralph-tui/audit.log | Audit log of all remote actions |
~/.config/ralph-tui/listen.pid | Daemon PID file |
git clone https://github.com/subsy/ralph-tui.git
cd ralph-tui
bun install
bun run dev
bun run build # Build the project
bun run typecheck # Type check (no emit)
bun run lint # Run linter
bun run lint:fix # Auto-fix lint issues
bun test # Run all tests
bun test --watch # Run tests in watch mode
bun test --coverage # Run tests with coverage
See CONTRIBUTING.md for detailed testing documentation including:
PRs must meet these requirements before being merged:
See CONTRIBUTING.md for full PR guidelines.
ralph-tui/
βββ src/
β βββ cli.tsx # CLI entry point
β βββ commands/ # CLI commands (run, resume, status, logs, listen, remote, etc.)
β βββ config/ # Configuration loading and validation (Zod schemas)
β βββ engine/ # Execution engine (iteration loop, events)
β βββ interruption/ # Signal handling and graceful shutdown
β βββ logs/ # Iteration log persistence
β βββ plugins/
β β βββ agents/ # Agent plugins (claude, opencode)
β β β βββ tracing/ # Subagent tracing parser
β β βββ trackers/ # Tracker plugins (beads, beads-bv, json)
β βββ remote/ # Remote instance management
β β βββ server.ts # WebSocket server for remote control
β β βββ client.ts # WebSocket client with auto-reconnect
β β βββ token.ts # Two-tier token management
β β βββ config.ts # Remote server configuration (TOML)
β β βββ audit.ts # JSONL audit logging
β β βββ types.ts # Type definitions
β βββ session/ # Session persistence and lock management
β βββ setup/ # Interactive setup wizard
β βββ templates/ # Handlebars prompt templates
β βββ chat/ # AI chat mode for PRD creation
β βββ prd/ # PRD generation and parsing
β βββ tui/ # Terminal UI components (OpenTUI/React)
β βββ components/ # React components (TabBar, Toast, etc.)
βββ skills/ # Bundled skills for PRD/task creation
β βββ ralph-tui-prd/
β βββ ralph-tui-create-json/
β βββ ralph-tui-create-beads/
βββ website/ # Documentation website (Next.js)
βββ docs/ # Images and static assets
See CLAUDE.md for detailed development guidelines.
Thanks to Geoffrey Huntley for the original Ralph Wiggum loop concept.
MIT License - see LICENSE for details.
.beads/
.gitignore
config.yaml
issues.jsonl
metadata.json
.claude/
issue-244-analysis.md
.factory/
droids/
bash.md
explore.md
plan.md
settings.json
.github/
ISSUE_TEMPLATE/
bug_report.yaml
feature_request.yaml
workflows/
ci.yml
release.yml
.gitignore
AGENTS.md
assets/
sounds/
choc.wav
daddy.wav
feel.wav
funny.wav
icecream.wav
idunno.wav
iwon.wav
specialr.wav
themes/
bright.json
catppuccin.json
dracula.json
high-contrast.json
solarized-light.json
bun.lock
bunfig.toml
CLAUDE.md
CODE_OF_CONDUCT.md
codecov.yml
CONTRIBUTING.md
docs/
images/
ralph-tui.png
theme-example.png
investigations/
issue-247-session-resume-failures.md
jira-tracker.md
linear-tracker.md
plans/
2026-02-04-ai-conflict-resolution-design.md
screenshots/
ralph-after-plus.png
ralph-before-plus.png
solutions/
integration-issues/
parallel-tui-not-rendering.md
runtime-errors/
parallel-execution-hang-tracker-init.md
eslint.config.js
LICENSE
package.json
pnpm-lock.yaml
README.md
skills/
ralph-tui-create-beads/
ralph-tui-create-beads-rust/
SKILL.md
SKILL.md
ralph-tui-create-json/
SKILL.md
ralph-tui-prd/
SKILL.md
src/
chat/
engine.test.ts
engine.ts
index.ts
types.ts
cli.tsx
commands/
config.ts
convert.test.ts
convert.ts
create-prd-utils.ts
create-prd.test.tsx
create-prd.tsx
docs.ts
doctor.test.ts
doctor.ts
index.ts
info.test.ts
info.ts
listen.test.ts
listen.ts
logs.ts
plugins.ts
remote.test.ts
remote.ts
resume.tsx
run.test.ts
run.tsx
setup.ts
skills-install.test.ts
skills.test.ts
skills.ts
status.ts
template.ts
config/
index.test.ts
index.ts
schema.test.ts
schema.ts
types.test.ts
types.ts
engine/
auto-commit.ts
completion-detection.test.ts
index.test.ts
index.ts
memory-limits.test.ts
rate-limit-detector.ts
switch-to-user-agent.test.ts
types.ts
index.ts
interruption/
handler.ts
index.ts
types.ts
logs/
index.ts
persistence.ts
progress.ts
structured-logger.ts
types.ts
models-dev/
index.ts
notifications.ts
parallel/
ai-resolver.test.ts
ai-resolver.ts
conflict-resolver.test.ts
conflict-resolver.ts
events.ts
index.ts
merge-engine.test.ts
merge-engine.ts
parallel-executor.test.ts
session.test.ts
session.ts
task-graph.test.ts
task-graph.ts
types.ts
worker.test.ts
worker.ts
worktree-manager.test.ts
worktree-manager.ts
plugins/
agents/
base.memory.test.ts
base.test.ts
base.ts
builtin/
claude.test.ts
claude.ts
codex.test.ts
codex.ts
cursor.test.ts
cursor.ts
gemini.test.ts
gemini.ts
github-copilot.test.ts
github-copilot.ts
index.ts
kimi.test.ts
kimi.ts
kiro.test.ts
kiro.ts
opencode.ts
pi.ts
droid/
commandBuilder.ts
config.ts
index.ts
outputParser.test.ts
outputParser.ts
schema.ts
index.ts
opencode/
outputParser.ts
output-formatting.test.ts
output-formatting.ts
registry.ts
tracing/
index.ts
parser.ts
types.ts
types.ts
usage.ts
utils.ts
trackers/
base.ts
builtin/
beads/
beads-bv/
index.test.ts
index.ts
template.hbs
beads-rust/
beads-rust-bv/
index.ts
index.test.ts
index.ts
README.md
template.hbs
beads.test.ts
index.test.ts
index.ts
template.hbs
index.ts
jira/
adf.test.ts
adf.ts
client.test.ts
client.ts
index.test.ts
index.ts
template.hbs
types.ts
json/
index.ts
template.hbs
linear/
body.test.ts
body.ts
client.test.ts
client.ts
index.test.ts
index.ts
index.ts
multi-scope.test.ts
multi-scope.ts
registry.ts
task-ordering.ts
types.ts
prd/
generator.test.ts
generator.ts
index.ts
parser.test.ts
parser.ts
questions.ts
types.ts
wizard.ts
remote/
audit.test.ts
audit.ts
client.ts
config.test.ts
config.ts
index.ts
instance-manager.ts
server.test.ts
server.ts
token.test.ts
token.ts
types.ts
url.test.ts
url.ts
sandbox/
detect.test.ts
detect.ts
index.ts
types.ts
wrapper.test.ts
wrapper.ts
session/
atomic-write.ts
index.test.ts
index.ts
lock.ts
persistence.test.ts
persistence.ts
registry.test.ts
registry.ts
types.ts
setup/
index.ts
migration-install.test.ts
migration.test.ts
migration.ts
prompts.test.ts
prompts.ts
skill-installer-spawn.test.ts
skill-installer.test.ts
skill-installer.ts
types.ts
wizard.test.ts
wizard.ts
sound.ts
templates/
builtin.ts
engine.test.ts
engine.ts
index.ts
types.ts
tui/
components/
AgentModelPicker.test.ts
AgentModelPicker.tsx
App.tsx
ChatView.tsx
ConfirmationDialog.tsx
ConflictResolutionPanel.tsx
EpicLoaderOverlay.tsx
EpicSelectionApp.tsx
EpicSelectionView.tsx
FileBrowser.tsx
Footer.tsx
FormattedText.tsx
Header.tsx
HelpOverlay.tsx
ImageAttachmentCount.tsx
index.ts
IterationDetailView.tsx
IterationHistoryView.tsx
LeftPanel.tsx
MergeProgressView.tsx
ParallelProgressView.tsx
PrdChatApp.labels.test.ts
PrdChatApp.tsx
ProgressDashboard.tsx
RemoteConfigView.tsx
RemoteManagementOverlay.tsx
RightPanel.tsx
RunApp.tsx
ScopeFilterBar.tsx
SettingsView.test.ts
SettingsView.tsx
SubagentSection.tsx
SubagentTreePanel.tsx
TabBar.tsx
TaskDetailView.tsx
Toast.tsx
WorkerDetailView.tsx
hooks/
index.ts
useImageAttachment.ts
useImageAttachmentWithFeedback.ts
useInlineImageIndicators.ts
usePaste.ts
usePasteHint.ts
useToast.ts
index.ts
output-parser.test.ts
output-parser.ts
task-state.test.ts
task-state.ts
theme.ts
types.ts
utils/
clipboard-image.ts
exit-cleanup.ts
image-attachment.test.ts
image-detection.ts
image-storage.ts
marker-edit.ts
slash-commands.ts
token-format.ts
utils/
buffer-limits.ts
clipboard.ts
files.ts
fuzzy-search.ts
index.ts
logger.ts
process.ts
retry.ts
semver.test.ts
semver.ts
validation.test.ts
validation.ts
testing/
check-coverage.mjs
reset-test.sh
setup-test-workspace.sh
test-conflict-prd.json
test-prd.json
TESTING.md
tests/
commands/
config.test.ts
create-prd.test.ts
index.ts
info.test.ts
resume.test.ts
run-remote-only.test.ts
... 203 moreFAQ
ralph-tui is a Claude Code plugin with 4 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes ralph-tui-create-beads-rust, ralph-tui-create-beads, ralph-tui-create-json. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.