You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: How to share terminal demos as razor-sharp animated SVG
date: 2022-12-15
categories: [terminal]
---
1. Install [asciinema](https://github.com/asciinema/asciinema) and [svg-term-cli](https://github.com/marionebl/svg-term-cli).
2. Record with asciinema:
```bash
asciinema rec demo.cast
```
This records the session in the [asciicast v2 plaintext file format](https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v2.md) (newline-delimited JSON with an initial header object followed by a timestamped event stream of stdin and stdout).
3. Convert the `.cast` file to `.svg` with svg-term-cli: