Skip to content

Commit 51eaf59

Browse files
rencryptofishclaude
andcommitted
Update README to reflect current codebase
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent eba7067 commit 51eaf59

1 file changed

Lines changed: 43 additions & 23 deletions

File tree

README.md

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
Run multiple Claude, Codex, and Gemini agents in parallel, each in its own tmux session, managed from a single TUI.
1010

1111
[![Rust](https://img.shields.io/badge/rust-stable-orange.svg)](https://www.rust-lang.org/)
12-
[![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](#testing)
13-
[![Coverage](https://img.shields.io/badge/coverage-65%25-yellow.svg)](#testing)
12+
[![CI](https://github.com/rencryptofish/hydra/actions/workflows/ci.yml/badge.svg)](https://github.com/rencryptofish/hydra/actions/workflows/ci.yml)
1413
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
1514

1615
</div>
@@ -20,8 +19,8 @@ Run multiple Claude, Codex, and Gemini agents in parallel, each in its own tmux
2019
## Features
2120

2221
- **Sidebar + Preview layout** — browse all agent sessions in a list, see live output in the preview pane
23-
- **Compose mode** — press Enter to open compose, type a full message, press Enter to send, Esc to cancel (empty compose on Codex sends a bare Enter)
24-
- **Status indicators** — green (idle), red (running), yellow (exited) dots per session
22+
- **Compose mode** — press Enter to open compose, type a full message, press Enter to send, Esc to cancel (draft preserved). Prompt history with Up/Down arrows. Bracketed paste support for multiline input.
23+
- **Status indicators** — green (idle), red (running), yellow (exited) dots per session, with auto-clearing status messages
2524
- **Task timer** — tracks elapsed time for the current running task per agent
2625
- **Last message preview** — shows the last parsed assistant response per session from provider logs
2726
- **Auto-generated names** — sessions get NATO phonetic alphabet names (alpha, bravo, charlie, ...)
@@ -30,7 +29,8 @@ Run multiple Claude, Codex, and Gemini agents in parallel, each in its own tmux
3029
- **Diff tree** — sidebar shows per-file git diff stats grouped by directory
3130
- **Multi-agent support** — Claude (`claude --dangerously-skip-permissions`), Codex (`codex --yolo`), Gemini (`gemini --yolo`)
3231
- **Mouse support** — click to select sessions, scroll the preview pane
33-
- **Full scrollback** — scroll up through complete session history in the preview
32+
- **Full scrollback** — keyboard and mouse scrolling through complete session history (PgUp/PgDn, Home/End)
33+
- **Copy mode** — press `c` to release mouse capture for terminal text selection
3434
- **Low resource usage** — idle sessions skip pane captures, batch tmux queries, parallel agent resolution
3535

3636
## Requirements
@@ -56,51 +56,71 @@ To update later, run `hydra update`.
5656
## Usage
5757

5858
```bash
59-
hydra # launch the TUI
60-
hydra new NAME # create a new agent session
61-
hydra ls # list sessions
62-
hydra kill NAME # kill a session
59+
hydra # launch the TUI
60+
hydra new AGENT NAME # create a new agent session (claude/codex/gemini)
61+
hydra kill NAME # kill a session
62+
hydra ls # list sessions for the current project
63+
hydra update # update to the latest version from GitHub
6364
```
6465

6566
### Keybindings
6667

68+
**Browse mode**
69+
6770
| Key | Action |
6871
|-----|--------|
72+
| `j` / `k` | Navigate sessions |
73+
| `PgUp` / `PgDn` | Scroll preview pane |
74+
| `Home` / `End` | Jump to top / bottom of preview |
75+
| `Enter` | Open compose mode |
6976
| `n` | New session |
7077
| `d` | Delete session |
71-
| `Enter` | Open compose / send in compose mode |
72-
| `Esc` | Cancel compose / cancel modal |
73-
| `j` / `k` | Navigate sessions |
74-
| `Scroll` | Scroll preview pane |
78+
| `c` | Toggle copy mode (release mouse for text selection) |
7579
| `q` | Quit |
7680

81+
**Compose mode**
82+
83+
| Key | Action |
84+
|-----|--------|
85+
| `Enter` | Send message |
86+
| `Shift+Enter` | Insert newline |
87+
| `Up` / `Down` | Browse prompt history |
88+
| `PgUp` / `PgDn` | Scroll preview pane |
89+
| `Esc` | Cancel (draft preserved) |
90+
7791
## Architecture
7892

7993
Single-binary Rust TUI built on [ratatui](https://ratatui.rs) + [crossterm](https://docs.rs/crossterm) + [tokio](https://tokio.rs).
8094

8195
```
8296
src/
83-
├── main.rs CLI parsing, event loop, key dispatch
84-
├── app.rs UiApp state, mode machine (Browse/Compose/NewSessionAgent/ConfirmDelete)
85-
├── ui.rs All ratatui rendering (snapshot tested)
86-
├── tmux.rs SessionManager trait + subprocess tmux manager
97+
├── main.rs CLI parsing, terminal setup, event loop
98+
├── app.rs UiApp state, mode machine, key/mouse handlers
99+
├── backend.rs Backend actor (owns all I/O, communicates via channels)
100+
├── backend/ Runtime sub-components (session, message, preview)
101+
├── agent/ Per-provider log parsing and command builders
102+
├── ui.rs Root UI rendering (layout, draw dispatch)
103+
├── ui/ Rendering submodules (sidebar, preview, conversation, ...)
104+
├── tmux.rs SessionManager trait + subprocess tmux manager
87105
├── tmux_control.rs Persistent `tmux -C` control-mode manager
88-
├── session.rs Session/AgentType data types
89-
├── manifest.rs Session persistence (~/.hydra/<project>/sessions.json)
90-
├── logs.rs Claude/Codex/Gemini log readers + session/global stats
91-
└── event.rs Async crossterm event reader
106+
├── session.rs Session/AgentType data types
107+
├── manifest.rs Session persistence (~/.hydra/<project>/sessions.json)
108+
├── logs.rs Log readers + session/global stats + cost calculations
109+
├── event.rs Async crossterm event reader
110+
└── system/ Git diff parsing, process tree helpers
92111
```
93112

94113
Key design decisions:
114+
- **Backend/UI actor model** — Backend runs in `tokio::spawn`, owns all I/O, and communicates with the UI via `watch` (state snapshots) and `mpsc` (commands, previews). The UI event loop never blocks on I/O.
95115
- **`SessionManager` trait** — all tmux interaction is behind an async trait for testability (mock/noop impls in tests)
96-
- **Hybrid status detection** — prefers tmux output/activity signals and falls back to capture-based detection when needed
116+
- **Hybrid status detection** — prefers tmux `%output` notifications and falls back to capture-based detection when needed
97117
- **Session revival** — manifest file persists session metadata; on startup, dead sessions are recreated with agent-specific resume commands
98118
- **Async I/O** — all tmux subprocess calls and manifest file I/O use `tokio` to avoid blocking the event loop
99119
- **Nested session isolation** — safely runs from within Claude Code by unsetting `CLAUDECODE` env vars in spawned sessions
100120

101121
## Testing
102122

103-
450+ tests across unit, snapshot, CLI integration, and property-based:
123+
490+ tests across unit, snapshot, CLI integration, and property-based:
104124

105125
```bash
106126
cargo test # run all tests

0 commit comments

Comments
 (0)