Skip to content

Capture Terminal Output

Capture is the first step in turning terminal output into reusable text. Use the lightest capture path that matches what you need.

Use caseBest commandKeeps command metadata?
Inspect one existing command pipelinecommand 2>&1 | sivtrNo
Let sivtr run one commandsivtr run commandPartially, for the captured run
Browse the current shell’s recorded worksivtr importYes, after shell integration
Copy one recent command blocksivtr copy outYes, after shell integration
Search saved output historysivtr history search "query"Yes, for saved captures

Pipe mode reads stdin and opens the result.

Terminal window
ls -la | sivtr
cargo build 2>&1 | sivtr
rg "TODO" . | sivtr

Use pipe mode when:

  • the command already exists in your shell history;
  • you want normal shell behavior for pipelines and redirection;
  • you do not need sivtr to know the original command.

For commands that write important output to stderr, redirect stderr to stdout:

Terminal window
cargo test 2>&1 | sivtr

Run mode executes the command through sivtr:

Terminal window
sivtr run cargo test
sivtr run git status --short

Use run mode when:

  • you want sivtr to execute and capture a single command;
  • you want the exit status printed before browsing;
  • you prefer not to manage shell redirection manually.

Run mode captures stdout and stderr together. If the command produces no output, sivtr exits after reporting that nothing was captured.

Shell integration records structured command entries over time. After installing it, open the current session log:

Terminal window
sivtr import

This is useful when you have been working normally and later want to browse the accumulated session as one workspace.

Install shell integration with:

Terminal window
sivtr init powershell
sivtr init bash
sivtr init zsh
sivtr init nushell

Restart the shell after installation.

Captured output is saved to local history when [history].auto_save is enabled. Search it later with:

Terminal window
sivtr history search "panic"
sivtr history show 42

History is separate from the current shell session log: history is a longer-lived SQLite store, while session logs are per-shell structured records for recent command blocks.