Skip to content

Ariestar/sivtr

Repository files navigation

sivtr logo

sivtr

Local workspace memory for terminal output and AI coding sessions.
Capture what happened, search it later, and let agents reuse exact local evidence.
Your agent memory doesn’t need to be a heavyweight knowledge system.

Crates.io VS Code Marketplace CI Ask DeepWiki Rust linux.do

English · 简体中文 · Docs · 中文文档

sivtr demo: save search results as variables and keep narrowing
Save matches as memory variables and keep narrowing · Fix terminal errors · Build timelines · Handoff with evidence


Why sivtr?

Developers and agents lose time reconstructing context that already exists locally: terminal failures, test output, tool logs, and previous AI sessions. sivtr turns that work into searchable memory without asking you to adopt a heavyweight knowledge system.

With sivtr, you can:

  • ask an agent to fix the latest failure without pasting the log;
  • find yesterday's test output, build error, or decision in seconds;
  • reopen the exact command output or agent reply behind a summary;
  • save useful search results as named variables like @failures and reuse them in the next command.

Important

For agent workflows, install both the sivtr CLI and the bundled sivtr-memory skill. The CLI stores and retrieves local memory; the skill teaches your agent when and how to use it.

Features

  • Shell history that keeps the output: capture commands from Bash, Zsh, PowerShell, and Nushell, including stdout, stderr, exit code, cwd, and timing.
  • A viewer for long output: pipe cargo test, build logs, or stack traces into a fast keyboard-first TUI.
  • One search box for local work: search terminal output and Codex, Claude Code, Hermes, OpenCode, and Pi sessions from the current repo.
  • Click-back / copy-back evidence: every match can be shown, copied, expanded with nearby context, or handed to an agent.
  • Named memory variables: save any result set as @failures, reuse @last, pass stdin as @, list vars with sivtr var list, and select slices like @failures[1,3..5].
  • Deterministic anchor navigation: move refs through parent/child/sibling/session structure with sivtr nav, without implicit expansion.
  • Agent-ready memory through the bundled sivtr-memory skill.
  • Diagnostics with sivtr doctor, sivtr init show, and sivtr init uninstall.

Quick start

Install the CLI:

cargo install sivtr

Or use the prebuilt installer on Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/Ariestar/sivtr/main/install.sh | sh

Enable shell capture:

sivtr init bash       # or zsh, powershell, nushell
sivtr doctor

Capture and browse output:

cargo test 2>&1 | sivtr

Search recent workspace memory:

sivtr s agent -m "TODO|decision|failed" --since today -f timeline
sivtr s terminal --status failure --latest 1 --refs

Agent memory

Install the bundled skill globally:

npx skills add Ariestar/sivtr --skill sivtr-memory -g

Then ask your coding agent to use local memory first:

Fix the latest terminal error. Use sivtr first.

Instead of asking you to paste logs, the agent can search local evidence, open the exact matching output, patch the code, and verify the fix.

Examples

More end-to-end walkthroughs live in the Playbooks.

Workflow What you do Demo
Fix the latest terminal error Ask your agent:
Fix the latest terminal error. Use sivtr first.
Fix the latest terminal error with sivtr
Browse and copy recent terminal output cargo test 2>&1 | sivtr
sivtr copy out --print
Browse and copy recent terminal output
Turn recent work into a timeline sivtr s agent --since today --sort oldest -f timeline
sivtr s terminal --since today --sort oldest -f timeline
Build a recent work timeline
Save results as variables and chain them sivtr s terminal -m "panic" --save failures
sivtr filter @failures --status failure --refs
sivtr var list
Chain saved memory variables
Continue after interruption Ask your agent:
Continue. Use sivtr memory first.
Continue after interruption with sivtr memory
Prepare a handoff for the next agent Ask your agent:
Give the next agent a handoff with evidence.
Prepare an evidence-backed handoff

Core concepts

Concept Meaning
WorkRecord One useful work event: a terminal command, agent turn, tool call, or captured output block.
WorkPart The command, output, assistant reply, tool output, or error inside a record. Use this when you only need the useful part, not the whole event.
WorkRef A stable address for one exact piece of memory, for example pi/<session>/3/o/1. Good for citations and reproducible handoffs.
WorkSet The data behind memory variables such as @last and @failures: an ordered list of refs you can filter, save, slice, pipe, navigate, expand, and show.

Memory variables:

Handle Use
@last The latest search or projection result.
@name A named variable created with --save name or sivtr var set name, for example @failures.
@name[1,3..5] Pick only a few items from a saved variable.
@ Use the result coming from the previous command in a pipeline.

Command overview

Command Purpose
sivtr / sivtr pipe Read stdin and open the output browser.
sivtr run <command> Execute a command, capture output, then browse it.
sivtr copy Copy recent terminal command blocks.
sivtr copy <provider> Copy content from Codex, Claude Code, Hermes, OpenCode, or Pi sessions.
sivtr search / sivtr s Search terminal and agent memory; saves matches as @last.
sivtr filter <source> Apply the shared WorkSet filters to a source or piped WorkSet.
sivtr var List, save, remove, merge, drop, or clean up named WorkSet variables.
sivtr nav <source> <motion> Move anchors deterministically with <, >N, +N, -N, [A..B], and ~.
sivtr work sessions List terminal and agent sessions in the current workspace.
sivtr work records <source> Turn sessions or saved variables into event-level refs.
sivtr work parts <source> Extract only useful inputs/outputs from matching events.
sivtr show <ref-or-workset> Print the content behind refs, @last, @name, or piped results.
sivtr zoom <source> Add surrounding record context around search hits.
sivtr diff <left> <right> Compare recent command blocks.
sivtr doctor Diagnose binary, config, session logs, hooks, providers, and clipboard.
sivtr init <shell> Install shell integration; also supports show and uninstall.
sivtr config Manage the TOML config file.
sivtr history List, search, and show captured output history.
sivtr hotkey Manage the Windows AI session picker hotkey daemon.

Supported sources

Source Support
Terminal Bash, Zsh, PowerShell, Nushell shell hooks; pipe and run capture.
Codex Local rollout/session JSONL files.
Claude Code Local transcript/session files.
Hermes Local Hermes session JSONL files.
OpenCode Local session data.
Pi Local Pi agent session logs.

Documentation

Development

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

Docs site:

cd docs-site
bun install --frozen-lockfile
bun run build

Repository layout:

crates/sivtr-core/  core model, provider parsers, search, history, config
src/                CLI commands, TUI, shell hooks, hotkey integration
docs-site/          Astro/Starlight documentation site
editors/vscode/     VS Code bridge for the AI session picker
skills/             bundled agent skills

About

A unified agent memory workspace for human and agent

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages