Skip to content

Copy Command Blocks

sivtr copy works from the structured session log created by shell integration. It does not require opening the TUI.

Terminal window
sivtr copy
sivtr copy in
sivtr copy out
sivtr copy cmd
CommandCopies
sivtr copyInput plus output
sivtr copy inInput only, including prompt by default
sivtr copy outOutput only
sivtr copy cmdBare command only

Aliases:

AliasFull command
sivtr csivtr copy
sivtr cisivtr copy in
sivtr cosivtr copy out
sivtr ccsivtr copy cmd

Selectors are relative to the newest command block:

Terminal window
sivtr copy 1
sivtr copy out 2
sivtr copy in 2..4

1 is the latest block. 2 is the previous block. 2..4 selects several recent blocks.

Use --print to see what was copied:

Terminal window
sivtr copy out --print

The text is still copied to the clipboard.

Use --ansi when you want colored terminal sequences preserved:

Terminal window
sivtr copy out --ansi

This only has an effect when the session entry has ANSI-preserved output.

Input-copying modes preserve the original prompt by default. Override it with --prompt:

Terminal window
sivtr copy in --prompt ":"
sivtr copy --prompt ">"

If the prompt does not end with whitespace, sivtr inserts one space before the command.

Filters run after selected blocks are assembled.

Terminal window
sivtr copy out --regex panic
sivtr copy out --lines 10:20
sivtr copy out --lines 1,3,8:12

If both filters are set, --regex runs first and --lines runs on the filtered result.

Open an interactive picker:

Terminal window
sivtr copy --pick
sivtr copy out --pick
sivtr copy cmd --pick

Picker keys:

KeyAction
j / kMove
SpaceToggle current entry
vMark range anchor
aToggle all
pToggle preview
tOpen Vim-style full view
EnterConfirm
EscCancel

The Vim-style full view supports [[ and ]] to jump blocks, T to toggle tool content in Codex views, myy / myi / myo / myc to copy, and mvv / mvi / mvo to select.