# svg-term-cli: Share Terminal Sessions as Razor-Sharp Animated SVGs

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/marionebl-svg-term-cli
Generated for open source discovery and AI-assisted research.

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
OSRepos URL: https://osrepos.com/repo/marionebl-svg-term-cli

## 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.

## Topics

- JavaScript
- CLI
- Terminal
- SVG
- Asciinema
- Developer Tools
- Open Source

## Repository Information

Last analyzed by OSRepos: Wed Mar 11 2026 17:10:58 GMT+0000 (Western European Standard Time)
Detail views: 1
GitHub clicks: 8

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

`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.

Key features include:
*   Render asciicast to animated SVG.
*   Share asciicasts everywhere, without requiring JavaScript players.
*   Style output with various terminal color profiles.

## Installation

To get started with `svg-term-cli`, you first need to install `asciinema`, which is used for recording terminal sessions.

1.  **Install asciinema**: Follow the instructions at [https://asciinema.org/docs/installation](https://asciinema.org/docs/installation){:target="_blank"}.
2.  **Install svg-term-cli**: Once `asciinema` is set up, install `svg-term-cli` globally via npm:

    sh
    npm install -g svg-term-cli
    

## Examples

Generating 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:

sh
svg-term --cast=113643 --out examples/parrot.svg --window


You 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.

## Why Use It

The 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.

GIFs 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.

## Links

For more information and related projects, check out these resources:

*   **asciinema/asciinema**: Terminal session recorder, available at [https://github.com/asciinema/asciinema](https://github.com/asciinema/asciinema){:target="_blank"}
*   **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"}
*   **marionebl/svg-term**: Render asciicast to animated SVG, available at [https://github.com/marionebl/svg-term](https://github.com/marionebl/svg-term){:target="_blank"}
*   **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"}