A flight recorder for your terminal. Record sessions, search output, annotate findings, extract commands.
$ cargo install broll
Everything you need to never lose terminal output again.
SQLite FTS5-powered search across all your sessions. Live search mode updates results as you type with 150ms debounce.
Automatically redacts passwords, tokens, AWS keys, JWTs, and database URLs before they hit disk. On by default.
Pull out just the commands from any session and save them as a runnable shell script. Turn debugging into documentation.
Correlate multiple terminals working on the same task. Tag sessions, group them, search across the whole context.
JSON keys, strings, and values get distinct colors. Log levels (ERROR, WARN, INFO, DEBUG) stand out. URLs and file:line references are highlighted.
Keyboard-driven TUI with mouse support, vim-style navigation, visual line mode for yanking, and in-session search.
Name sessions, add notes with annotate, rename, delete. No more remembering hex IDs — prefix matching works everywhere.
Share sessions as portable JSON files. Versioned format with duplicate detection on import.
See session counts, total storage size, and date ranges at a glance with broll stats.
broll start spawns your shell inside a PTY (pseudo-terminal). Everything flows through broll transparently.
Preexec/precmd hooks emit OSC markers so broll knows which lines are commands vs output. Tab completion, readline, and arrow keys all work normally.
A vt100 virtual terminal renders captured bytes to preserve column layout. Each chunk is timestamped and stored in SQLite with FTS5 indexing.
Before anything hits disk, regex patterns strip out env vars with secret-like names, bearer tokens, AWS keys, JWTs, DB connection strings, and private key blocks.
Exit the shell or run broll stop. The session is indexed and searchable immediately.
macOS: ~/Library/Application Support/broll/broll.db
Linux: ~/.local/share/broll/broll.db
Rust 1.85+ (edition 2024). Works with zsh and bash.
Three commands to get going.
When recording, the terminal tab title shows broll recording - <name> and BROLL_SESSION is set. Add it to your prompt:
Correlate multiple terminals working on the same task.
Every command with all options and examples.
Start recording a new session. Spawns a sub-shell inside a PTY in the current directory. Shell hooks capture commands in real-time.
| Flag | Description |
|---|---|
| -n, --name <NAME> | Give the session a name for easy identification and lookup |
| -t, --tag <TAG> | Tag the session for organization |
| -g, --group <GROUP> | Group ID to correlate multiple terminal sessions |
| -d, --dir <PATH> | Working directory for the session (defaults to current directory) |
| --no-filter | Disable sensitive content filtering |
Stop the current recording session. You can also just exit the shell.
List all recorded sessions with their IDs, names, timestamps, and group info.
| Flag | Description |
|---|---|
| -g, --group <GROUP> | Filter sessions by group |
Open the search TUI. Without arguments, enters live search mode where results update as you type (debounced 150ms). With a query, jumps straight to results. Two-panel layout: results list on the left, preview on the right.
| Flag | Description |
|---|---|
| -g, --group <GROUP> | Filter by group |
| -t, --terminal <TERM> | Filter by terminal label |
View a recorded session in a scrollable TUI with timestamped output, syntax highlighting for JSON/log levels/URLs, in-session search, and vim-style yank. Sessions can be referenced by ID, ID prefix, or name.
Extract just the commands from a session as a runnable shell script. Outputs to stdout by default.
| Flag | Description |
|---|---|
| -o, --output <FILE> | Write to a file instead of stdout |
Add a note to a recorded session. Notes are displayed at the top of the view TUI in a distinct colored section.
Rename a recorded session.
Delete one or more recorded sessions and all their data. Prompts for confirmation by default.
| Flag | Description |
|---|---|
| -f, --force | Skip confirmation prompt |
Export a session as a portable JSON file. Uses a versioned format (SessionExport) for compatibility.
| Flag | Description |
|---|---|
| -o, --output <FILE> | Write to a file instead of stdout |
Import a session from a JSON file. Duplicate sessions are detected and skipped.
Show storage statistics: session count, total size, and date range.
Keyboard and mouse controls for the TUI.
| j / Down | Move cursor down |
| k / Up | Move cursor up |
| Ctrl-d / PgDn | Page down |
| Ctrl-u / PgUp | Page up |
| g / Home | Go to top |
| G / End | Go to bottom |
| / | Search within session |
| n | Next search match |
| N | Previous search match |
| yy | Yank current line |
| Y | Same as yy |
| 3yy | Yank 3 lines from cursor |
| V | Visual line mode (select, then y) |
| Mouse scroll | Scroll up/down |
| Mouse click | Position cursor |
| q / Esc | Quit or go back to search |
| / / i | Edit search query |
| Tab | Switch focus (results / preview) |
| j / Down | Navigate or scroll |
| k / Up | Navigate or scroll |
| Enter | Open session at match |
| yy | Yank first line of result |
| Y | Yank full chunk |
| Mouse scroll | Scroll results or preview |
| Mouse click | Select result |
| q / Esc | Quit or dismiss input |
Filtering is on by default. Use --no-filter when you need to capture everything.
| Pattern | Example |
|---|---|
| Secret env vars | export API_KEY=sk-abc123 |
| Bearer tokens | Authorization: Bearer eyJ... |
| AWS access keys | AKIAIOSFODNN7EXAMPLE |
| Long secret values | token: aGVsbG8gd29ybGQ... |
| Database URLs | postgres://user:pass@host/db |
| JWTs | eyJhbG...eyJzdW...signature |
| Private key blocks | -----BEGIN PRIVATE KEY----- |
Edition 2024, requires 1.85+
Terminal UI framework
PTY sub-shell management
Virtual terminal rendering
Bundled SQLite with full-text search
Terminal resize handling