Skip to main content

Fake terminal demos. YAML in, SVG out. No recording.

Project description

termstage

PyPI Python Tests

termstage demo

Generate polished terminal demo SVGs from a YAML file. No recording, no live shell, no asciinema.

Write what you want the terminal to show. Get a clean SVG you can drop into any README, doc, or portfolio.


Install

As a standalone tool (recommended):

pipx install termstage
# or
uv tool install termstage

Into a project:

uv add termstage
# or
pip install termstage

The Flow

1. Scaffold a starter file

termstage init

Creates demo.yaml in the current directory with example steps you can edit.

2. Edit demo.yaml

Open demo.yaml and replace the example steps with your own commands and output. See YAML format below.

3. Preview in browser

termstage preview demo.yaml

Opens a rendered SVG in your default browser. Iterate here until it looks right.

4. Render to SVG

# Static SVG
termstage render demo.yaml

# Animated CSS typewriter (recommended for READMEs)
termstage render demo.yaml --animated

# Custom output path
termstage render demo.yaml --animated -o assets/demo.svg

5. Embed in your README

![demo](demo.svg)

Or for more control over sizing:

<img src="demo-animated.svg" alt="demo" width="700">

The animated SVG uses pure CSS — no JavaScript. Works on GitHub, GitLab, and anywhere SVG is rendered.


YAML Format

title: "my-cli"        # Title bar text
theme: dark            # dark | light | dracula | nord  (default: dark)
prompt: "$ "           # Prompt string (default: "$ ")
width: 700             # SVG width in pixels (default: 700)

steps:
  - cmd: "my-cli --version"
    output: "my-cli 1.0.0"

  - cmd: "my-cli process data.csv"
    output: |
      Reading data.csv...
      Processed 10,000 rows
      Output → results.jsonl

  - comment: "# Comments render without a prompt, styled as code comments"

  - cmd: "my-cli --help"
    output: |
      Usage: my-cli [OPTIONS] COMMAND

        process   Process a CSV file
        export    Export results

      Options:
        --help    Show this message and exit.

Step types

Type Fields Description
cmd cmd, output (optional) Renders prompt + command + output
comment comment Renders a line styled as a code comment, no prompt

Top-level fields

Field Default Description
title "terminal" Title bar text
theme dark Colour theme
prompt "$ " Prompt string
width 700 SVG width in pixels

Themes

termstage themes
Theme Background Based on
dark #1e1e1e VS Code Dark+ (default)
light #ffffff Clean light terminal
dracula #282a36 Dracula
nord #2e3440 Nord

Set with theme: <name> in your YAML.


Commands

Command Description
termstage init [output.yaml] Scaffold a starter YAML (default: demo.yaml)
termstage render <file.yaml> Render static SVG
termstage render <file.yaml> --animated Render animated CSS typewriter SVG
termstage render <file.yaml> -o out.svg Custom output path
termstage preview <file.yaml> Render and open in browser
termstage preview <file.yaml> --animated Preview animated version
termstage themes List available themes

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termstage-0.4.4.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

termstage-0.4.4-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file termstage-0.4.4.tar.gz.

File metadata

  • Download URL: termstage-0.4.4.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for termstage-0.4.4.tar.gz
Algorithm Hash digest
SHA256 c0e63ca3b5939bb262e1e35202aaaac3fca6b560ec207e5463356a0426c0ff36
MD5 76884ef819cfe23d7b7db9d004fecbe0
BLAKE2b-256 087136a0d4163299b1c0a762d5b47bf5ace5e0bf91b63d8e0c3c9cefe408c394

See more details on using hashes here.

Provenance

The following attestation bundles were made for termstage-0.4.4.tar.gz:

Publisher: release.yml on saikatkumardey/termstage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file termstage-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: termstage-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for termstage-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7a7a2b266324351f30f339ffa72845434989d2f42ba7ab672e02b64ab6f5d41b
MD5 09655329fd107b72b18a548b9652f301
BLAKE2b-256 5fbd8064362b46b8a384f26c1d990290ba1aef017f2e2aa63062339ff1e503e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for termstage-0.4.4-py3-none-any.whl:

Publisher: release.yml on saikatkumardey/termstage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page