Built an OSS Doc Tools Suite: SSG, Template Engine, Parser, & Syntax Highlighter

Wanted to share some projects I’ve been working on over the past 3-4 months that are all built for Python 3.14t free-threading.

  • Bengal: A Static Site Generator (SSG) . If you like the power/mental model of Hugo but need Python/CLI autodocs, this SSG is that. Doing this project inspired me to tackle all the others in this list and then extract them as separate tools.
  • Kida: A template engine. My attempt at an alternative to Jinja2.
  • Patitas: A markdown parser that’s CommonMark compliant.
  • Rosettes: A Syntax highlighter.

Each of these dogfood Bengal as their docs site, being built on GH pages. Example: Bengal - Bengal

My hope is to eventually make Bengal the most ergonomic and batteries-included OSS SSG available – I’ve gotten pretty far, but it’s a long road!

Also, if you like building themes… I’d love to see some come out for this so I can build a showcase. Right now it’s just the default, and the only real working scenario is of course the documentation output haha.

2-Month Update: It’s Now a Full-Stack Ecosystem

Hey all — wanted to circle back and update you on my vibecoding journey. Since January the scope has grown quite a bit — what started as a doc tools suite is now a full-stack web ecosystem. Still all pure Python, all free-threading native, all built in Cursor (though some Claude Code). Overall, the Composer models keep me coming back. I absolutely loved Composer 1.5 and excited to have 2.0 take my stack forward.

Note
All of these are still alpha/beta, but I just enjoy sharing the update.


New: Pounce — ASGI Server

GitHub · pip install bengal-pounce
An ASGI server that auto-detects whether you’re on free-threaded Python (spawns worker threads, shared interpreter) or GIL Python (spawns worker processes). You don’t configure this — it just does the right thing.

  • HTTP/1.1, HTTP/2, and WebSocket support, plus HTTP/3 via optional Zoomies integration
  • Custom fast HTTP/1.1 parser replacing h11 on the sync worker hot path
  • Comparable to uvicorn throughput in multi-worker sync mode
  • Built-in Prometheus metrics endpoint, OpenTelemetry tracing, and Sentry integration — no extra packages
  • Static file serving with ETags, range requests, and pre-compressed file detection
  • Rate limiting, slowloris protection, TLS termination, Unix domain sockets
  • Rich dev error pages with syntax-highlighted tracebacks (using Rosettes from the original post)
  • Graceful reload via SIGHUP for zero-downtime deploys

New: Chirp — Web Framework

GitHub · pip install bengal-chirp
A web framework built for the modern web platform — browser-native UI, HTML over the wire, streaming, and SSE. No React. No build step. I’m having a lot of fun with this.

  • Return types drive content negotiation: return a Template for a full page, a Fragment for an htmx partial, a Stream for progressive HTML, an EventStream for SSE. No make_response() boilerplate.
  • Filesystem-based page routing with nested layouts
  • app.check() validates your entire hypermedia surface at startup — routes, template refs, fragment blocks, htmx targets, SSE event names
  • Islands architecture for isolated high-state widgets (Alpine.js, vanilla JS, whatever)
  • App shells with OOB swaps — sidebar, breadcrumbs, and title update without full page reloads
  • Built-in auth with sessions, rate-limited login, lockout, and audit events
  • Fused sync fast path through Pounce for simple handlers
  • CLI scaffolding: chirp new, chirp run, chirp check

New: chirp-ui — Component Library

GitHub · pip install chirp-ui Static Showcase
An optional UI layer for Chirp. Gorgeous by default, htmx-native, zero JavaScript for core components.

  • 170+ component templates: layout, forms, data display, docs, streaming
  • 24 ASCII-art primitives (sparklines, split-flap displays, VU meters, progress bars)
  • CSS-only animated backgrounds (constellation, symbol rain, aurora, and more)
  • Alpine.js integration with Focus, Intersect, and Mask plugins

New: Zoomies — Pure-Python QUIC / HTTP/3 (Early Alpha)

GitHub · pip install zoomies
Sans-I/O QUIC and HTTP/3 for Python 3.14t. I built this because aioquic uses C extensions that don’t work with free-threaded Python. Zoomies is pure Python: feed datagrams in, get events out. CID-based connection routing for server-side multiplexing. Powers Pounce’s H3 layer. Still early — congestion control and 0-RTT are not yet implemented.


Updates to the Original 4

Bengal (SSG) now has:

  • Native Jupyter Notebook rendering
  • A Pounce-backed dev server with double-buffered output — eliminates FOUC during rebuilds, SSE live reload, fragment-based partial page updates
  • i18n gettext workflow (bengal i18n extract/compile/status)
  • Kida is now the default and primary template engine
  • Remote content sources — pull markdown from GitHub repos, REST APIs, or Notion databases
  • Output generators for llms.txt, robots.txt, agent manifests, and changelogs
  • Content Signals — mark pages as available/unavailable for AI training and AI input
  • KaTeX math rendering, MkDocs-compatible versioning, shortcodes
  • Zstandard cache compression, indexed template and section lookups, render-time asset tracking

Kida (Template Engine) now has:

  • Streaming rendering — render_stream() yields chunks for chunked HTTP and SSE
  • {% region %} blocks — parameterized fragments that work as both blocks and callables (the key primitive for Chirp’s OOB layout composition)
  • {% yield %} for context-independent slot rendering in nested component chains
  • Compile-time optimizations — partial evaluation, constant folding, dead code elimination, f-string coalescing
  • Frameworks can introspect block structure, validate block existence, and render individual blocks
  • Named slots, typed {% def %} parameters, multiple loader types (package, prefix, choice, function)
  • Error codes on every exception with docs links and source snippets

Patitas (Markdown Parser) now has:

  • Incremental re-parsing — reuses unaffected AST blocks so re-parse cost scales with change size
  • AST diffing for structural change detection (powers live preview)
  • Jupyter notebook parsing (zero dependencies)
  • YAML frontmatter extraction
  • LLM renderer — structured plain text output with composable sanitization policies (llm_safe, web_safe, strict) including Trojan Source mitigation
  • Excerpt extraction that respects block boundaries
  • Content-addressed parse cache for incremental builds
  • Near-linear parallel scaling under free-threading

Rosettes (Syntax Highlighter) — Stable. Powers Bengal docs sites and Pounce’s dev error pages.


The Stack

Everything dogfoods everything else:

Zoomies (QUIC/H3) → Pounce (ASGI server) → Chirp (framework) → chirp-ui (components)
                                                    ↓
                                             Kida (templates) + Patitas (markdown)
                                                    ↓
                                             Bengal (SSG) → docs sites
                                                    ↓
                                             Rosettes (syntax highlighting)