Skip to main content

narratty

narratty

Turn your docs into narrated terminal videos. narratty reads a Markdown doc, speaks its paragraphs with local text-to-speech (Kokoro or Piper) and runs its code blocks in a real terminal (VHS), keeping voice and picture in sync. It runs sandboxed in Docker or Podman, or natively.

License: MIT

  • One source, read or watched: readers read the doc, others watch or listen to the video made from it.
  • Docs that are checked: every command really runs; narratty check also compares what they print with the doc.
  • Videos that stay current: change the doc, rebuild the video.
<!-- hello.md -->
# Hello

This is a quick tour of the repository layout.

```console
$ eza --tree --level=1 .
```
uv tool install narratty   # or: pipx install narratty
narratty build hello.md    # writes hello.mp4
narratty build hello.md -f cast  # hello.cast + hello.mp3 + hello.html
narratty check hello.md    # runs the commands, compares their output

A YAML spec can point at the doc instead and add what the doc doesn't hold: an intro, a transition between docs, hidden setup, or a demo with no doc behind it.

# hello.narratty.yaml (narratty init --markdown hello.md writes one)
scenes:
  - markdown: hello.md

With Docker or Podman installed, the build runs in the ghcr.io/ditschi/narratty image and needs nothing else on the host. Without one, narratty doctor lists the tools native mode needs.

Documentation: https://ditschi.github.io/narratty/

Features

  • Markdown input: a Markdown doc becomes the video; its paragraphs are the narration, its code blocks run in the terminal, and tables, images and mermaid diagrams become slides.
  • Output: an MP4, or an asciicast with narration and a player page (--format cast).
  • Local voices: Kokoro (natural sounding, the default) or Piper (many languages), no cloud service. Narration and typing stay in sync, and audio is cached.
  • Sandboxed by default: runs in Docker or Podman with no network unless the spec asks for it and you approve. The demo runs in a throwaway snapshot of your repository. Native mode is available too.
  • Subtitles and drafts: SRT/VTT files, a soft track or burned-in text from the narration; --draft previews timing in seconds, without TTS.
  • Overlays: chapter titles, file names and notes in a rounded box over the video, with reusable styles.
  • Browser views: a web page or local HTML file as Chromium renders it, scrolling while the narration talks about it.
  • YAML scenes: intros, transitions and demos without a doc; hidden setup scenes, waits for screen output, key presses and per-scene typing speed.
  • Editor layout: a file explorer with preview above the shell (terminal.layout: editor), focus and reveal actions, and a diff of what the demo changed.
  • Demo toolkit: bat, delta, eza, fd, ripgrep, jq, micro, yazi, file, tmux and zsh as static binaries, for the narratty image and, with one COPY line, for any dev container.
  • Editor support: a JSON Schema for completion and inline errors, validate with line numbers, and shell completion.

Development

uv sync --extra dev
uv run pre-commit install
nox                                 # all quality gates (NOX_CI=1 skips auto-formatting)

See the contributor guide.

License

MIT

Metadata

Release files for narratty 0.6.0

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

Source distribution (sdist)

Source distribution for narratty 0.6.0
File Size Uploaded Provenance Actions
narratty-0.6.0.tar.gz 3.7 MB With provenance Details for narratty-0.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 3.9 MB

Release files / narratty-0.6.0.tar.gz

Download URL narratty-0.6.0.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
85346bd6cb67b455a22766e5d0c3b55df2747dac1d6222add6b8c858eb9f0933
BLAKE2b-256 checksum
How to use checksums
b65f41a06af729078c6d0c1a416df4ea5e93125b06cb93b36f778de34103641b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / narratty-0.6.0-py3-none-any.whl

Download URL narratty-0.6.0-py3-none-any.whl
Size 200.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1689d82e92c562723ec24b0ca2f5aa68cbf4677b87ad4633c05bdd18b48948a3
BLAKE2b-256 checksum
How to use checksums
c3452ebecaeb7b448e18606efd044b2fc98587dfc44a3af4eace29b44bda1c23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for narratty 0.6.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for narratty-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

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