Canonical user manual, configuration reference, Lua API, and guides for Bitty.
Unlike the architectural and governance corpora (bitty-docs, bitty-terminal-docs, bitty-plugins-docs, bitty-ai-docs) which focus on internal designs, RFCs, and ADRs, bitty-manual is the authoritative, concise, human-oriented manual for end users and plugin authors.
It serves as the single source of truth for:
- Online Documentation: Consumed by bitty-website to render
https://bitty.run/docs. - Terminal-Native Doc Viewer: Consumed by the
bitty docCLI and downstream panel plugin for local offline viewing (https://cdn.bitty.run/manual/). - CDN Distribution & Offline Bundles: Continuous Delivery automatically publishes versioned packages, search indices, and raw markdown to Cloudflare R2.
Documentation artifacts are continuously published to the bitty Cloudflare R2 bucket and served at https://cdn.bitty.run/manual/. The canonical layout is per-package (manual/<package>/, package bitty-manual); a new locale ships as new files without renaming existing keys.
- Manifest:
https://cdn.bitty.run/manual/bitty-manual/manifest.json - Search Index:
https://cdn.bitty.run/manual/bitty-manual/search-index.json(offline fuzzy search) - Table of Contents:
https://cdn.bitty.run/manual/bitty-manual/toc.json(hierarchical navigation) - Per-Locale Tarballs:
https://cdn.bitty.run/manual/bitty-manual/<locale>.tar.gz(e.g.en.tar.gz,zh-CN.tar.gz) - Per-Locale Zips:
https://cdn.bitty.run/manual/bitty-manual/<locale>.zip - Versioned (immutable):
https://cdn.bitty.run/manual/bitty-manual/v<version>/<locale>.tar.gzplus versionedmanifest.json,search-index.json,toc.json
Versioned keys are immutable: any content change requires a manifest.version bump before publishing. scripts/upload-r2.mjs enforces it - before uploading a v<version>/ object it reads the existing bytes from R2 and aborts when they differ, because a silent overwrite leaves CDN edges serving different payloads for the same "immutable" URL and breaks every lock file that pinned the version (bitty-manual#109). Versioned keys (v<version>/..., -<version>., -<version>-) carry Cache-Control: public, max-age=31536000, immutable; mutable latest keys (<locale>.tar.gz, manifest.json, search-index.json, toc.json, raw Markdown) carry Cache-Control: public, max-age=60, s-maxage=60, must-revalidate so edge caches converge within a minute after a deploy.
- Raw Documents:
https://cdn.bitty.run/manual/bitty-manual/<locale>/<section>/<file>.md
The previous flat keys keep working and are dual-published on every deploy — no existing URL breaks:
| Legacy key | Canonical replacement |
|---|---|
manual/manifest.json |
manual/bitty-manual/manifest.json |
manual/search-index.json, manual/toc.json |
manual/bitty-manual/search-index.json, manual/bitty-manual/toc.json |
manual/bitty-manual-latest.tar.gz / .zip (and versioned -<version> files) |
manual/bitty-manual/<locale>.tar.gz / .zip |
manual/<locale>/<section>/<file>.md |
manual/bitty-manual/<locale>/<section>/<file>.md |
manual/latest/... mirror |
manual/bitty-manual/... |
Compat mechanism is copies, not redirects (plain R2 public serving has no redirect primitive). Sunset: legacy keys stop being published once bitty doc and the website cut over to canonical keys; removal is tracked follow-up work, announced before it lands.
A local listing is not possible with the available tooling (wrangler r2 object supports get/put/delete only), so the expected key set is reconstructed from scripts/upload-r2.mjs and verified live in CD: after just upload-r2 — which also deterministically prunes retired keys (RETIRED_RAW_KEYS) after a successful upload — the Verify published keys step fetches the canonical manifest, one per-locale bundle, and the legacy manifest over public HTTPS. Local work validates the same mapping with just upload-r2-dry, which prints every key and every would-be prune without network access.
The downstream documentation viewer plugin runs inside a Bitty Panel (similar to cargo doc or tldr):
- Initial Sync / Update: Fetches
https://cdn.bitty.run/manual/bitty-manual/manifest.jsonor downloadsbitty-manual/<locale>.tar.gzinto$XDG_DATA_HOME/bitty/manual/(Linux) or%LOCALAPPDATA%\bitty\manual(Windows). Legacy flat keys undermanual/keep working until the documented sunset. - Offline Fuzzy Finder: Loads
search-index.jsonto enable instant keyword search across all sections and headings without network latency. - In-Terminal Markdown Rendering: Directly displays selected documentation inside an active terminal panel.
To ensure all documented configuration fields, types, and API signatures are 100% accurate and never drift from the Rust runtime:
- Canonical schema definitions are tracked in
schemas/config-fields.json. - CI enforces
scripts/verify-config-schema.mjson every commit, failing closed if any documented configuration field does not exist in the authoritative schema.
bitty-manual/
├── manifest.json # Canonical table of contents and version mapping
├── schemas/ # Authoritative schema snapshots
│ └── config-fields.json
├── en/ # Canonical English documentation
│ ├── getting-started/ # Installation & initial tour
│ ├── configuration/ # Configuration keys, types, and reload classes
│ ├── extensions/ # Upstream Rust-level extension catalog
│ ├── plugins/ # Plugin architecture, manifests, and capabilities
│ │ └── catalog/ # Downstream Lua plugin catalog
│ ├── api/ # Sandboxed Lua API reference
│ └── faq/ # Troubleshooting, safe mode, and diagnostics
├── zh-CN/ # Simplified Chinese mirror of en/ (same layout)
├── scripts/ # Verification and validation scripts
│ ├── verify-config-schema.mjs
│ ├── package-manual.mjs # Packaging & archive bundling
│ └── upload-r2.mjs # Cloudflare R2 continuous delivery
└── justfile # Quality gate automation
The manual publishes one bundle per locale plus a legacy compatibility tree (see
distribution in manifest.json):
- canonical:
manual/bitty-manual/manifest.json,manual/bitty-manual/<locale>.tar.gzandmanual/bitty-manual/v<version>/..., withSHA256SUMS.txt - legacy compatibility:
manual/manifest.json,manual/<locale>/<section>/<file>.md,manual/latest/...
Two catalog trees must not be confused: en/extensions/ and zh-CN/extensions/
list upstream Rust-level extensions, while en/plugins/catalog/ and
zh-CN/plugins/catalog/ list downstream Lua plugins.
The catalog split (#28)
renamed published keys — section keys extensions/<name>.md →
plugins/catalog/<name>.md, and search ids en:extensions:<slug> →
en:plugins:catalog-<slug>. This was an accepted pre-1.0 break while the
pipeline was upload-only; CD now runs a deterministic prune step after every
successful upload that deletes retired raw keys (RETIRED_RAW_KEYS in
scripts/upload-r2.mjs, each entry traceable to the git commit that renamed
its source file) and also tolerates keys that are already missing. Old raw
keys stop resolving once pruned; before the prune step shipped, previously
published pre-split keys stayed in the bucket and could still serve stale
copies (#35).
Run the local quality checks:
just checkThis verifies formatting (Prettier), Markdown linting, GitHub Actions workflow linting (actionlint), schema anti-drift, and builds the distribution package.
Other recipes:
just fmt # Auto-format all files
just package # Build dist/ release archives and search index
just upload-r2-dry # Dry-run R2 upload simulation