Terminal session recorder 📹
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.
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
).
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.
--headless
option for rec
and stream
commands to force recording in headless mode (no input/output from/to an actual terminal)$ASCIINEMA_GEN_DIR
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.
asciinema stream -s
(built-in HTTP server), asciinema stream -r
(relay via asciinema server, e.g. asciinema.org)rec
command - see theme entry in asciicast file
asciinema rec foo.txt
, asciinema rec foo.log --format txt
asciinema convert demo.cast demo.txt
(to plain text), asciinema convert demo.cast demo.log --format raw
(to raw output)-a
for --append
for rec
command/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
commandplay
commandasciinema rec
always requires a filename now, doesn't offer uploading anymore (use upload
command)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
~/.config/asciinema/config.toml
) and format (TOML) - see v3 config doc
--cols
and --rows
options with --tty-size
in rec
command--raw
option with --format raw
in rec
command--stdin
option to --input
/ -I
in rec
command--append
and --overwrite
options together with rec
command returns error nowupload
command verifies whether the file is a valid asciicast before uploading-c
) in asciicast file header--env
option in the rec
command - -e
- has been removed--out-fmt
and --stream
options of the play
command have been removedrec
and play -m
commands--loop
option for looped playback in play
command--stream
and --out-fmt
option for customizing output of play
commandcat
command to support multiple files (thanks @Low-power)\e[8;H;Wt
)--cols
/ --rows
options for overriding size of pseudo-terminal reported to recorded program--append
when output file doesn't exist-
) can now be passed as output filename to write asciicast to stdoutC-\
key shortcutasciinema cat
are now hidden (thanks @djpohly / Devin J. Pohly!)--overwrite
option now$USER
is fixedasciinema.record_asciicast
functionThis is a minor bugfix release.
encodestring
(since Python 3.1) with encodebytes
(thanks @delirious-lettuce!)mv ~/.asciinema ~/.config/asciinema
)This major release brings many new features, improvements and bugfixes. The most notable ones:
asciinema rec unix.pipe
+ asciinema play unix.pipe
in second terminal tab/windowasciinema rec --stdin
)asciinema rec --append <filename>
)asciinema rec --raw <filename>
)asciinema rec --env="VAR1,VAR2..."
)asciinema play
by Space
asciinema cat <filename>
command to dump full output of the recordingdweb:/ipfs/
(replaces fs:/
)