Skip to content

CLI Reference

This page documents the public CLI surface. Keep it aligned with src/cli.rs.

Terminal window
sivtr [COMMAND]

If no command is provided, sivtr reads from stdin, matching pipe mode.

Terminal window
sivtr run <COMMAND> [ARGS...]

Runs a command, captures combined output, reports the exit status, and opens the captured output.

Examples:

Terminal window
sivtr run cargo test
sivtr run git status --short
Terminal window
sivtr pipe

Reads stdin and opens it. In normal use, piping directly to sivtr is equivalent:

Terminal window
cargo build 2>&1 | sivtr
Terminal window
sivtr import

Opens the current structured session log. Requires shell integration.

Terminal window
sivtr init <SHELL>

Supported shell names:

  • powershell
  • pwsh
  • bash
  • zsh
  • nushell
  • nu
Terminal window
sivtr copy [MODE] [SELECTOR] [OPTIONS]

Modes:

ModeMeaning
no modeCopy input plus output
inCopy input
outCopy output
cmdCopy bare command
codexCopy Codex session content

Aliases:

AliasExpands to
ccopy
cicopy in
cocopy out
cccopy cmd

Common options:

OptionMeaning
--ansiCopy ANSI-decorated text when available
--pickOpen the interactive picker
--printPrint copied text after copying
--regex <PATTERN>Keep lines matching regex
--lines <SPEC>Keep selected 1-based lines

Input-capable modes also support:

OptionMeaning
--prompt <TEXT>Rewrite the copied input prompt

Examples:

Terminal window
sivtr copy
sivtr copy 3 --print
sivtr copy --prompt ":"
sivtr copy in 2..4
sivtr copy out --pick --regex panic
sivtr copy cmd --pick
Terminal window
sivtr copy codex [MODE] [SELECTOR] [OPTIONS]

Modes:

ModeMeaning
no modeLast completed user plus assistant turn
outLast assistant reply
inLast user message
toolLast tool output
allWhole parsed session

Examples:

Terminal window
sivtr copy codex
sivtr copy codex 2
sivtr copy codex 2..4
sivtr copy codex out --print
sivtr copy codex out --pick
sivtr copy codex tool --regex error
sivtr copy codex all --lines 1:20
Terminal window
sivtr diff <LEFT> <RIGHT> [OPTIONS]

Compares two recent command blocks from the current session. Each selector must resolve to exactly one block.

Content modes:

OptionMeaning
--outputCompare output text. This is the default.
--blockCompare input plus output
--inputCompare input with prompt
--cmdCompare bare command text

View option:

OptionMeaning
--side-by-sideShow a two-column text view

Examples:

Terminal window
sivtr diff 1 2
sivtr diff 3 1 --block
sivtr diff 2 1 --side-by-side
Terminal window
sivtr history [COMMAND]

Subcommands:

CommandMeaning
list [-l, --limit <N>]List recent entries
search <KEYWORD> [-l, --limit <N>]Search history
show <ID>Show a specific entry

If no history subcommand is provided, sivtr lists the latest 20 entries.

Terminal window
sivtr config [COMMAND]

Subcommands:

CommandMeaning
showShow config path and content
initCreate default config
editOpen config in editor

If no config subcommand is provided, show is used.

Terminal window
sivtr hotkey [COMMAND]

Subcommands:

CommandMeaning
start [--chord <CHORD>]Start Windows hotkey daemon
statusShow daemon status
stopStop daemon

If no hotkey subcommand is provided, status is used.

Terminal window
sivtr clear [--all]

Clears session logs. --all clears all recorded session logs and state files.

SelectorMeaning
omitted1
1Latest matching item
2Second latest matching item
2..4Recent range

Selector semantics are shared by command-block copy, Codex copy, and diff where applicable.