asciinema v.3 ubuntu installation power setup

Asciinema v3 on Ubuntu — Installation, Configuration & Power Setup

Obsidian‑ready notes.


✅ TL;DR


🧠 What is Asciinema (v3)

Asciinema records terminal sessions into .cast files that can be replayed, shared, streamed live, or converted to plain text.

v3 highlights:


🧹 Step 0 — Remove old asciinema (IMPORTANT)

If you ever installed asciinema via apt, it’s the old Python v2. Kill it.

sudo apt remove asciinema -y
which asciinema || true

If which asciinema still returns a path → you didn’t clean properly. Fix before proceeding.


📥 Step 1 — Download correct binary (Ubuntu)

Ubuntu uses glibc and almost always runs on x86_64.

Correct file:

cd ~/Downloads
wget https://github.com/asciinema/asciinema/releases/download/v3.0.0/asciinema-x86_64-unknown-linux-gnu

Sanity check architecture:

uname -m

🔐 Step 2 — Make binary executable

chmod +x asciinema-x86_64-unknown-linux-gnu

📦 Step 3 — Install into PATH (proper way)

sudo mv asciinema-x86_64-unknown-linux-gnu /usr/local/bin/asciinema

Verify:

asciinema --version

Expected output:

asciinema 3.0.0

If this fails, stop. Don’t continue broken installs.


🎥 Step 4 — Basic recording test

asciinema rec test.cast

Inside session:

echo "asciinema v3 works"
exit

Replay:

asciinema play test.cast

If playback works → installation is solid.


⚠️ Critical v3 Behavior Changes

❌ No automatic uploads anymore

✅ Explicit upload command

asciinema upload test.cast

This is intentional. Predictability > magic.


🔁 Auto‑record EVERY terminal session (Power User Setup)

This will record all terminal sessions automatically.

Add to very bottom of ~/.bashrc or ~/.zshrc

if [ -z "$ASCIINEMA_SESSION" ]; then
  exec asciinema rec ~/sessions/$(date '+%Y/%m/%d/%H-%M-%S')-$.cast
fi

Result


📁 Output File Formats

Plain text output

asciinema rec output.txt

OR

asciinema convert demo.cast demo.txt

⚠️ Text output is one‑way (no timing, no replay).


🔄 Convert recordings

v2 → v3

asciinema convert old-v2.cast new-v3.cast

v3 → v2 (legacy tooling)

asciinema convert -f asciicast-v2 new-v3.cast old-v2.cast

📡 Live Streaming

Local (LAN only, nothing sent online)

asciinema stream --local

Remote (shareable URL)

asciinema stream --remote

You can use both at once.


🎬 Record + Stream at same time

asciinema session -l -r -o demo.cast

This is the replacement for juggling rec + stream.


⚙️ Config file (v3)

Location

~/.config/asciinema/config.toml

Format change

Section renames



📌 Status


🔥 Next upgrades (optional)


Powered by Forestry.md