html-gen
Markdown / JSON → self-contained single-file HTML. Zero dependencies.
Dark theme, Chinese-first. Four template types: B-doc (TOC sidebar), A-table (search / sort / paginate), C-knowledge (tabs + sections), D-slide (h2 pages).
html-gen is an independent tool — unrelated to the npm package "html-gen".
- Zero External Dependencies — Python stdlib only; output is a self-contained single HTML file (CSS inlined)
- Four Template Types — doc / table / knowledge / slide (
html-gen doc|table|knowledge|slide) - Rich Data Table — search / multi-sort / pagination / column visibility / CSV export / batch ops / split preview / videos column
- Knowledge Base — top tabs + sidebar sections + iframe/inline content, URL sync & state restore
- AI Agent Integration —
html-gen promptships project skills (usage docs for AI agents) - Privacy by Default — generated HTML carries no personal links unless you opt in (
--github-url/--home-url)
Installation
pip install html-gen-cli # installs the `html-gen` command
Or run from source (no install):
git clone https://github.com/imjaden/html-gen.cli
cd html-gen.cli
python3 html-gen.py version # html-gen v3.3 (2026-08-28)
Quick Start
# B — Markdown → document (TOC sidebar + reading)
html-gen doc -i report.md -o report.html
# D — Markdown → slide (h2 pages + keyboard nav)
html-gen slide -i slides.md -o slides.html
# A — JSON → data table
html-gen table -d data.json -o index.html
# C — JSON → knowledge base (top tabs + sidebar sections)
html-gen knowledge -d kb.json -g groups.json -o kb.html
Commands
| Command | Description |
|---|---|
html-gen doc |
Markdown → B-type document |
html-gen slide |
Markdown → D-type slide |
html-gen table |
JSON → A-type data table |
html-gen knowledge |
JSON → C-type knowledge base |
html-gen version |
Show version (vX.Y + release date) |
html-gen help [topic] |
Overview + topic help (doc/slide/table/knowledge/prompt/demo) |
html-gen prompt [skill] |
Output project skills (AI-facing docs) |
html-gen demo list |
Demo index & registry |
AI Interchange
html-gen prompt # list all skills (name + description)
html-gen prompt html-gen-table # full usage guide for one skill
html-gen prompt html-gen-table --brief
html-gen prompt --json # machine-readable envelope
Data Directory
data/*.json— source data (tables / knowledge bases)demos/*.html— generated artifacts (never hand-edit; regenerate from data)layout-*.html/style-guide.css— Layer-2 templates / Layer-1 CSS base
Local Development
# preview (root landing page + demos)
python3 -m http.server 8089
# run tests (pytest-xdist, ~36s)
python3 -m pytest tests/ -q -n 4
Testing
- Selenium headless Chrome regression suite (
tests/test_*.py, 214+ cases) - Every test asserts zero JS errors on page load
Metadata
Release files for html-gen-cli 3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| html_gen_cli-3.3.tar.gz | 128.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| html_gen_cli-3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 224.7 kB
Release files / html_gen_cli-3.3.tar.gz
| Download URL | html_gen_cli-3.3.tar.gz |
|---|---|
| Size | 128.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32c12ed0ef8c07f3f64bf1d653b01e87512ed3df4304b80231f6d72c38bf5a9d
|
|
BLAKE2b-256 checksum How to use checksums |
9acfc9ee84e9d0f616d0f9a0d9653328011355b06784d99777287e9877fd1d19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / html_gen_cli-3.3-py3-none-any.whl
| Download URL | html_gen_cli-3.3-py3-none-any.whl |
|---|---|
| Size | 96.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5eb1ee2cf3f93513cae36e07adad4315218d7fddf1cad64f5f1b9e0a9cf7b2e7
|
|
BLAKE2b-256 checksum How to use checksums |
ff10ff750a9ca0da8831f3cc76a7c8d0e045490cfc177b069084a04fdc2e45d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for html-gen-cli 3.3
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.