asciinema – Record and replay terminal sessions, and optionally share them on asciinema.org

“asciinema” is a versatile tool that allows users to record and replay terminal sessions, providing a convenient way to capture and share command-line activities. With asciinema, users can record their terminal sessions, including commands entered, outputs displayed, and interactions performed, and then replay them later. Additionally, asciinema offers the option to share recorded sessions on asciinema.org, a dedicated platform for hosting and sharing terminal recordings.

Here are the key features and functionalities of asciinema:

  • Terminal Session Recording: asciinema enables users to record their terminal sessions with ease. By running the asciinema command, users can initiate the recording process, which captures all the actions performed in the terminal, including command inputs, output results, and even timing information. This feature is particularly useful for documenting and sharing command-line workflows, demonstrating software installations, providing tutorials, or troubleshooting sessions.
  • Session Replaying: Recorded sessions can be replayed using the asciinema player. The player reproduces the recorded terminal session, replicating the exact sequence of commands and outputs. This allows others to follow along and observe the session as if they were interacting with the terminal in real-time. The replay feature is especially helpful for sharing demonstrations, walkthroughs, or step-by-step guides.
  • Share on asciinema.org: asciinema provides an online platform, asciinema.org, where users can upload and share their recorded terminal sessions. By uploading a recording to asciinema.org, users can obtain a unique URL that they can share with others. This makes it easy to distribute and access recorded sessions, allowing viewers to watch and replay the terminal activities directly in their web browsers.
  • Embedding and Integration: asciinema recordings hosted on asciinema.org can be embedded in websites, blogs, or documentation using the provided embed code. This allows users to seamlessly integrate recorded terminal sessions into their online content, enhancing tutorials, documentation, or blog posts with interactive and dynamic terminal demonstrations.
  • Collaboration and Feedback: Users can provide comments, feedback, and ratings on asciinema recordings hosted on asciinema.org. This fosters a collaborative environment where users can engage in discussions, share insights, and ask questions related to the recorded terminal sessions. This feature encourages knowledge-sharing and community engagement among users.
  • Cross-Platform Compatibility: asciinema is compatible with various operating systems, including Linux, macOS, and Windows. It supports different terminal emulators and shell environments, ensuring a seamless recording and replay experience regardless of the user’s preferred setup.
  • Command-Line Interface: asciinema is primarily operated through the command line, allowing users to initiate and control the recording process using simple commands. This makes it easy to integrate asciinema into scripts, automate recordings, or incorporate it into existing workflows.

asciinema Command Examples

1. Associate the local install of asciinema with an asciinema.org account:

# asciinema auth

2. Make a new recording (once finished, user will be prompted to upload it or save it locally):

# asciinema rec

3. Make a new recording and save it to a local file:

# asciinema rec /path/to/file.cast

4. Replay a terminal recording from a local file:

# asciinema play /path/to/file.cast

5. Replay a terminal recording hosted on asciinema.org:

# asciinema play https://asciinema.org/a/cast_id

6. Make a new recording, limiting any idle time to at most 2.5 seconds:

# asciinema rec -i 2.5

7. Print the full output of a locally saved recording:

# asciinema cat /path/to/file.cast

8. Upload a locally saved terminal session to asciinema.org:

# asciinema upload /path/to/file.cast

Summary

In summary, asciinema is a powerful tool for recording and replaying terminal sessions, providing a practical way to capture and share command-line activities. With its ability to record sessions, replay them using the asciinema player, and share them on asciinema.org, asciinema offers a comprehensive solution for documenting, demonstrating, and sharing terminal workflows. Its cross-platform compatibility, embedding capabilities, and interactive community features make it a valuable resource for individuals, developers, educators, and technical writers seeking to showcase and distribute terminal-based demonstrations and tutorials.

Related Post