Skip to main content

thumbforge

ci docs License: MIT Python 3.14

Generate consistent, spec-compliant YouTube thumbnails from a hero image and a playlist — from the terminal.

  • Hero first. Generate several candidates for one video, compare, pick, refine.
  • Batch second. Use the picked hero as the style reference for every video in a playlist, with deterministic titles and "Part N" badges rendered by Pillow over AI-generated art.
  • Pluggable providers. Antigravity CLI first; add your own via the thumbforge.providers entry-point group. A deterministic fake provider keeps tests offline.
  • Local database. Channels, playlists, videos, templates, runs, iterations and assets in SQLite; images content-addressed on disk; interrupted batches resume without regenerating finished items.

Status: pre-release. v0.1.0 has not been tagged or published yet, so Thumbforge is not on PyPI. Install it from GitHub as shown below. The changelog lists what is on main.

Install

Thumbforge needs uv and Python 3.14 (uv downloads Python if it is missing). Install from GitHub:

uv tool install git+https://github.com/khiladisngh/thumbforge

or from a checkout:

git clone https://github.com/khiladisngh/thumbforge
cd thumbforge
uv tool install .

Check it:

thumbforge --version

Once v0.1.0 is published (not yet): uv tool install thumbforge.

Quick start

This reproduces the three examples of PLAN.md §5.3 — fetch a playlist, generate a hero, run a batch — with the offline fake provider, so it needs no account and no API key. fetch reads public YouTube metadata, so it needs network access. The images the fake provider returns are placeholders, not artwork.

Point Thumbforge at a scratch config and data directory first, so nothing touches your real setup. These two lines are the only shell-specific part:

# Linux / macOS
export THUMBFORGE_CONFIG="$PWD/scratch/config.toml"
export THUMBFORGE_GENERAL__DATA_DIR="$PWD/scratch/data"
# Windows PowerShell
$env:THUMBFORGE_CONFIG = "$PWD\scratch\config.toml"
$env:THUMBFORGE_GENERAL__DATA_DIR = "$PWD\scratch\data"

Create the database, which also stores the built-in templates:

$ thumbforge db init
initialized database at <data-dir>/thumbforge.sqlite3 (0001)

1. Fetch a playlist. This one is public and large (about 180 videos); batch --only below keeps the run short. It prints the playlist and one row per video, with the video's part number and id:

$ thumbforge fetch "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI"
…
Stored 1 channel, 1 playlist, <n> videos.

2. Generate a hero. Pass the id of the first video from the table above as <video-id>:

$ thumbforge thumb generate <video-id> --template bold-title --provider fake --n 4
Run <run-id>
Kind      hero
Status    completed
Template  bold-title@1
Provider  fake@0.1.0:<fingerprint>
Video     <video-id>
Started   <timestamp>
Finished  <timestamp>
┏━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━┓
┃ # ┃ Status    ┃ Size      ┃ Compliant ┃ Key          ┃ Cost ┃ Asset / Error ┃
┡━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━┩
│ 1 │ completed │ 1920x1080 │ ✔         │ <key>        │ —    │ <asset>       │
│ 2 │ completed │ 1920x1080 │ ✔         │ <key>        │ —    │ <asset>       │
│ 3 │ completed │ 1920x1080 │ ✔         │ <key>        │ —    │ <asset>       │
│ 4 │ completed │ 1920x1080 │ ✔         │ <key>        │ —    │ <asset>       │
└───┴───────────┴───────────┴───────────┴──────────────┴──────┴───────────────┘
…
Pick one with: thumbforge thumb pick <run-id> <ordinal>

The … is a table of file paths (a terminal that can draw images shows a preview instead). Copy the run id from the first line.

3. Pick one candidate. The picked image becomes the style reference for the batch:

$ thumbforge thumb pick <run-id> 2
Picked #2 of run <run-id> (iteration <iteration-id>)
Export it with: thumbforge thumb export <run-id> --to PATH

4. Run a batch for the first three videos of the playlist, in the hero's style:

$ thumbforge batch PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI --hero <run-id> --template series-parts --only 1-3
Batch run <batch-run-id>
Playlist    <playlist-title>
Template    series-parts@1
Provider    fake@0.1.0:<fingerprint>
Reference   <asset> (final)
Parent run  <run-id>
Status      completed
Items       3 completed, 0 failed, 0 pending of 3
…

Run ids, asset hashes and timestamps differ on every run, and the playlist's videos change over time. Progress lines such as run started go to stderr and are left out above; --quiet hides them. batch --dry-run prints the plan and generates nothing. If a batch is interrupted or some items fail, thumbforge runs resume <batch-run-id> finishes the rest without regenerating the completed ones.

Where to go next:

Documentation

Published at https://khiladisngh.github.io/thumbforge/, in three sections: a user guide, developer docs (architecture, conventions, testing, specs) and maintainer docs (release process, CI, roadmap, decision records).

Development

uv sync --locked
uv run pytest -q
uv run ruff check . && uv run ruff format .
uv run pyright
uv run zensical serve      # docs at http://localhost:8000
pre-commit install

License

MIT © 2026 Gishant Singh

Metadata

Release files for thumbforge 0.1.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 thumbforge 0.1.0
File Size Uploaded
thumbforge-0.1.0.tar.gz 348.7 kB Details

Built distribution (wheel)

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

Total release size: 734.1 kB

Release files / thumbforge-0.1.0.tar.gz

Download URL thumbforge-0.1.0.tar.gz
Size 348.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1865e7f617a7528be429b6e3b2829dfb1ef593f294ea03ade4df9ce0fd1e9910
BLAKE2b-256 checksum
How to use checksums
ba425fce3fd770883e8cf5408199e0238fa3680ee0a819f33c063839fb247066
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 4, 2026.

Transparency log

Release files / thumbforge-0.1.0-py3-none-any.whl

Download URL thumbforge-0.1.0-py3-none-any.whl
Size 385.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b08deb6c996bfde776db1a7f3cb0a60f487386196c55708a4be1a2d39fefca03
BLAKE2b-256 checksum
How to use checksums
c960784b8f3b9ee52049f0da2b3fd8bc5674d03efbd304c00670cdc3aba71ed3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 4, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

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