Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMay 5, 2026·3 min de lecture

asciinema — Record and Share Terminal Sessions

asciinema records terminal sessions as lightweight text-based files that can be replayed in a browser, embedded in docs, or converted to GIFs and videos—without screen capture overhead.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Needs Confirmation · 66/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
asciinema
Commande CLI universelle
npx tokrepo install b967fb02-485a-11f1-9bc6-00163e2b0d79

Introduction

asciinema captures terminal output as a timestamped text stream rather than pixel-based video. This produces tiny files that replay at full fidelity, allow copy-paste from the playback, and can be shared via asciinema.org or self-hosted with the asciinema-server.

What asciinema Does

  • Records terminal sessions to .cast files (JSON-based asciicast format)
  • Plays back recordings in-terminal or via an embeddable web player
  • Uploads recordings to asciinema.org for sharing via URL
  • Supports idle time compression and speed adjustment on playback
  • Integrates with agg (asciinema GIF generator) for conversion to animated GIFs

Architecture Overview

asciinema spawns a pseudo-terminal (pty) and records stdout bytes with microsecond timestamps into the asciicast v2 format (newline-delimited JSON). The web player (asciinema-player, written in TypeScript) interprets these events through a virtual terminal emulator to render frames in the browser without video codecs.

Self-Hosting & Configuration

  • Install the CLI from PyPI, Homebrew, or system package manager
  • Self-host the server component (asciinema-server, Elixir-based) for private recordings
  • Configure ~/.config/asciinema/config for default settings (idle_time_limit, API URL)
  • Embed the web player in documentation with a single script tag
  • Convert recordings to GIF/SVG using agg or svg-term for offline sharing

Key Features

  • Text-based recordings: tiny file size, searchable, copy-paste friendly
  • No screen capture artifacts: resolution-independent, always sharp
  • Idle time trimming: automatically compress long pauses
  • Web player with pause, seek, and speed controls
  • Open asciicast format: parseable by third-party tools

Comparison with Similar Tools

  • VHS (Charm) — generates GIFs from scripted terminal commands; asciinema records live sessions
  • ttyrec/ttygif — older format with less tooling and no web player
  • OBS Studio — full screen recording; much larger files, no text selectability
  • Terminalizer — Node.js based recorder with GIF export; similar concept, less mature ecosystem
  • script (coreutils) — records raw typescript; no timing data or playback player

FAQ

Q: Can viewers copy text from a recording? A: Yes. The web player renders real text, not pixels, so viewers can select and copy.

Q: How do I share without uploading to asciinema.org? A: Self-host asciinema-server, or convert to GIF with agg for embedding anywhere.

Q: Can I edit recordings after capture? A: The .cast format is plain JSON lines. You can trim, splice, or adjust timings with text tools or purpose-built editors like asciinema-edit.

Q: Does it capture colors and cursor position? A: Yes. Full ANSI escape sequence support including 256-color and truecolor.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires