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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tapegif-0.1.2.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

tapegif-0.1.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file tapegif-0.1.2.tar.gz.

File metadata

  • Download URL: tapegif-0.1.2.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for tapegif-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b164ed90b5f042fcb9d4acfc7e71d7e87c2e1c0f45bba18e0928cbe0bb9cf66e
MD5 c87d3dfe1f95bd43e0bde03838b948f7
BLAKE2b-256 a3b51a4cc5c3d81d6eed1acc877ec7dbc1b0d5e18fd9b6b23f8c37779595ad5a

See more details on using hashes here.

File details

Details for the file tapegif-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tapegif-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for tapegif-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c131641a34ad8231532d28f11e3f8747651fb0776293e52f7eba3d89ebde4c23
MD5 9e85e7fb04b7ffd341a453e4663b42a2
BLAKE2b-256 d132f99f31dfa137e119a391a7fa70bfb584631da09839c18a48c07f72a7ad77

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page