Skip to main content

tapegif

Record animated GIFs of Textual terminal apps.

pip install tapegif
tapegif record myapp.py --tape demo.tape --output demo.gif

No screen capture. No window focus tricks. Drives your app headlessly via Textual's Pilot API, renders each SVG frame through a real browser (Playwright), assembles with Pillow. Works in CI. Same GIF every run. Works on Windows, macOS, Linux.

install

pip install tapegif
playwright install chromium

quick start

1. Scaffold a tape file:

tapegif init

This writes a demo.tape in the current directory. Edit it to match your app.

2. Record:

tapegif record path/to/yourapp.py --tape demo.tape

Outputs demo.gif by default.

tape format

size: [120, 30]       # terminal cols × rows
gif_width: 900        # output GIF width in pixels
app_args: {}          # kwargs passed to your App constructor

steps:
  - sleep: 3.0        # wait for app to load
    capture: 2000     # snapshot and hold this frame 2s in the GIF

  - press: a          # press a key
    sleep: 0.4
    capture: 1200

  - type: "hello"     # type a string
    sleep: 0.5
    capture: 1000

  - press: enter
    sleep: 0.2
    capture: 800

Each step can have:

  • press — a single key name (a, space, enter, ctrl+c, etc.)
  • type — a string to type character by character
  • sleep — seconds to wait after the action
  • capture — take a snapshot and hold it this many ms in the output GIF

Steps without capture perform their action without recording a frame.

passing constructor args

app_args:
  root: /home/user/projects
  older_than: 30
  min_size_mb: 10

CLI reference

tapegif record APP [--tape FILE] [--output FILE] [--width PX]
tapegif init [--output FILE]

APP is path/to/file.py (auto-discovers the App class) or path/to/file.py:ClassName (explicit).

requirements

  • Python 3.10+
  • Textual 0.80+
  • Playwright (Chromium)
  • Pillow

license

MIT

Metadata

Release files for tapegif 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tapegif 0.1.2
File Size Uploaded
tapegif-0.1.2.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tapegif 0.1.2
File Interpreter ABI Platform
tapegif-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / tapegif-0.1.2.tar.gz

Download URL tapegif-0.1.2.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b164ed90b5f042fcb9d4acfc7e71d7e87c2e1c0f45bba18e0928cbe0bb9cf66e
BLAKE2b-256 checksum
How to use checksums
a3b51a4cc5c3d81d6eed1acc877ec7dbc1b0d5e18fd9b6b23f8c37779595ad5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / tapegif-0.1.2-py3-none-any.whl

Download URL tapegif-0.1.2-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c131641a34ad8231532d28f11e3f8747651fb0776293e52f7eba3d89ebde4c23
BLAKE2b-256 checksum
How to use checksums
d132f99f31dfa137e119a391a7fa70bfb584631da09839c18a48c07f72a7ad77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page