{"id":41500902,"url":"https://github.com/subsy/ralph-tui","last_synced_at":"2026-02-20T23:15:11.967Z","repository":{"id":331849640,"uuid":"1132100727","full_name":"subsy/ralph-tui","owner":"subsy","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-14T12:36:36.000Z","size":4141,"stargazers_count":1817,"open_issues_count":31,"forks_count":170,"subscribers_count":15,"default_branch":"main","last_synced_at":"2026-02-14T21:41:21.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ralph-tui.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subsy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-11T10:29:12.000Z","updated_at":"2026-02-14T16:57:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/subsy/ralph-tui","commit_stats":null,"previous_names":["subsy/ralph-tui"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/subsy/ralph-tui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subsy%2Fralph-tui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subsy%2Fralph-tui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subsy%2Fralph-tui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subsy%2Fralph-tui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subsy","download_url":"https://codeload.github.com/subsy/ralph-tui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subsy%2Fralph-tui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29590685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T18:54:29.675Z","status":"ssl_error","status_checked_at":"2026-02-18T18:50:50.517Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-23T19:06:30.262Z","updated_at":"2026-02-20T23:15:11.960Z","avatar_url":"https://github.com/subsy.png","language":"TypeScript","funding_links":[],"categories":["Skills Catalog","AI","Autonomous Loop Runners","Implementations","TypeScript","Multi-Agent Systems","Harnesses \u0026 orchestration"],"sub_categories":["Workflow (50)","Parallel Processing","Tool-Specific Implementations","Orchestrators \u0026 autonomous loops"],"readme":"# Ralph TUI\n\n[![npm version](https://img.shields.io/npm/v/ralph-tui.svg)](https://www.npmjs.com/package/ralph-tui)\n[![CI](https://github.com/subsy/ralph-tui/actions/workflows/ci.yml/badge.svg)](https://github.com/subsy/ralph-tui/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/subsy/ralph-tui/graph/badge.svg)](https://codecov.io/gh/subsy/ralph-tui)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Built with Bun](https://img.shields.io/badge/Built%20with-Bun-f9f1e1.svg)](https://bun.sh)\n\n**AI Agent Loop Orchestrator** - A terminal UI for orchestrating AI coding agents to work through task lists autonomously.\n\nRalph TUI connects your AI coding assistant (Claude Code, OpenCode, Factory Droid, 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.\n\n![Ralph TUI Screenshot](docs/images/ralph-tui.png)\n\n## Quick Start\n\n```bash\n# Install\nbun install -g ralph-tui\n\n# Setup your project\ncd your-project\nralph-tui setup\n\n# Create a PRD with AI assistance\nralph-tui create-prd --chat\n\n# Run Ralph!\nralph-tui run --prd ./prd.json\n```\n\nThat's it! Ralph will work through your tasks autonomously.\n\n## Documentation\n\n**[ralph-tui.com](https://ralph-tui.com)** - Full documentation, guides, and examples.\n\n### Quick Links\n\n- **[Quick Start Guide](https://ralph-tui.com/docs/getting-started/quick-start)** - Get running in 2 minutes\n- **[Installation](https://ralph-tui.com/docs/getting-started/installation)** - All installation options\n- **[CLI Reference](https://ralph-tui.com/docs/cli/overview)** - Complete command reference\n- **[Configuration](https://ralph-tui.com/docs/configuration/overview)** - Customize Ralph for your workflow\n- **[Troubleshooting](https://ralph-tui.com/docs/troubleshooting/common-issues)** - Common issues and solutions\n\n## How It Works\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                                                                 │\n│   ┌──────────────┐     ┌──────────────┐     ┌──────────────┐   │\n│   │  1. SELECT   │────▶│  2. BUILD    │────▶│  3. EXECUTE  │   │\n│   │    TASK      │     │    PROMPT    │     │    AGENT     │   │\n│   └──────────────┘     └──────────────┘     └──────────────┘   │\n│          ▲                                         │            │\n│          │                                         ▼            │\n│   ┌──────────────┐                         ┌──────────────┐    │\n│   │  5. NEXT     │◀────────────────────────│  4. DETECT   │    │\n│   │    TASK      │                         │  COMPLETION  │    │\n│   └──────────────┘                         └──────────────┘    │\n│                                                                 │\n└─────────────────────────────────────────────────────────────────┘\n```\n\nRalph selects the highest-priority task, builds a prompt, executes your AI agent, detects completion, and repeats until all tasks are done.\n\n## Features\n\n- **Task Trackers**: prd.json (simple), Beads (git-backed with dependencies)\n- **AI Agents**: Claude Code, OpenCode, Factory Droid, Gemini CLI, Codex, Kiro CLI\n- **Session Persistence**: Pause anytime, resume later, survive crashes\n- **Real-time TUI**: Watch agent output, control execution with keyboard shortcuts\n- **Subagent Tracing**: See nested agent calls in real-time\n- **Cross-iteration Context**: Automatic progress tracking between tasks\n- **Flexible Skills**: Use PRD/task skills directly in your agent or via the TUI\n- **Remote Instances**: Monitor and control ralph-tui running on multiple machines from a single TUI\n\n## CLI Commands\n\n| Command | Description |\n|---------|-------------|\n| `ralph-tui` | Launch the interactive TUI |\n| `ralph-tui run [options]` | Start Ralph execution |\n| `ralph-tui resume` | Resume an interrupted session |\n| `ralph-tui status` | Check session status |\n| `ralph-tui logs` | View iteration output logs |\n| `ralph-tui setup` | Run interactive project setup |\n| `ralph-tui create-prd` | Create a new PRD interactively |\n| `ralph-tui convert` | Convert PRD to tracker format |\n| `ralph-tui config show` | Display merged configuration |\n| `ralph-tui template show` | Display current prompt template |\n| `ralph-tui plugins agents` | List available agent plugins |\n| `ralph-tui plugins trackers` | List available tracker plugins |\n| `ralph-tui run --listen` | Run with remote listener enabled |\n| `ralph-tui remote \u003ccmd\u003e` | Manage remote server connections |\n\n### Common Options\n\n```bash\n# Run with a PRD file\nralph-tui run --prd ./prd.json\n\n# Run with a Beads epic\nralph-tui run --epic my-epic-id\n\n# Override agent or model\nralph-tui run --agent claude --model sonnet\nralph-tui run --agent opencode --model anthropic/claude-3-5-sonnet\n\n# Limit iterations\nralph-tui run --iterations 5\n\n# Run headless (no TUI)\nralph-tui run --headless\n\n# Run agent in isolated sandbox (bwrap on Linux, sandbox-exec on macOS)\n# Requires bwrap to be installed and on PATH (Linux) or uses built-in sandbox-exec (macOS)\nralph-tui run --sandbox\n\n# Use a bundled color theme by name\nralph-tui run --theme dracula\n```\n\n### Create PRD Options\n\n```bash\n# Create a PRD with AI assistance (default chat mode)\nralph-tui create-prd\nralph-tui prime  # Alias\n\n# Use a custom PRD skill from skills_dir\nralph-tui create-prd --prd-skill my-custom-skill\n\n# Override agent\nralph-tui create-prd --agent claude\n\n# Output to custom directory\nralph-tui create-prd --output ./docs\n```\n\n### TUI Keyboard Shortcuts\n\n| Key | Action |\n|-----|--------|\n| `s` | Start execution |\n| `p` | Pause/Resume |\n| `d` | Toggle dashboard |\n| `T` | Toggle subagent tree panel (Shift+T) |\n| `t` | Cycle subagent detail level |\n| `o` | Cycle right panel views |\n| `,` | Open settings (local tab only) |\n| `C` | Open read-only config viewer (Shift+C, works on local and remote tabs) |\n| `q` | Quit |\n| `?` | Show help |\n| `1-9` | Switch to tab 1-9 (remote instances) |\n| `[` / `]` | Previous/Next tab |\n| `a` | Add new remote instance |\n| `e` | Edit current remote (when viewing remote tab) |\n| `x` | Delete current remote (when viewing remote tab) |\n\n**Dashboard (`d` key):** Toggle a status panel showing:\n- Current execution status and active task\n- Agent name and model (e.g., `claude-code`, `anthropic/claude-sonnet`)\n- Tracker source (e.g., `prd`, `beads`)\n- Git branch with dirty indicator (repo:branch*)\n- Sandbox status (🔒 enabled, 🔓 disabled) with mode\n- Auto-commit setting (✓ auto, ✗ manual)\n- Remote connection info (when viewing remote tabs)\n\nSee the [full CLI reference](https://ralph-tui.com/docs/cli/overview) for all options.\n\n### Custom Themes\n\nRalph TUI supports custom color themes via the `--theme` option:\n\n```bash\n# Use a bundled theme by name\nralph-tui run --theme dracula\n\n# Or use a custom theme file\nralph-tui run --theme ./my-custom-theme.json\n```\n\n![Custom Theme Example](docs/images/theme-example.png)\n\nBundled themes: `bright`, `catppuccin`, `dracula`, `high-contrast`, `solarized-light`\n\nSee the [Themes documentation](https://ralph-tui.com/docs/configuration/themes) for the full theme schema and creating custom themes.\n\n### Using Skills Directly in Your Agent\n\nInstall ralph-tui skills to your agent using [add-skill](https://github.com/vercel-labs/add-skill):\n\n```bash\n# Install all skills to all detected agents globally\nbunx add-skill subsy/ralph-tui --all\n\n# Install to a specific agent\nbunx add-skill subsy/ralph-tui -a claude-code -g -y\n\n# Or use the ralph-tui wrapper (maps agent IDs automatically)\nralph-tui skills install\nralph-tui skills install --agent claude\n```\n\nUse these slash commands in your agent:\n\n```bash\n/ralph-tui-prd           # Create a PRD interactively\n/ralph-tui-create-json   # Convert PRD to prd.json\n/ralph-tui-create-beads  # Convert PRD to Beads issues\n```\n\nThis lets you create PRDs while referencing source files (`@filename`) and using your full conversation context—then use `ralph-tui run` for autonomous execution.\n\n### Custom Skills Directory\n\nYou can configure a custom `skills_dir` in your config file to use custom PRD skills:\n\n```bash\n# In .ralph-tui/config.toml or ~/.config/ralph-tui/config.toml\nskills_dir = \"/path/to/my-skills\"\n\n# Then use custom skills\nralph-tui create-prd --prd-skill my-custom-skill\n```\n\nSkills must be folders inside `skills_dir` containing a `SKILL.md` file.\n\n## Remote Instance Management\n\nControl multiple ralph-tui instances running on different machines (VPS servers, CI/CD environments, development boxes) from a single TUI.\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│  LOCAL [1]│ ● prod [2]│ ◐ staging [3]│ ○ dev [4]│      +       │\n├─────────────────────────────────────────────────────────────────┤\n│                                                                 │\n│   Your local TUI can connect to and control remote instances    │\n│                                                                 │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n### Quick Start: Remote Control\n\n**On the remote machine (server):**\n```bash\n# Start ralph with remote listener enabled\nralph-tui run --listen --prd ./prd.json\n\n# First run generates a secure token - save it!\n# ═══════════════════════════════════════════════════════════════\n#                    Remote Listener Enabled\n# ═══════════════════════════════════════════════════════════════\n#   Port: 7890\n#   New server token generated:\n#   OGQwNTcxMjM0NTY3ODkwYWJjZGVmMDEyMzQ1Njc4OQ\n#   ⚠️  Save this token securely - it won't be shown again!\n# ═══════════════════════════════════════════════════════════════\n```\n\n**On your local machine (client):**\n```bash\n# Add the remote server\nralph-tui remote add prod server.example.com:7890 --token OGQwNTcxMjM0NTY3...\n\n# Test the connection\nralph-tui remote test prod\n\n# Launch TUI - you'll see tabs for local + remote instances\nralph-tui\n```\n\n### Remote Listener Commands\n\n**Recommended: Use `run --listen`** (runs engine with remote access):\n```bash\n# Start with remote listener on default port (7890)\nralph-tui run --listen --prd ./prd.json\n\n# Start with custom port\nralph-tui run --listen --listen-port 8080 --epic my-epic\n```\n\n**Token management:**\n```bash\n# Rotate authentication token (invalidates old token immediately)\nralph-tui run --listen --rotate-token --prd ./prd.json\n\n# View remote listener options\nralph-tui run --help\n```\n\n### Remote Configuration Commands\n\n```bash\n# Add a remote server\nralph-tui remote add \u003calias\u003e \u003chost:port\u003e --token \u003ctoken\u003e\n\n# List all remotes with connection status\nralph-tui remote list\n\n# Test connectivity to a specific remote\nralph-tui remote test \u003calias\u003e\n\n# Remove a remote\nralph-tui remote remove \u003calias\u003e\n\n# Push config to a remote (propagate your local settings)\nralph-tui remote push-config \u003calias\u003e\nralph-tui remote push-config --all  # Push to all remotes\n```\n\n### Push Configuration to Remotes\n\nWhen 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:\n\n```bash\n# Push config to a specific remote\nralph-tui remote push-config prod\n\n# Preview what would be pushed (without applying)\nralph-tui remote push-config prod --preview\n\n# Push to all configured remotes\nralph-tui remote push-config --all\n\n# Force overwrite existing config without confirmation\nralph-tui remote push-config prod --force\n\n# Push specific scope (global or project config)\nralph-tui remote push-config prod --scope global\nralph-tui remote push-config prod --scope project\n```\n\n**How it works:**\n1. Reads your local config (`~/.config/ralph-tui/config.toml` or `.ralph-tui/config.toml`)\n2. Connects to the remote instance\n3. Checks what config exists on the remote\n4. Creates a backup if overwriting (e.g., `config.toml.backup.2026-01-19T12-30-00-000Z`)\n5. Writes the new config\n6. Triggers auto-migration to install skills/templates\n\n**Scope selection:**\n- `--scope global`: Push to `~/.config/ralph-tui/config.toml` on remote\n- `--scope project`: Push to `.ralph-tui/config.toml` in remote's working directory\n- Without `--scope`: Auto-detects based on what exists locally and remotely\n\n### Security Model\n\nRalph uses a two-tier token system for secure remote access:\n\n| Token Type | Lifetime | Purpose |\n|------------|----------|---------|\n| Server Token | 90 days | Initial authentication, stored on disk |\n| Connection Token | 24 hours | Session authentication, auto-refreshed |\n\n**Security features:**\n- Without a token configured, the listener binds only to localhost (127.0.0.1)\n- With a token configured, the listener binds to all interfaces (0.0.0.0)\n- All connections require authentication\n- All remote actions are logged to `~/.config/ralph-tui/audit.log`\n- Tokens are shown only once at generation time\n\n### Connection Resilience\n\nRemote connections automatically handle network interruptions:\n\n- **Auto-reconnect**: Exponential backoff from 1s to 30s (max 10 retries)\n- **Silent retries**: First 3 retries are silent, then toast notifications appear\n- **Status indicators**: `●` connected, `◐` connecting, `⟳` reconnecting, `○` disconnected\n- **Metrics display**: Latency (ms) and connection duration shown in tab bar\n\n### Tab Navigation\n\nWhen connected to remote instances, a tab bar appears at the top of the TUI:\n\n| Key | Action |\n|-----|--------|\n| `1-9` | Jump directly to tab 1-9 |\n| `[` | Previous tab |\n| `]` | Next tab |\n| `Ctrl+Tab` | Next tab |\n| `Ctrl+Shift+Tab` | Previous tab |\n\nThe first tab is always \"Local\" (your current machine). Remote tabs show the alias you configured with connection status.\n\n### Managing Remotes from the TUI\n\nYou can add, edit, and delete remote servers directly from the TUI without leaving the interface:\n\n**Add Remote (`a` key):**\nOpens a form dialog to configure a new remote:\n- **Alias**: A short name for the remote (e.g., \"prod\", \"dev-server\")\n- **Host**: The server address (e.g., \"192.168.1.100\", \"server.example.com\")\n- **Port**: The listener port (default: 7890)\n- **Token**: The server token (displayed on the remote when you start with `--listen`)\n\nUse `Tab`/`Shift+Tab` to move between fields, `Enter` to save, `Esc` to cancel.\n\n**Edit Remote (`e` key):**\nWhen 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.\n\n**Delete Remote (`x` key):**\nWhen viewing a remote tab, press `x` to delete it. A confirmation dialog shows the remote details before deletion.\n\n### Full Remote Control\n\nWhen connected to a remote instance, you have full control:\n\n- **View**: Agent output, logs, progress, task list\n- **Control**: Pause, resume, cancel execution\n- **Modify**: Add/remove iterations, refresh tasks\n- **Start**: Begin new task execution\n\nAll operations work identically to local control with \u003c100ms perceived latency.\n\n### Configuration Files\n\n| File | Purpose |\n|------|---------|\n| `~/.config/ralph-tui/remote.json` | Server token storage |\n| `~/.config/ralph-tui/remotes.toml` | Remote server configurations |\n| `~/.config/ralph-tui/audit.log` | Audit log of all remote actions |\n| `~/.config/ralph-tui/listen.pid` | Daemon PID file |\n\n## Contributing\n\n### Development Setup\n\n```bash\ngit clone https://github.com/subsy/ralph-tui.git\ncd ralph-tui\nbun install\nbun run dev\n```\n\n### Build \u0026 Test\n\n```bash\nbun run build       # Build the project\nbun run typecheck   # Type check (no emit)\nbun run lint        # Run linter\nbun run lint:fix    # Auto-fix lint issues\n```\n\n### Testing\n\n```bash\nbun test            # Run all tests\nbun test --watch    # Run tests in watch mode\nbun test --coverage # Run tests with coverage\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md#testing) for detailed testing documentation including:\n- Test file naming conventions\n- Using factories and mocks\n- Writing new tests\n- Coverage requirements\n\n### Pull Request Requirements\n\nPRs must meet these requirements before being merged:\n- **\u003e50% test coverage** on new/changed lines (enforced by Codecov)\n- **Documentation updates** for any new or changed features\n- All CI checks passing (typecheck, lint, tests)\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md#pull-request-guidelines) for full PR guidelines.\n\n### Project Structure\n\n```\nralph-tui/\n├── src/\n│   ├── cli.tsx           # CLI entry point\n│   ├── commands/         # CLI commands (run, resume, status, logs, listen, remote, etc.)\n│   ├── config/           # Configuration loading and validation (Zod schemas)\n│   ├── engine/           # Execution engine (iteration loop, events)\n│   ├── interruption/     # Signal handling and graceful shutdown\n│   ├── logs/             # Iteration log persistence\n│   ├── plugins/\n│   │   ├── agents/       # Agent plugins (claude, opencode)\n│   │   │   └── tracing/  # Subagent tracing parser\n│   │   └── trackers/     # Tracker plugins (beads, beads-bv, json)\n│   ├── remote/           # Remote instance management\n│   │   ├── server.ts     # WebSocket server for remote control\n│   │   ├── client.ts     # WebSocket client with auto-reconnect\n│   │   ├── token.ts      # Two-tier token management\n│   │   ├── config.ts     # Remote server configuration (TOML)\n│   │   ├── audit.ts      # JSONL audit logging\n│   │   └── types.ts      # Type definitions\n│   ├── session/          # Session persistence and lock management\n│   ├── setup/            # Interactive setup wizard\n│   ├── templates/        # Handlebars prompt templates\n│   ├── chat/             # AI chat mode for PRD creation\n│   ├── prd/              # PRD generation and parsing\n│   └── tui/              # Terminal UI components (OpenTUI/React)\n│       └── components/   # React components (TabBar, Toast, etc.)\n├── skills/               # Bundled skills for PRD/task creation\n│   ├── ralph-tui-prd/\n│   ├── ralph-tui-create-json/\n│   └── ralph-tui-create-beads/\n├── website/              # Documentation website (Next.js)\n└── docs/                 # Images and static assets\n```\n\n### Key Technologies\n\n- [Bun](https://bun.sh) - JavaScript runtime\n- [OpenTUI](https://github.com/sst/opentui) - Terminal UI framework\n- [Handlebars](https://handlebarsjs.com) - Prompt templating\n\nSee [CLAUDE.md](CLAUDE.md) for detailed development guidelines.\n\n## Credits\n\nThanks to Geoffrey Huntley for the [original Ralph Wiggum loop concept](https://ghuntley.com/ralph/).\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubsy%2Fralph-tui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubsy%2Fralph-tui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubsy%2Fralph-tui/lists"}