Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
Show 25 variants Start { name: Option<String>, }, Stop, Replay { session: String, dry_run: bool, step: bool, skip: Option<Vec<u32>>, from: Option<u32>, force: bool, skip_pattern: Option<Vec<String>>, cwd: bool, danger_policy: Option<DangerPolicy>, }, List { tag: Vec<String>, tag_all: bool, }, Show { session: String, grep: Option<String>, }, Delete { session: Option<String>, force: bool, all: bool, }, Demo, Doctor, Copy { source: String, name: String, }, Rename { old: String, new: String, }, Edit { session: String, }, Tag { session: String, tags: Vec<String>, }, Tags { action: Option<TagsAction>, }, Export { session: String, format: ExportFormat, output: Option<PathBuf>, parameterize: bool, params: Vec<String>, }, Status, Hook { hook_type: HookType, arg: String, }, Import { file: PathBuf, name: Option<String>, }, Init { shell: Option<Shell>, }, Config { get: Option<String>, set: Option<Vec<String>>, edit: bool, path: bool, list: bool, }, Search { pattern: String, regex: bool, tag: Vec<String>, }, Diff { session1: String, session2: String, }, Stats, Alias { name: Option<String>, session: Option<String>, list: bool, remove: Option<String>, }, Completions { shell: Shell, }, Ui,
}
Expand description

Available commands for managing terminal recordings.

Variants§

§

Start

Start recording a new session

Fields

§name: Option<String>

Name for the session (auto-generated if not provided)

§

Stop

Stop the current recording

§

Replay

Replay a recorded session

Fields

§session: String

Session name or ID

§dry_run: bool

Preview commands without executing

§step: bool

Execute one command at a time with confirmation

§skip: Option<Vec<u32>>

Skip specific command indices (comma-separated, 1-based)

§from: Option<u32>

Start from a specific command index (1-based)

§force: bool

Bypass destructive command prompts

§skip_pattern: Option<Vec<String>>

Glob patterns to skip matching commands (comma-separated)

§cwd: bool

Replay in each command’s original working directory

§danger_policy: Option<DangerPolicy>

Policy for handling dangerous commands (skip, abort, allow)

§

List

List all recorded sessions

Fields

§tag: Vec<String>

Filter by tag (can be specified multiple times)

§tag_all: bool

Require all tags to match (default: any)

§

Show

Show details of a session

Fields

§session: String

Session name or ID

§grep: Option<String>

Filter commands by regex pattern

§

Delete

Delete a session

Fields

§session: Option<String>

Session name or ID (not required with –all)

§force: bool

Skip confirmation prompt

§all: bool

Delete all sessions

§

Demo

Run an interactive walkthrough of rec’s features

§

Doctor

Diagnose installation and configuration issues

§

Copy

Copy a session with a new name

Fields

§source: String

Source session name or ID

§name: String

Name for the copy

§

Rename

Rename a session

Fields

§old: String

Current session name or ID

§new: String

New session name

§

Edit

Edit a session in $EDITOR

Fields

§session: String

Session name or ID

§

Tag

Add or remove tags on a session

Fields

§session: String

Session name or ID

§tags: Vec<String>

Tags to add

§

Tags

Manage tags across sessions

Fields

§

Export

Export a session to another format

Fields

§session: String

Session name or ID

§format: ExportFormat

Output format

§output: Option<PathBuf>

Output file (stdout if not provided)

§parameterize: bool

Enable auto-parameterization of values

§params: Vec<String>

Set parameter values (format: KEY=VALUE, can be repeated)

§

Status

Show current recording status

§

Hook

Internal: Handle shell hook events (preexec, precmd)

This command is called by shell hooks to capture commands. Not intended for direct user invocation.

Fields

§hook_type: HookType

Hook type: preexec or precmd

§arg: String

Argument: command text (preexec) or exit code (precmd)

§

Import

Import a session from a bash script or shell history file

Fields

§file: PathBuf

Path to the file to import

§name: Option<String>

Session name (auto-generated from filename if not provided)

§

Init

Initialize shell hooks for automatic recording

Fields

§shell: Option<Shell>

Shell to initialize (auto-detected if not provided)

§

Config

Show or modify configuration

Fields

§get: Option<String>

Get a specific config value

§set: Option<Vec<String>>

Set a config value (KEY VALUE)

§edit: bool

Open config file in $EDITOR

§path: bool

Show config file path

§list: bool

List all config values with sources

§

Search

Search across all recorded sessions

Fields

§pattern: String

Search pattern (substring or regex with –regex)

§regex: bool

Use regex pattern matching

§tag: Vec<String>

Filter by tag before searching

§

Diff

Compare commands between two sessions

Fields

§session1: String

First session name or ID

§session2: String

Second session name or ID

§

Stats

Show recording statistics

§

Alias

Create or manage named aliases for sessions

Fields

§name: Option<String>

Alias name (for create/lookup)

§session: Option<String>

Target session name or ID (for create)

§list: bool

List all aliases

§remove: Option<String>

Remove an alias by name

§

Completions

Generate shell completions

Fields

§shell: Shell

Shell to generate completions for

§

Ui

Launch interactive terminal UI (requires –features tui)

Trait Implementations§

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.