Session Replay

The suv replay command shows a chronological timeline of your commands, giving you a linear playback of what happened in your terminal. Combined with suv sessions, you can browse and inspect individual sessions interactively.

Basic Usage

Replay the most recent commands in chronological order:

suv replay

Each entry shows the timestamp, command, working directory, exit code, and duration. The output is plain text, designed to be readable both in the terminal and when piped to other tools.

Command-Line Flags

Filter the replay to focus on specific time ranges, directories, or executors:

Flag Description Example
--session Replay a specific session by ID suv replay --session a1b2c3d4
--after Show commands after a date or relative time suv replay --after today
--before Show commands before a date or relative time suv replay --before yesterday
--tag Filter by session tag suv replay --tag deploy
--exit-code Filter by exit code suv replay --exit-code 1
--executor Filter by executor (e.g., claude-code, user) suv replay --executor claude-code
--here Only show commands run in the current directory suv replay --here
--cwd Filter by a specific working directory path suv replay --cwd ~/projects/myapp

Examples

Replay today's commands

suv replay --after today

Shows every command you ran today in chronological order, across all sessions and directories.

Replay commands in the current directory

suv replay --here

Shows the timeline of commands that were run in your current working directory, regardless of when they happened. Useful for understanding the history of a specific project.

Find yesterday's failures

suv replay --after yesterday --exit-code 1

Shows commands from yesterday onward that exited with code 1. Helps you retrace debugging sessions.

Replay what an AI agent did

suv replay --executor claude-code --after "1 hour ago"

Shows commands executed by Claude Code in the last hour. Essential for auditing AI agent behavior.

Replay a specific session

suv replay --session a1b2c3d4

Replays all commands from a single terminal session identified by its session ID. You can find session IDs using suv sessions or suv status.

Piping and Redirection

The output of suv replay is pipeable plain text. You can combine it with standard Unix tools:

# Search replay output for a specific pattern
suv replay --after today | grep "docker"

# Save a session replay to a file
suv replay --session a1b2c3d4 > session-log.txt

# Count how many commands were run today
suv replay --after today | wc -l

This makes suv replay useful for scripting, auditing, and generating reports.

Session Browser

The suv sessions command launches an interactive TUI for browsing your terminal sessions:

suv sessions

The session browser shows a list of sessions with their start time, duration, command count, and tags. Select a session to see its full command timeline.

Type to filter the session list, use Up/Down to navigate, and Enter to open a timeline. Ctrl+F opens filters and Ctrl+X clears filters. Esc quits the picker immediately. Letters and digits are query text, including q, j, and k.

Inside a timeline, q or Esc returns to the session list. The legacy suv session spelling still works.

Session Command-Line Flags

Flag Description Example
[SESSION_ID] Jump directly to a specific session suv sessions a1b2c3d4
--list List sessions as plain text (non-interactive) suv sessions --list
--after Show sessions after a date or relative time suv sessions --after "1 week ago"
--tag Filter sessions by tag suv sessions --tag deploy
-n / --limit Limit the number of sessions shown suv sessions -n 10

Session Examples

# Browse sessions from the last week
suv sessions --after "1 week ago"

# List the 5 most recent sessions (non-interactive)
suv sessions --list -n 5

# Open a specific session directly
suv sessions a1b2c3d4

# Find sessions tagged "deploy"
suv sessions --tag deploy
Tip: Each terminal tab, window, or tmux pane gets its own session ID. Sessions are created automatically when Suvadu's shell hooks detect a new shell process. You can tag sessions with suv tag associate <name> to make them easier to find later.