Skip to content

Asciicast Output #109

Open
Open

Description

@rsteube

This is probably out of scope but would be nice to have asciicast output (Output: out.cast).
I initally wanted gif for the readme and asciicast for the mdbook documentation but then decided against gif due to it's size.
Managed to record it by simply spawning an asciinema recording within tmux.
Keeping size in sync with the other outputs could be challenge but there are also gif, svg,.. generators available for asciicast.
It might even provide an alternative to the chrome dependency (which pushes my cpu to the limit).

Hide
Type "tmux"
Enter
Type "tmux resize-window -x 108 -y 24"
Enter
Type "asciinema rec --overwrite out.cast"
Enter
Sleep 1s
Show

# ...

Hide
Type "exit"
Enter
Show

Example

Source: https://github.com/rsteube/carapace-bin/blob/18ca32ea6093b965e4949a13ccce85f9108ca65c/carapace-bin.tape

Asciicast

asciicast

Gif

GIF output with agg (ignore the missing symbols, didn't get the font right)

agg --font-family "RobotoMono Nerd Font Mono,Noto Color Emoji"  carapace-bin.cast out.gif

out

Svg

SVG output with svg-term-cli (nice output but high load for playing it)

cat carapace-bin.cast | svg-term --out out.svg

out

related #105

Activity

  1. maaslalani commented on Oct 30, 2022

    @maaslalani
    Contributor

    This is quite interesting @rsteube, nice work and really clever stuff.

    There is definitely something here. Would be really cool to remove the dependency on the browser all together and make terminal GIFs purely in the terminal eventually 😄

  2. maxandersen commented on Nov 25, 2022

    @maxandersen

    The .svg format would be the bomb. Lets you copy/paste the commands shown.

  3. drupol commented on Nov 5, 2023

    @drupol

    I'm also looking for this !

    Thanks @rsteube for the snippet ! I use it and it works very well!

  4. jackspirou commented on Aug 6, 2025

    @jackspirou

    I started a discussion #644 around a working (for me) SVG implementation fork at https://github.com/agentstation/vhs - might be relevant! 😄

  5. dimk90 commented on Aug 25, 2026

    @dimk90

    Check out S-VHS: a small bash wrapper around tmux + asciinema + agg that automates exactly what the OP sketched here - tape-like recordings with SetOutput accepting .cast, .gif and animated .svg from one script. No Chromium involved.

  6. co2water commented on Sep 14, 2026

    @co2water

    +1. The two-step version that works today: record with asciinema, then https://github.com/co2water/svgcast turns the .cast into an animated svg (dark mode aware, 3-8x smaller than the gif). If VHS can emit asciicast this becomes a pipeline for everyone in this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址