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

inspector = ptg.inspect(ptg.inspect)
print(inspector)
termage.fit(inspector)

Syntax highlighting

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

Welcome to the Termage CLI! ────────────────────────────────────────────────────────────────────────────── │                            pytermgui.inspector.inspect                           │ │      Located in  /Users/lapis/Code/Projects/pytermgui/pytermgui/inspector.py      │ ────────────────────────────────────────────────────────────────────────────── def   inspect (target:  object , **inspector_args:  Any ) ->  Inspector :                       Inspects an object.                                                                                                                                                  Args:                                                                                  target: The object to inspect.                                                     **inspector_args: See `Inspector.__init__`.                              

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

Welcome to the Termage CLI! import  pytermgui  as  ptg inspector = ptg. inspect (ptg. inspect) print (inspector) termage. fit (inspector)