Core Concepts
Capture
Section titled “Capture”Capture is the act of turning terminal text into structured data that sivtr can browse, search, select, or copy.
sivtr supports three practical capture paths:
- stdin pipe:
command | sivtr; - subprocess wrapper:
sivtr run <command>; - shell session hook:
sivtr init <shell>followed by normal terminal use.
Pipe and run mode are immediate. Shell integration builds a session log over time.
Session log
Section titled “Session log”A session log is a JSONL file containing command entries. Each entry stores:
- prompt;
- command;
- output;
- optional ANSI-preserved prompt;
- optional ANSI-preserved output.
The plain versions are used for stable copying, searching, and parsing. ANSI versions are kept when available so --ansi can preserve colors.
Command block
Section titled “Command block”A command block is the input and output for one command:
PS C:\repo> cargo testrunning 42 teststest result: oksivtr copy can operate on the whole block, only the input, only the output, or the bare command.
Selector
Section titled “Selector”A selector chooses recent command blocks or Codex blocks.
| Selector | Meaning |
|---|---|
1 | Latest matching block |
2 | Second latest matching block |
2..4 | Range of recent blocks |
Selectors are intentionally relative to recency, because the most common task is to reuse what just happened.
Open mode
Section titled “Open mode”Captured output can open in either:
- the built-in TUI browser;
- an external editor.
Configure this with:
[general]open_mode = "tui"or:
[general]open_mode = "editor"