Please enable JavaScript to view this site.

Navigation: Take Command

Terminal Recording (asciicast)

Scroll Prev Top Next More

Take Command can record ConPTY terminal sessions in the asciicast v2 format. A recording is a UTF-8 .cast file that stores the terminal size, timestamps, and every terminal input and output event, so the session can be replayed later exactly as it happened.

Manual recording

Select Options > Session Log while a ConPTY terminal tab is active.

 

The first selection opens a Save As dialog for the active tab's .cast recording. The dialog defaults to the directory configured by TabPtyRecordDirectory, or to your Local AppData folder if that option is not set.

Select Options > Session Log again to stop and close the recording.

Session Log only records ConPTY terminal tabs. It has no effect on non-ConPTY or GUI tabs.

Automatic recording

To record every ConPTY session automatically, add the following line to TCMD.INI:

TabPtyRecord=Yes

With this option enabled, Take Command starts a recording as soon as it starts a ConPTY session. Leave the option disabled, or omit it entirely, if you do not want sessions recorded automatically.

Automatic recording would normally only be useful for debugging sessions or for creating demos. It will slow Take Command 's performance significantly.

Recording location

Manual recordings prompt for an output file name. Automatic recordings are written to your temporary directory with a name similar to:

tcmd-12345-678901.cast

The first number is the Take Command process ID, and the second is a timestamp value unique to the terminal session.

To choose a different folder for both manual and automatic recordings, set:

TabPtyRecordDirectory=C:\TerminalRecordings

The folder must already exist and be writable by the current user.

What gets recorded

A recording captures timestamped events from the active ConPTY session, including:

 

Terminal output, including ANSI/VT escape sequences.

Keyboard input and special-key escape sequences.

Unicode text and bracketed-paste input.

Text inserted by drag and drop, folder insertion, and filename insertion.

Important: Recordings can contain commands, typed text, passwords, command output, and other sensitive information. Store .cast files securely and review their contents before sharing them with anyone else.

Command metadata events

When the shell reports prompt-start and command-finish marks (OSC 133, or OSC 9;12 in shell integration), Take Command adds an asciicast m (metadata) event to the recording, alongside the standard o (output) and i (input) events:

 

{"event":"cmd_start","cmd":"<command line>"} — written when a new command starts, including the command line when it is known.

{"event":"cmd_end","exit":<code>} — written when a command finishes, including its exit code when the shell reports one.

These metadata events only appear while shell integration is active for the session. Shells without shell-integration support produce recordings with only the standard o/i events. Because m is an asciicast v2 extension, players that do not recognize it should simply ignore it and continue playing back the recording normally.

Replaying a recording

Because .cast files use the standard asciicast v2 format, you can play them with any compatible asciicast player or tooling, in addition to Take Command itself.

To replay a recording inside Take Command, choose Home > Replay Recording and select a .cast file. The recording opens in a dedicated, read-only replay tab along with a small floating control window that provides:

 

Restart, to jump back to the beginning of the recording.

Pause and resume playback.

Seek backward or forward 10 seconds.

A playback-speed slider, from 0.5x up to 2x.

Seeking rebuilds the terminal display from the start of the recording through the selected timestamp, so the replay always reflects the correct terminal state.

Related option: iTerm2 and SIXEL inline images

Take Command can also decode and display SIXEL and iTerm2 OSC 1337 File= inline images during a live session or a replay, when explicitly enabled:

TabPtyITermImages=Yes

The image data must be Base64-encoded PNG, JPEG, GIF, or another WIC-supported image format. Image size is limited by TabPtySixelMaxBytes, and images are drawn at the cursor position. This option defaults to No because image escape sequences can consume memory and may display untrusted content.

Troubleshooting

 

Confirm that the active tab is a ConPTY terminal tab; other tab types cannot be recorded.

For automatic recording, confirm that TabPtyRecord=Yes is present in the active TCMD.INI.

If you configured a custom recording folder, confirm it exists and that you have permission to create files there.

If a manually started recording does not appear on disk, stop it first with Options > Session Log so the file is closed and flushed.

See also

 

TabPtyRecord

TabPtyRecordDirectory

TabPtyITermImages