Skip to content

In the command line

The Termage CLI offers a quick and customizable way to export SVGs from your terminal.

Usage

You simply call termage with some code, and provide options to customize the output. By default, the output file will be printed to STDOUT, but you can export directly to a file using the -o flag.

Termage also accepts having code piped to it; this sets the code argument to -, which will cause it to read from STDIN.

Showcase

source.py
import pytermgui as ptg

with ptg.WindowManager() as manager:
    manager.layout.add_slot("Body")
    manager.add(
        ptg.Window(
            ptg.inspect(ptg.inspect),
            box="EMPTY",
        ),
    )

Syntax highlighting

termage source.py --title="Welcome to the Termage CLI!"

Welcome to to Termage CLI!

termage source.py --title="Welcome to the Termage CLI!" --highlight

Welcome to to Termage CLI!