Search and Show Results
sivtr search queries captured terminal records and supported AI workspace sessions. sivtr filter narrows existing WorkSets. sivtr nav moves anchors through parent/child/sibling/session structure. sivtr show prints the content behind refs or WorkSets.
Use them together when an interactive picker is too much and you want scriptable memory for a human workflow, an agent prompt, or another tool. They are also the safest primitives for skills because they can run non-interactively and return exact refs or WorkSet JSON.
For example, a “fix the terminal error” skill can start with:
sivtr search terminal --status failure --latest 1 --jsonand a “recent work timeline” skill can use a timeline renderer:
sivtr search agent --since today --sort oldest --format timelinesivtr search terminal --since today --sort oldest --format timelineSearch targets
Section titled “Search targets”Search is target-first:
sivtr search terminalsivtr search agentsivtr search codexsivtr search claudesivtr search hermessivtr search opencodesivtr search piTargets can narrow to a session, record/turn, and line:
sivtr search pi/019e5941 --match "cargo test"sivtr search terminal/session_13104/3/12 --format worksetsivtr search pi/019e5941/3-5,7 --match "cargo test"sivtr search pi/019e5941/3/5-7,10 --format worksetRecord/turn and line segments are 1-based and accept 3, 3-5, 3,7, or 3-5,7. Use * as a wildcard segment. Search selectors narrow the input scope; search output still returns concrete refs.
Use agent for every supported AI provider, or a provider name for one provider.
Content filters
Section titled “Content filters”sivtr search terminal --match "panic|failed"sivtr search agent --match "TODO|next step|decision"sivtr search pi --match "workspace picker" --in title--match is a case-insensitive regex. --in chooses the field:
| Field | Searches |
|---|---|
content | Combined record content. This is the default. |
title | Record/dialogue title |
session | Session id/title |
input | User input / command input |
output | Assistant output / command output |
command | Terminal command text |
all | All searchable text |
Time filters
Section titled “Time filters”sivtr search agent --since today --format timelinesivtr search terminal --since yesterday --until today --format mdsivtr search pi --last 2h --format compactTime filters accept RFC3339 timestamps, Unix seconds/milliseconds, relative durations like 30m, 2h, 7d, and aliases such as today, yesterday, tomorrow, this morning, this afternoon, this evening, tonight, and now.
Status, duration, and sorting
Section titled “Status, duration, and sorting”sivtr search terminal --status failure --latest 1 --jsonsivtr search terminal --exit-code 101 --format timelinesivtr search terminal --min-duration 500ms --sort duration --format compactUseful sorts:
newestoldestdurationduration-ascexit-codeexit-code-asc
--latest <N> first keeps the latest N matching records. --sort then controls final presentation order.
Output formats
Section titled “Output formats”sivtr search agent --since today --format timelinesivtr search agent --since today --format compactsivtr search agent --since today --format mdsivtr search agent --since today --format worksetFormats are views over the same search result set, not separate APIs for humans vs agents. Pick the format that best fits the next step:
| Format | Good for |
|---|---|
timeline | Chronological scanning, handoff reconstruction, spotting gaps. Easy for both humans and agents to read. |
compact | Short time/source/title lists when you want low-noise context. |
md | Markdown bullets for notes, reports, prompts, or handoff drafts. |
workset | Structured refs and materialized records when another command or program will parse the output. |
refs | Plain refs, one per line, for quick inspection or copy/paste. |
Terminal stdout defaults to full; piped stdout defaults to workset. Use --json as a convenient alias for --format workset. Agents can also read timeline, compact, or md when the task is interpretive rather than programmatic.
Filter WorkSets
Section titled “Filter WorkSets”Use filter when you already have a WorkSet and want to narrow it without re-running a broad search:
sivtr search terminal --status failure --latest 20 --save failures --refssivtr filter @failures --match "panic|compile" --save focused --refssivtr filter @focused --parts --io output --kind tool_output --refsIn a shell pipeline, @ reads WorkSet JSON from stdin:
sivtr search terminal --json | sivtr filter @ -m error --refsDo not pipe --refs output into @; @ expects WorkSet JSON.
Navigate anchors
Section titled “Navigate anchors”Use nav when the movement path matters. Motion is deterministic and does not expand children by default.
| Motion | Meaning |
|---|---|
< | Parent. Part/line to record; record to containing session records. |
>N | Nth child, 1-based. Record children are its parts. |
+N | Next sibling by N at the current level. |
-N | Previous sibling by N at the current level. |
[A..B] | Sibling window at the current level. |
~ | Containing session records. |
Examples:
sivtr nav @focused[1] '<' --refssivtr nav @focused[1] '<+1>1' --refssivtr nav @focused[1] '<[-2..+2]' --refssivtr nav @focused[1] '~' --refsUse zoom for simple neighboring record context around hits.
WorkSet variables
Section titled “WorkSet variables”Use var when a WorkSet should survive as named local memory:
sivtr var set ctx @lastsivtr var listsivtr var merge ctx @focused @last[1]sivtr var drop ctx @noisesivtr show @ctx --fullShow a ref
Section titled “Show a ref”Refs/selectors have this shape:
source/session[/record-or-turn[/line]]source/session/record/<i|o>/<part>A concrete ref points at one record, one line, or one part. As command input, the record/turn and line segments can also be selectors such as 3-5,7; output refs remain concrete anchors. Part refs use i (input) or o (output) followed by a 1-based part index.
Print a record or turn:
sivtr show pi/<session>/<turn>sivtr show terminal/<session>/<record>Print one 1-based line:
sivtr show claude/<session>/<turn>/<line>sivtr show terminal/<session>/<record>/<line>Print a specific input or output part:
sivtr show codex/<session>/<turn>/o/1sivtr show terminal/<session>/<record>/i/2Print multiple records or lines with selector syntax:
sivtr show pi/<session>/3-5,7sivtr show pi/<session>/3/5-7,10Use WorkSet output for machine-readable piping:
sivtr show @ctx --jsonPractical loop
Section titled “Practical loop”-
Search narrowly enough to get evidence:
Terminal window sivtr search terminal --status failure --latest 1 --refssivtr search agent --match "current task|failed|TODO" --since today --format timeline -
Save and narrow reusable result sets:
Terminal window sivtr search agent --match "decision|TODO" --latest 20 --save hits --refssivtr filter @hits --match "workspace|nav|filter" --save focused --refs -
Move or expand anchors when needed:
Terminal window sivtr nav @focused[1] '<[-1..+1]' --refssivtr zoom @focused[1] -C 2 --save ctx --refs -
Print exact content:
Terminal window sivtr show @ctx --fullsivtr show <source/session/record-or-turn> -
Use exact part/line refs when you need compact citations, script input, or context handles for another agent.