Skip to main content

Dead simple terminal GIF recorder

Project description

termgif

Dead simple terminal GIF recorder. Write a script, get a beautiful GIF.

termgif demo

Install

pip install termgif

Quick Start

termgif create demo      # create demo.tg from template
termgif demo             # run commands, record to GIF

Recording Modes

Default Mode (Live Commands)

Runs real commands and captures the output:

termgif demo

live mode

Simulated Mode

Fake output - commands aren't actually executed. Great for demos:

termgif demo --simulate
termgif demo -s

Terminal Capture Mode

Screen captures your actual terminal window while running the script:

termgif demo --terminal
termgif demo -t

terminal mode

Script Format (.tg)

// demo.tg
@output "demo.gif"
@size 80x24
@font 16
@title "My CLI Tool"
@theme "mocha"

-> "echo 'Hello, world!'" >>
~1s

-> "ls -la" >>
~2s

Config Reference

Output & Layout

Directive Description Default
@output "path" Output GIF path output.gif
@size WxH Terminal size (chars) 80x24
@font N Font size (px) 14
@padding N Content padding (px) 20

Timing

Directive Description Default
@speed Nms Typing speed per char 50ms
@start Nms Delay before starting 500ms
@end Nms Hold final frame 2s
@fps N Frames per second 10

Appearance

Directive Description Default
@title "text" Window title termgif
@theme "name" Color theme mocha
@cursor "style" block / bar / underline block
@prompt "$ " Custom prompt auto
@bare No window chrome off

Corners

Directive Description Default
@radius N Corner radius (both) 10
@radius-outer N Outer GIF edge @radius
@radius-inner N Inner window @radius

Advanced

Directive Description Default
@loop N 0=infinite, N=times 0
@quality N 1=fast, 2=smooth, 3=ultra 2

Script Syntax

Syntax Description
-> "text" Type text
>> Press enter
-> "text" >> Type + enter
~500ms Wait (ms or s)
// comment Single-line comment
/* ... */ Multi-line comment

Themes

Theme Description
mocha Catppuccin Mocha (default)
latte Catppuccin Latte (light)
frappe Catppuccin Frappe
macchiato Catppuccin Macchiato
dracula Dracula
nord Nord
tokyo Tokyo Night
gruvbox Gruvbox

CLI Options

termgif <script.tg> [options]

Options:
  -o, --output <path>    Override output path
  -b, --bare             No window chrome
  -s, --simulate         Simulated mode (no real commands)
  -t, --terminal         Terminal capture mode
  -v, --version          Show version
  -h, --help             Show help

Example

// showcase.tg
@output "showcase.gif"
@size 80x24
@font 16
@speed 60ms
@title "my-awesome-cli"
@theme "dracula"
@radius 12
@quality 3

-> "my-cli --help" >>
~2s

-> "my-cli init myproject" >>
~1.5s

-> "cd myproject && my-cli run" >>
~3s
termgif showcase

Features

  • Beautiful output - macOS-style window chrome, traffic lights, shadows
  • 8 themes - Catppuccin, Dracula, Nord, Tokyo Night, Gruvbox
  • 3 modes - Live commands, simulated, or screen capture
  • Rounded corners - Independent inner/outer radius
  • Pure Python - No FFmpeg or browser automation
  • Cross-platform - Windows, macOS, Linux

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

termgif-0.1.0.tar.gz (783.2 kB view details)

Uploaded Source

Built Distribution

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

termgif-0.1.0-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for termgif-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e967237f4cf195b7a6d1e7d88f7a27c2d48ed393adf86b4073d4d91e456b386f
MD5 1be53549720189e3d9a966e7c59500fc
BLAKE2b-256 a066d259c379f85343757acb1137a74fba4486e0140203b41c5f5676a1cc33ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for termgif-0.1.0.tar.gz:

Publisher: python-publish.yml on aayushadhikari7/termgif

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

File details

Details for the file termgif-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for termgif-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c9bbec3c69f5d7d1299a3a05de84b1fceee54c4f77fd835fd41f7f453c4ae13
MD5 b00b12eb711213ffa58710ea4d9d0e1f
BLAKE2b-256 bae3950fc0554e3ed3578eef783625b518e6ff4823a3e680cfdb1c1fdc782dbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for termgif-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on aayushadhikari7/termgif

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