Skip to main content

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

Project description

termstage

Fake terminal demos. Write a YAML file describing the session, run termstage render, get an SVG. No recording, no live shell, no asciinema.

Good for README headers and docs where you want to show what a CLI looks like without screenshotting your actual terminal.


Install

pip install termstage
# or
uv add termstage

Quick Start

1. Write a demo YAML:

# demo.yaml
title: "notes  a simple CLI notes app"
theme: dark
prompt: "$ "
width: 700

steps:
  - cmd: "notes --version"
    output: "notes 1.0.0"
  - cmd: "notes add 'Fix the login bug before Friday'"
    output: "Added note #1"
  - cmd: "notes list"
    output: |
      #1  Fix the login bug before Friday
  - comment: "# Search works too"
  - cmd: "notes search 'login'"
    output: "#1  Fix the login bug before Friday"

2. Render:

termstage render demo.yaml            # → demo.svg
termstage render demo.yaml -o out.svg
termstage render demo.yaml --animated # CSS typewriter animation

3. Preview:

termstage preview demo.yaml

Commands

Command Description
termstage render <file.yaml> Render static SVG
termstage render <file.yaml> -o out.svg Custom output path
termstage render <file.yaml> --animated Animated CSS typewriter SVG
termstage init Create a starter demo.yaml in current directory
termstage themes List available themes
termstage preview <file.yaml> Render and open in browser

YAML Format

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

steps:
  - cmd: "notes --version"
    output: "notes 1.0.0"

  - cmd: "notes add 'Fix the login bug before Friday'"
    output: "Added note #1"

  - cmd: "notes --help"
    output: |
      Usage: notes [OPTIONS] COMMAND
        add     Add a new note
        list    List all notes
        search  Search notes by keyword
        done    Mark a note as done

  - comment: "# Search works too"

  - cmd: "notes search 'login'"
    output: "#1  Fix the login bug before Friday"

Two step types: cmd (prompt + command + optional output) and comment (no prompt, styled like a code comment).


Themes

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

Animated SVG

--animated generates a pure CSS animated SVG: commands type out character by character, output fades in after each one, cursor blinks. No JavaScript — works in GitHub READMEs and anywhere SVG is supported.

termstage render demo.yaml --animated -o demo-animated.svg

Window

SVGs render with a macOS-style title bar (traffic light dots, centered title, rounded corners). Font stack: JetBrains Mono, Fira Code, Cascadia Code, monospace.


Examples

termstage init
termstage render demo.yaml -o demo.svg
termstage render demo.yaml --animated -o demo-animated.svg

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.1.0.tar.gz (7.4 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.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for termstage-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c6eed089f377cd56e73f68596a76f3678e8340b618179e42b05c3ecd848eed38
MD5 7eb2f393d424f07ca308979217eac2ad
BLAKE2b-256 9b194432b58f071c3620febe533de46a9ab41af540f1ebbe4b920975c4798424

See more details on using hashes here.

Provenance

The following attestation bundles were made for termstage-0.1.0.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: termstage-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43dfa29755eebaca9e18d7edde5e7ac4c6b3bc9b5daaaec7b0676cf508be1278
MD5 cc9474106fcecd36122d7db21a69b4de
BLAKE2b-256 440c932a2b6cabaabff52239b5ccb9a82bd5f7372f15753dc83071def97c6132

See more details on using hashes here.

Provenance

The following attestation bundles were made for termstage-0.1.0-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