{"name":"svg-term-cli: Share Terminal Sessions as Razor-Sharp Animated SVGs","description":"svg-term-cli is a powerful command-line tool that transforms asciicast recordings into animated SVG files. This allows developers to share high-quality, scalable terminal sessions in places where traditional video or GIF formats fall short, such as GitHub READMEs or npm registry pages. It provides a superior viewing experience with razor-sharp text and customizable styling.","github":"https://github.com/marionebl/svg-term-cli","url":"https://osrepos.com/repo/marionebl-svg-term-cli","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/marionebl-svg-term-cli","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/marionebl-svg-term-cli.md","json":"https://osrepos.com/repo/marionebl-svg-term-cli.json","topics":["JavaScript","CLI","Terminal","SVG","Asciinema","Developer Tools","Open Source"],"keywords":["JavaScript","CLI","Terminal","SVG","Asciinema","Developer Tools","Open Source"],"stars":null,"summary":"svg-term-cli is a powerful command-line tool that transforms asciicast recordings into animated SVG files. This allows developers to share high-quality, scalable terminal sessions in places where traditional video or GIF formats fall short, such as GitHub READMEs or npm registry pages. It provides a superior viewing experience with razor-sharp text and customizable styling.","content":"## Introduction\n\n`svg-term-cli` is a command-line interface tool designed to convert asciicast recordings into animated SVG (Scalable Vector Graphics) files. This innovative approach allows developers to share terminal sessions with exceptional clarity and scalability, making them perfect for documentation, presentations, and web content. Unlike traditional GIF recordings, SVGs maintain their sharpness at any zoom level and can be styled with common terminal color profiles.\n\nKey features include:\n*   Render asciicast to animated SVG.\n*   Share asciicasts everywhere, without requiring JavaScript players.\n*   Style output with various terminal color profiles.\n\n## Installation\n\nTo get started with `svg-term-cli`, you first need to install `asciinema`, which is used for recording terminal sessions.\n\n1.  **Install asciinema**: Follow the instructions at [https://asciinema.org/docs/installation](https://asciinema.org/docs/installation){:target=\"_blank\"}.\n2.  **Install svg-term-cli**: Once `asciinema` is set up, install `svg-term-cli` globally via npm:\n\n    sh\n    npm install -g svg-term-cli\n    \n\n## Examples\n\nGenerating an animated SVG from an existing asciicast is straightforward. Here's an example demonstrating how to create the `parrot.svg` from asciicast ID `113643`, including window decorations:\n\nsh\nsvg-term --cast=113643 --out examples/parrot.svg --window\n\n\nYou can also pipe `asciinema` recordings directly into `svg-term-cli` or specify an input JSON file. The tool offers various options for customization, including output file, dimensions, timeline ranges, and cursor visibility.\n\n## Why Use It\n\nThe primary rationale behind `svg-term-cli` is to provide a superior alternative to GIF asciicast recordings, especially in environments where the interactive `asciinema` player cannot be used. This includes common scenarios like `README.md` files on GitHub or the npm registry.\n\nGIFs often suffer from pixelation and large file sizes, compromising the readability of terminal text. By contrast, `svg-term-cli` produces vector-based animations, ensuring that text remains razor-sharp and perfectly legible, even when zoomed in. This significantly enhances the quality and professionalism of your project's documentation.\n\n## Links\n\nFor more information and related projects, check out these resources:\n\n*   **asciinema/asciinema**: Terminal session recorder, available at [https://github.com/asciinema/asciinema](https://github.com/asciinema/asciinema){:target=\"_blank\"}\n*   **derhuerst/asciicast-to-svg**: Render frames of Asciicasts as SVGs, available at [https://github.com/derhuerst/asciicast-to-svg](https://github.com/derhuerst/asciicast-to-svg){:target=\"_blank\"}\n*   **marionebl/svg-term**: Render asciicast to animated SVG, available at [https://github.com/marionebl/svg-term](https://github.com/marionebl/svg-term){:target=\"_blank\"}\n*   **marionebl/term-schemes**: Parse and normalize common terminal emulator color schemes, available at [https://github.com/marionebl/term-schemes](https://github.com/marionebl/term-schemes){:target=\"_blank\"}","metrics":{"detailViews":1,"githubClicks":8},"dates":{"published":null,"modified":"2026-03-11T17:10:58.000Z"}}