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.
Choose a capture path
Section titled “Choose a capture path”| Use case | Best command | Keeps command metadata? |
|---|---|---|
| Inspect one existing command pipeline | command 2>&1 | sivtr |
No |
Let sivtr run one command |
sivtr run command |
Partially, for the captured run |
| Browse the current workspace’s recorded work | sivtr |
Yes, after shell integration |
| Copy one recent command block | sivtr copy out |
Yes, after shell integration |
| Search captured terminal and AI work | sivtr search "query" |
Yes, from the unified archive |
Pipe mode
Section titled “Pipe mode”Pipe mode archives stdin in the unified archive and opens the result in the external editor.
ls -la | sivtrcargo build 2>&1 | sivtrrg "TODO" . | sivtrUse pipe mode when:
- the command already exists in your shell history;
- you want normal shell behavior for pipelines and redirection;
- you do not need
sivtrto know the original command.
For commands that write important output to stderr, redirect stderr to stdout:
cargo test 2>&1 | sivtrRun mode
Section titled “Run mode”Run mode executes the command through sivtr:
sivtr run cargo testsivtr run git status --shortUse run mode when:
- you want
sivtrto execute and capture a single command; - you want the exit status reported and the output saved before the editor opens;
- you prefer not to manage shell redirection manually.
Run mode captures stdout and stderr together and saves the result to the unified archive. If the command produces no output, sivtr exits after reporting that nothing was captured.
Shell session browsing
Section titled “Shell session browsing”Shell integration records structured command entries over time. After installing it, open the workspace browser:
sivtrThis is useful when you have been working normally and later want to browse the accumulated terminal work.
Install shell integration with:
sivtr init powershellsivtr init bashsivtr init zshsivtr init nushellRestart the shell after installation.
Search captured output
Section titled “Search captured output”pipe and run records are terminal sessions in the same archive.db as shell and agent sessions. Search or show them through the normal archive commands:
sivtr search "panic"sivtr show terminal/<session>/<record>