Skip to main content

TermDeck

Terminal presentations, written in Markdown or Python. Built on Textual.

Each file in a deck folder is one slide. Navigate with the arrow keys.

Install

pip install termdeck

Optional extras:

pip install "termdeck[music]"   # interactive music-pad slides

Requires Python 3.10 or newer.

Usage

termdeck                # play the bundled sample deck
termdeck ./my-deck      # play your own deck
python -m termdeck      # same thing

Navigate with ← / → arrow keys.

While viewing a slide that contains an image:

  • f — toggle fullscreen image view
  • o — open the image in your system default image viewer
  • Esc — exit fullscreen
  • Ctrl+C — quit

Presenter notes

Add notes to any Markdown slide with block-level HTML comments:

# My title

- a bullet
- another bullet

<!-- note: Remember to mention the 3x speedup -->

Open a notes companion in a second terminal:

termdeck --notes ./my-deck

The notes window shows the current slide’s notes, a running timer, and the next slide filename. It syncs automatically as you navigate the main deck.

Writing a deck

A deck is a folder of slide files. Files are sorted by name.

Markdown slides

# My title

- a bullet
- another bullet

![diagram](diagram.png)

Image paragraphs (![alt](path)) are rendered as images. Relative paths are resolved from the slide file's directory.

Images are rendered using the best available terminal graphics method: Kitty graphics protocol, Sixel, iTerm2 inline images, or a colored half-block fallback. This means images stay crisp even when you zoom the terminal font to make text readable.

Supported formats: png, jpg, jpeg, gif, webp, bmp.

Images are horizontally centered. By default ![alt](path) images render at a fixed width of 60 cells. To control an individual image's size, use a standard HTML <img> tag:

<img src="diagram.png" width="80%">
<img src="diagram.png" width="60" height="auto">

To change the default size or alignment for all images in a deck, add a deck.tcss file in your deck folder:

/* Default: 60 cells wide, centered */
#markdown-slide ImageWidget {
    width: 60;
    height: auto;
    margin: 0 10;
}

If image auto-detection misbehaves in your terminal, force a specific renderer:

TERMDECK_IMAGE_PROTOCOL=kitty termdeck ./my-deck     # Kitty TGP
TERMDECK_IMAGE_PROTOCOL=sixel termdeck ./my-deck     # Sixel
TERMDECK_IMAGE_PROTOCOL=halfcell termdeck ./my-deck  # colored half blocks
TERMDECK_IMAGE_PROTOCOL=unicode termdeck ./my-deck   # unicode characters

Python slides

A Python slide is a Textual Screen. It must expose a Slide class:

from textual.app import ComposeResult
from textual.screen import Screen
from textual.widgets import Button

class Slide(Screen):
    def compose(self) -> ComposeResult:
        yield Button("Hello")

The screen's widgets are styled by styles/default.tcss. You can add a deck.tcss file in your deck folder to override styles. All Textual functionality is available for rich, interactive slides.

Development

pip install -e ".[dev]"
python test.py
python -m build

License

MIT

Terminal graphics rendering is provided by textual-image (LGPL-3.0-or-later).

Metadata

Release files for termdeck 0.3.1

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

Source distribution (sdist)

Source distribution for termdeck 0.3.1
File Size Uploaded Provenance Actions
termdeck-0.3.1.tar.gz 11.4 kB Without provenance Details for termdeck-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 23.0 kB

Release files / termdeck-0.3.1.tar.gz

Download URL termdeck-0.3.1.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ec547f34968dd45c45ca8ba3a3ba9696823c553cc2147b69943d5101c58f5660
BLAKE2b-256 checksum
How to use checksums
ee494a663d79bae84c5e0f7decefa0243e4037615c8b501ebc9dfe510ddb626b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / termdeck-0.3.1-py3-none-any.whl

Download URL termdeck-0.3.1-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
698f875787cd8f12350c25ee73dcd41c29ca6b8e27f29a12793bad4a8b282517
BLAKE2b-256 checksum
How to use checksums
51d72e84e35fb93cd1be8ddf46bca3c9415a42d30dcfb2fd88427e75dd71e2f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Security for termdeck 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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