rpai-0.1.0 is not a library.
rpai
A TUI for managing multiple AI coding agent sessions (opencode, claude, codex, cursor) in tmux.
Features
- Interactive TUI with mouse support
- Scan for running AI agent processes
- Auto-refreshes every second - stays up-to-date with session state
- Running/Waiting indicator - shows if agent is active or waiting for input (▶/⏸)
- Jump to any AI session with Enter
- Multiple color themes (gruvbox, nord, catppuccin, dracula, tokyo, solarized)
- Opens as a tmux popup window
Installation
Option 1: Install from crates.io (Recommended)
Option 2: Install from source (Latest dev version)
This builds and installs rpai to ~/.cargo/bin/rpai automatically.
Cargo handles the build and installation - you don't need to copy files manually.
Option 3: Quick build script
This builds the binary to target/release/rpai for local testing.
Tmux Setup
Add this line to your ~/.tmux.conf:
Then reload tmux:
Now use it:
- Press
prefix + ato open rpai in a centered popup
Usage
Keyboard Shortcuts (TUI)
| Key | Action |
|---|---|
j / k / ↑ / ↓ |
Navigate sessions |
Enter |
Jump to selected session |
t |
Cycle through themes |
/ or : |
Enter command mode |
q / Esc / Ctrl-C |
Quit |
| Mouse click | Select session |
| Mouse scroll | Navigate sessions |
Commands (type after /)
theme [name]- Switch theme (gruvbox, nord, catppuccin, dracula, tokyo, solarized)themes- List available themes
Themes
- gruvbox (default) - Warm retro colors
- nord - Cool arctic blues
- catppuccin - Pastel mocha vibes
- dracula - Purple vampire aesthetic
- tokyo - Tokyo Night purple/blue
- solarized - Classic solarized dark
Theme is persisted to ~/.config/rpai/theme
How It Works
- Scans all processes for AI agent patterns (opencode, claude, codex, cursor)
- Walks the process tree to find the tmux pane containing each agent
- Displays sessions with agent type, PID, state (▶/⏸), uptime, memory usage, tmux location, and working directory
- When you select a session, jumps directly to that tmux pane
- Auto-refreshes every second to show current CPU usage and session state
Config Directory
~/.config/rpai/
theme- Current theme name
License
MIT