Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

termtosvg

> 开发工具
Open source

Record terminal sessions as SVG animations

9.8K stars0 likes2 views
WebsiteGitHub

About

Record terminal sessions as SVG animations

Note: As of June 2020 I do not have time to maintain termtosvg anymore and this repository is now read-only.

termtosvg

termtosvg is a Unix terminal recorder written in Python that renders your command line sessions as standalone SVG animations.

  • Gallery of examples
  • Gallery of templates

Features

  • Produce lightweight and clean looking animations or still frames embeddable on a project page
  • Custom color themes, terminal UI and animation controls via user-defined SVG templates
  • Rendering of recordings in asciicast format made with asciinema

Installation

termtosvg is compatible with Linux, macOS and BSD OSes, requires Python >= 3.5 and can be installed as follows using pip:

bash
# Create virtualenv named '.venv'
python3 -m venv .venv
# Activate virtualenv
source .venv/bin/activate
pip3 install termtosvg

Then run termtosvg by calling either termtosvg or python3 -m termtosvg.

Various independently maintained, OS specific packages have been made available by the community:

OS Repository Installation command
Archlinux Arch pacman -S termtosvg
FreeBSD ports
Gentoo media-gfx/termtosvg emerge media-gfx/termtosvg
macOS Homebrew brew install termtosvg
OpenBSD ports
NixOS nixpkgs

Basic usage

Start recording with:

$ termtosvg
Recording started, enter "exit" command or Control-D to end

You are now in a subshell where you can type your commands as usual. Once you are done, exit the shell to end the recording:

$ exit
Recording ended, file is /tmp/termtosvg_exp5nsr4.svg

Then, use your favorite web browser to play the animation:

$ firefox /tmp/termtosvg_exp5nsr4.svg

Finally, embedding the animation in e.g. a README.md file on GitHub can be achieved with a relative link to the animation:

markdown

See the manual page for more details.

Dependencies

termtosvg uses:

  • pyte to render the terminal screen
  • lxml to work with SVG data

Issues· 12 open

View all issuesOpen on GitHub
  • #122

    Blink does not blink

    Updated Jun 16, 2020
  • #121

    Can I install TermToSVG on Windows?

    Updated Jun 3, 2020
  • #119

    Cutting frames from resulting SVG

    Updated Apr 22, 2020
  • #113

    homepage svg doesn't play on safari

    bugUpdated Apr 9, 2020
  • #118

    JavaScript themes without JavaScript enabled

    Updated Apr 4, 2020
  • #116

    Firefox: slider in window_frame_js template misplaced and moving to the wrong direction, when SVG is in an HTML file

    Updated Apr 1, 2020
  • #14

    powerline fonts have mangled output

    Updated Mar 6, 2020
  • #108

    Add support for ttyrec recording format

    enhancementUpdated Dec 10, 2019
  • #107

    Color issues in bold text in version 1.0.0

    Updated Nov 19, 2019
  • #98

    Capture and preserve xterm title sequences.

    enhancementUpdated Jun 17, 2019

> Tags

Pythonanimationclirecorderrecording

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具