Skip to content

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:

Terminal window
sivtr search terminal --status failure --latest 1 --json

and a “recent work timeline” skill can use a timeline renderer:

Terminal window
sivtr search agent --since today --sort oldest --format timeline
sivtr search terminal --since today --sort oldest --format timeline

Search is target-first:

Terminal window
sivtr search terminal
sivtr search agent
sivtr search codex
sivtr search claude
sivtr search cursor
sivtr search hermes
sivtr search opencode
sivtr search openclaw
sivtr search grok
sivtr search pi
sivtr search qoder

Targets can narrow to a session, record/turn, and part:

Terminal window
sivtr search pi/019e5941 --match "cargo test"
sivtr search terminal/session_13104/3 --format workset
sivtr search pi/019e5941/3-5,7 --match "cargo test"
sivtr search pi/019e5941/3/p2 --format workset

Record/turn segments are 1-based and accept 3, 3-5, 3,7, or 3-5,7. Parts use the p<part> suffix (1-based, e.g. /3/p2). 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.

Targets can also use an origin prefix (origin:body) for another local workspace name or a remote name from sivtr remote add:

Terminal window
sivtr search desk:terminal --status failure --latest 5 --refs
sivtr search desk:agent -m "decision|failed" --latest 20 --save remote_hits --refs
sivtr show desk:terminal/session_42/3/p1 --full
sivtr show docs:codex/4

Origins come from sivtr remote add <alias> ... or sivtr ws list. Feature guide: Remote Access.

sivtr search is BM25-primary. A plain-text positional query (no regex) ranks the whole source by relevance, and becomes the default sort:

Terminal window
sivtr search terminal "docker pull failed"
sivtr search agent "connection refused"
sivtr search pi "cargo test"

--match is now an optional refinement: a case-insensitive regex that bounds the set before relevance ranking. With both a query and --match, the regex bounds the candidates and the query ranks them; --match alone keeps the classic regex-filter behavior and its text doubles as the rank query. No query and no --match means a recency browse (default --latest 5).

Terminal window
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:

FieldSearches
contentCombined record content. This is the default.
titleRecord/dialogue title
sessionSession id/title
inputUser input / command input
outputAssistant output / command output
commandTerminal command text
allAll searchable text
Terminal window
sivtr search agent --since today --format timeline
sivtr search terminal --since yesterday --until today --format md
sivtr search pi --last 2h --format compact

Time 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.

Terminal window
sivtr search terminal --status failure --latest 1 --json
sivtr search terminal --exit-code 101 --format timeline
sivtr search terminal --min-duration 500ms --sort duration --format compact

Useful sorts:

  • relevance — default with a plain-text QUERY or --match
  • newest
  • oldest
  • duration
  • duration-asc
  • exit-code
  • exit-code-asc

--latest <N> first keeps the latest N matching records. --sort then controls final presentation order. When neither --latest nor --limit is set, search defaults to --latest 5.

Terminal window
sivtr search agent --since today --format timeline
sivtr search agent --since today --format compact
sivtr search agent --since today --format md
sivtr search agent --since today --format workset

Formats are views over the same search result set, not separate APIs for humans vs agents. Pick the format that best fits the next step:

FormatGood for
timelineChronological scanning, handoff reconstruction, spotting gaps. Easy for both humans and agents to read.
compactShort time/source/title lists when you want low-noise context.
mdMarkdown bullets for notes, reports, prompts, or handoff drafts.
worksetStructured refs and materialized records when another command or program will parse the output.
refsPlain 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.

Use filter when you already have a WorkSet and want to narrow it without re-running a broad search:

Terminal window
sivtr search terminal --status failure --latest 20 --save failures --refs
sivtr filter @failures --match "panic|compile" --save focused --refs
sivtr filter @focused --parts --kind tool_result --refs

In a shell pipeline, @ reads WorkSet JSON from stdin:

Terminal window
sivtr search terminal --json | sivtr filter @ -m error --refs

Do not pipe --refs output into @; @ expects WorkSet JSON.

Use nav when the movement path matters. Motion is deterministic and does not expand children by default.

MotionMeaning
<Parent. Part/line to record; record to containing session records.
>NNth child, 1-based. Record children are its parts.
+NNext sibling by N at the current level.
-NPrevious sibling by N at the current level.
[A..B]Sibling window at the current level.
~Containing session records.

Examples:

Terminal window
sivtr nav @focused[1] '<' --refs
sivtr nav @focused[1] '<+1>1' --refs
sivtr nav @focused[1] '<[-2..+2]' --refs
sivtr nav @focused[1] '~' --refs

Use zoom for simple neighboring record context around hits.

Use var when a WorkSet should survive as named local memory:

Terminal window
sivtr var set ctx @last
sivtr var list
sivtr var merge ctx @focused @last[1]
sivtr var drop ctx @noise
sivtr show @ctx --full

Refs/selectors have this shape:

source/session[/record-or-turn[/p<part>]]

A concrete ref points at one record or one part. As command input, the record/turn segment can also be a selector such as 3-5,7; output refs remain concrete anchors. Part refs use p followed by a 1-based part index.

Print a record or turn:

Terminal window
sivtr show pi/<session>/<turn>
sivtr show terminal/<session>/<record>

Print a specific part:

Terminal window
sivtr show codex/<session>/<turn>/p1
sivtr show terminal/<session>/<record>/p2

Print multiple records with selector syntax:

Terminal window
sivtr show pi/<session>/3-5,7

Use WorkSet output for machine-readable piping:

Terminal window
sivtr show @ctx --json
  1. Search narrowly enough to get evidence:

    Terminal window
    sivtr search terminal --status failure --latest 1 --refs
    sivtr search agent --match "current task|failed|TODO" --since today --format timeline
  2. Save and narrow reusable result sets:

    Terminal window
    sivtr search agent --match "decision|TODO" --latest 20 --save hits --refs
    sivtr filter @hits --match "workspace|nav|filter" --save focused --refs
  3. Move or expand anchors when needed:

    Terminal window
    sivtr nav @focused[1] '<[-1..+1]' --refs
    sivtr zoom @focused[1] -C 2 --save ctx --refs
  4. Print exact content:

    Terminal window
    sivtr show @ctx --full
    sivtr show <source/session/record-or-turn>
  5. Use exact part refs (<source>/<session>/<turn>/p<n>) when you need compact citations, script input, or context handles for another agent.