asciinema
Recipe card from the charly-coder plugin (Images — the deployable catalog).
asciinema – Terminal session recorder
Section titled “asciinema – Terminal session recorder”Candy Properties
Section titled “Candy Properties”| Property | Value |
|---|---|
| Install files | charly.yml (packages + one binary download) |
| Depends | none |
Packages
Section titled “Packages”RPM: asciinema + dejavu-sans-mono-fonts · PAC: asciinema + ttf-dejavu · DEB: asciinema + fonts-dejavu-core
What It Does
Section titled “What It Does”Records terminal sessions as .cast files (asciicast v2 format). Recordings capture timing, input, and output — can be replayed with asciinema play, uploaded to asciinema.org, or converted to GIF/video. Also installs the agg gif generator (asciinema/agg, pinned v1.9.0, prebuilt binary at /usr/local/bin/agg) plus a DejaVu Sans Mono font so a stopped recording can be rendered to an animated GIF — the engine behind the record: gif method.
Cross-distro coverage
Section titled “Cross-distro coverage”RPM: asciinema · PAC: asciinema · DEB: asciinema — full parity.
# box charly.yml — compose the candy as an inline list in the box bodymy-box: candy: base: fedora candy: [asciinema]Used by the record: check verb (a record: start step with record_mode: terminal) for terminal recording sessions. Also available standalone via asciinema rec.
Integration with the record: check verb
Section titled “Integration with the record: check verb”Author ordered record: plan steps (the declarative verb served out-of-process by
candy/plugin-record — there is no host charly check subcommand for it) and run them
with charly check live <image> --filter record:
plan: - check: a terminal recording starts record: method: start record_name: demo record_mode: terminal context: [deploy] - check: a command is sent into the recording record: method: cmd record_name: demo text: echo hello context: [deploy] - check: the recording stops and is copied out record: method: stop record_name: demo artifact: demo.cast context: [deploy]charly check live <image> --filter record # runs the steps aboveasciinema play demo.cast # play back the copied-out artifactConverting a recording to an animated GIF
Section titled “Converting a recording to an animated GIF”The record: gif method (served by the same plugin) renders a stopped
terminal recording to an animated GIF with agg — the binary this candy
installs. It runs agg in the container and copies the .gif to the host
artifact path:
plan: - check: the recording is rendered to an animated gif record: method: gif record_name: demo artifact: demo.gif theme: monokai speed: 2 idle_time_limit: 1 context: [deploy]agg options (theme, font_size, speed, idle_time_limit, fps_cap, select,
cols, rows, no_loop, last_frame_duration, renderer) map 1:1 to agg’s CLI
flags; the recording’s embedded theme is used when theme: is unset.
Also available via the dev-tools candy (which includes asciinema among many other tools). This standalone candy is for boxes that need terminal recording without the full dev-tools bundle.
Used In Boxes
Section titled “Used In Boxes”/charly-selkies:sway-browser-vnc(viasway-desktopmetalayer)/charly-selkies:selkies-labwc(viaselkies-desktopmetalayer)/charly-selkies:selkies-labwc-nvidia(viaselkies-desktopmetalayer)
Related Commands
Section titled “Related Commands”/charly-check:record— Terminal recording via asciinema (start, stop, cmd, gif)
Cross-References
Section titled “Cross-References”/charly-check:record— therecord:check verb (record_mode: terminalrecords,record: gifrenders) uses asciinema + agg/charly-coder:dev-tools— Also includes asciinema (larger candy)
When to Use This Skill
Section titled “When to Use This Skill”Use when the user asks about:
- Terminal session recording
- Converting a terminal recording to an animated GIF
- asciinema in containers
- The
asciinemacandy
Related
Section titled “Related”/charly-image:layer— candy authoring reference (charly.ymlschema, plan-step verbs, service declarations)/charly-check:check— declarative testing (check:block,charly check box,charly check live)