Asciinema Versions Save

Terminal session recorder 📹

v3.0.0-rc.3

1 week ago

This is the third, possibly last, release candidate version of the brand new asciinema CLI 3.0.

See the initial RC release notes for details about the major 3.0 changes.

Notable changes

  • Added support for recording to a directory, with auto-generated filename (see below)
  • Disabled Nagle's algorithm (set TCP_NODELAY) to reduce streaming latency in relay mode
  • Fixed man page generation - build man pages for all subcommands (thanks @xfgusta!)
  • Upgraded avt and the bundled player - fixes RGB colors when streaming on certain terminals

asciinema rec /path/to/a/directory

You can now pass an existing directory path instead of a filename to asciinema rec, in which case a filename is auto-generated from a template, placing the recording in the target directory (or its sub-directory).

$ asciinema rec /tmp
::: Recording session started, writing to /tmp/2024-05-28-16-07-10-25493.cast
::: Press <ctrl+d> or type 'exit' to end

Right now the default filename template is %Y-%m-%d-%H-%M-%S-{pid}.cast, which is a formatted datetime + PID of the asciinema process.

The template can be changed by setting cmd.rec.filename in the config file, or pass on the command line, like this: asciinema rec /tmp --filename '%Y/%m/%d/%H-%M-%S-{pid}.cast'

The datetime formatting is done with % symbols, mostly strftime compatible, described in detail here: https://docs.rs/chrono/0.4.38/chrono/format/strftime/index.html#specifiers

There's also several additional params that can be used in the filename template string:

  • {pid} - asciinema process PID
  • {hostname}
  • {user} - current user's account name ($USER)

Those can be useful if one wants to auto record on multiple systems / accounts, by setting the filename template to e.g. {hostname}/{user}/%Y/%m/%d/%H-%M-%S-{pid}.cast, which would result in a filename such as darksaber/marcin/2024/05/28/16-07-10-25493.cast (if my computer was named darksaber).

v3.0.0-rc.2

1 month ago

This is the second release candidate version of the brand new asciinema CLI 3.0.

See RC 1 release notes for details about the major 3.0 changes.

Notable changes

  • New --headless option for rec and stream commands to force recording in headless mode (no input/output from/to an actual terminal)
  • New build script, generating man page and shell completion files at build time to $ASCIINEMA_GEN_DIR
  • Bundled JS player upgraded to the latest version - smarter stream buffering resulting in better relation between low latency and buffer underrun protection
  • Vastly improved detection of dead relay connection
  • Included "cargo target triple" in user-agent for API requests to asciinema server

v3.0.0-rc.1

2 months ago

This is the first release candidate version of the brand new asciinema CLI 3.0.

It's a complete rewrite in Rust, bringing a lot of improvements and long requested features.

UPDATE: RC 2 is out: https://github.com/asciinema/asciinema/releases/tag/v3.0.0-rc.2 UPDATE: RC 3 is out: https://github.com/asciinema/asciinema/releases/tag/v3.0.0-rc.3

A major release is a good time for a cleanup, therefore some behaviours were changed and several things were dropped.

New

  • Live terminal streaming: asciinema stream -s (built-in HTTP server), asciinema stream -r (relay via asciinema server, e.g. asciinema.org)
  • Terminal theme capture for rec command - see theme entry in asciicast file
  • Recording to plain text file: asciinema rec foo.txt, asciinema rec foo.log --format txt
  • Format conversion: asciinema convert demo.cast demo.txt (to plain text), asciinema convert demo.cast demo.log --format raw (to raw output)
  • Short alias -a for --append for rec command
  • tmux status bar notifier - automatically enabled when tmux session detected
  • Support for system wide config file - /etc/asciinema/config.toml - see v3 config doc
  • --server-url global option, which overrides server URL set in the config file or via env var
  • --append option can now be used with raw output too (when --format raw used) in rec command
  • Info messages at the start and the end of the playback with the play command

Changed

  • asciinema rec always requires a filename now, doesn't offer uploading anymore (use upload command)
  • No more implicit asciinema server URL - new prompt for a server URL on first use (unless configured in the config file)
  • asciinema cat command concatenates multiple recordings into a new one in asciicast format, instead of dumping raw output (the previous functionality is now available via asciinema convert --format raw ...)
  • ASCIINEMA_API_URL env var changed to ASCIINEMA_SERVER_URL
  • New config file location (~/.config/asciinema/config.toml) and format (TOML) - see v3 config doc
  • Replaced --cols and --rows options with --tty-size in rec command
  • Replaced --raw option with --format raw in rec command
  • Renamed --stdin option to --input / -I in rec command

Improved

  • Better error message when non-UTF-8 locale is detected
  • Info messages at the start and the end of the recording session are now more clear
  • Use of --append and --overwrite options together with rec command returns error now
  • upload command verifies whether the file is a valid asciicast before uploading
  • Brought back saving of a custom record command (-c) in asciicast file header

Removed

  • Short version of the --env option in the rec command - -e - has been removed
  • --out-fmt and --stream options of the play command have been removed
  • Support for terminal-notifier has been removed

v2.4.0

8 months ago
  • When recording without file arg we now ask whether to save, upload or discard the recording (#576)
  • Added capture of terminal resize events (#565)
  • Fixed blocking write error when PTY master is not ready (#569) (thanks @Low-power!)
  • Fixed "broken pipe" errors when piping certain commands during recording (#369) (thanks @Low-power!)
  • Fixed crash during playback of cast files with trailing blank line (#577)

https://pypi.org/project/asciinema/2.4.0/

v2.3.0

11 months ago
  • Added official support for Python 3.11
  • Dropped official support for Python 3.6
  • Implemented markers in rec and play -m commands
  • Added --loop option for looped playback in play command
  • Added --stream and --out-fmt option for customizing output of play command
  • Improved terminal charset detection (thanks @djds)
  • Extended cat command to support multiple files (thanks @Low-power)
  • Improved upload error messages
  • Fixed direct playback from URL
  • Made raw output start with terminal size sequence (\e[8;H;Wt)
  • Prevented recording to stdout when it's a TTY
  • Added target file permission checks to avoid ugly errors
  • Removed named pipe re-opening, which was causing hangs in certain scenarios
  • Improved PTY/TTY data reading - it goes in bigger chunks now (256 kb)
  • Fixed deadlock in PTY writes (thanks @Low-power)
  • Improved input forwarding from stdin
  • Ignored OSC responses in recorded stdin stream

https://pypi.org/project/asciinema/2.3.0/

v2.2.0

2 years ago
  • Added official support for Python 3.8, 3.9, 3.10
  • Dropped official support for Python 3.5
  • Added --cols / --rows options for overriding size of pseudo-terminal reported to recorded program
  • Improved behaviour of --append when output file doesn't exist
  • Keyboard input is now explicitly read from a TTY device in addition to stdin (when stdin != TTY)
  • Recorded program output is now explicitly written to a TTY device instead of stdout
  • Dash char (-) can now be passed as output filename to write asciicast to stdout
  • Diagnostic messages are now printed to stderr (without colors when stderr != TTY)
  • Improved robustness of writing asciicast to named pipes
  • Lots of codebase modernizations (many thanks to Davis @djds Schirmer!)
  • Many other internal refactorings

v2.1.0

2 years ago
  • Ability to pause/resume terminal capture with C-\ key shortcut
  • Desktop notifications - only for the above pause feature at the moment
  • Removed dependency on tput/ncurses (thanks @arp242 / Martin Tournoij!)
  • ASCIINEMA_REC env var is back (thanks @landonb / Landon Bouma!)
  • Terminal answerbacks (CSI 6 n) in asciinema cat are now hidden (thanks @djpohly / Devin J. Pohly!)
  • Codeset detection works on HP-UX now (thanks @michael-o / Michael Osipov!)
  • Attempt at recording to existing file suggests use of --overwrite option now
  • Upload for users with very long $USER is fixed
  • Added official support for Python 3.8 and 3.9
  • Dropped official support for EOL-ed Python 3.4 and 3.5
  • Internal refactorings

v2.0.2

4 years ago
  • Official support for Python 3.7
  • Recording is now possible on US-ASCII locale (thanks Jean-Philippe @jpouellet Ouellet!)
  • Improved Android support (thanks Fredrik @fornwall Fornwall!)
  • Possibility of programatic recording with asciinema.record_asciicast function
  • Uses new JSON response format added recently to asciinema-server
  • Tweaked message about how to stop recording (thanks Bachynin @vanyakosmos Ivan!)
  • Added proper description and other metadata to Python package (thanks @Crestwave!)

v2.0.1

6 years ago

This is a minor bugfix release.

  • Fixed example in asciicast v2 format doc (thanks Josh "@anowlcalledjosh" Holland!)
  • Replaced deprecated encodestring (since Python 3.1) with encodebytes (thanks @delirious-lettuce!)
  • Fixed location of config dir (you can mv ~/.asciinema ~/.config/asciinema)
  • Internal refactorings

v2.0.0

6 years ago

This major release brings many new features, improvements and bugfixes. The most notable ones:

  • new asciicast v2 file format
  • recording and playback of arbitrarily long session with minimal memory usage
  • ability to live-stream via UNIX pipe: asciinema rec unix.pipe + asciinema play unix.pipe in second terminal tab/window
  • optional stdin recording (asciinema rec --stdin)
  • appending to existing recording (asciinema rec --append <filename>)
  • raw recording mode, storing only stdout bytes (asciinema rec --raw <filename>)
  • environment variable white-listing (asciinema rec --env="VAR1,VAR2...")
  • toggling pause in asciinema play by Space
  • stepping through a recording one frame at a time with . (when playback paused)
  • new asciinema cat <filename> command to dump full output of the recording
  • playback from new IPFS URL scheme: dweb:/ipfs/ (replaces fs:/)
  • lots of other bugfixes and improvements
  • dropped official support for Python 3.3 (although it still works on 3.3)