AI generates HTML
Claude, Codex, Cursor — whatever your assistant — produces a self-contained pergam: a PR review board, a status dashboard, a spec with Mermaid.
A tiny self-hostable service that turns every HTML report, dashboard, or design doc your AI generates into a permanent, versioned URL your team can open. One Python file. One Postgres table. One docker compose up.
How it works
pergam is the glue between an AI that builds HTML artifacts and a team that needs to open and re-find them. Three steps, no UI to learn.
Claude, Codex, Cursor — whatever your assistant — produces a self-contained pergam: a PR review board, a status dashboard, a spec with Mermaid.
The companion Claude Code skill packages the HTML with title, type, and your email, then pushes to POST /pergam — no manual upload, no copy-paste.
Receive a stable URL like pergam.dev/a1b2c3d4/view. Re-publish the same id and you get v2, v3… latest always wins, history is preserved.
Why pergam vs. a generic HTML pastebin
Anonymous HTML hosts are fine for one-shot shares. pergam is for the workflow: your AI iterates, your team revisits, your infra stays private.
AI posts directly to your instance. No file upload step, no copy-paste, no leaving the terminal.
A handful of clean HTTP endpoints. Curl-friendly, library-free, easy to wrap from any agent runtime.
docker compose up behind your VPN. Your team's network is the trust boundary.
Re-POST to the same id → new version. History is forever. /view is always latest. Nothing gets clobbered.
Find your pergams by author, type, or title substring. The index is just another HTML page — opinionated, fast, no JS framework.
One Python file. One schema. Audit it in 10 minutes. Fork it. No vendor account, no telemetry, no surprise pricing.
Quickstart · pick your path
git clone to shareable URL in 60 seconds.Whichever path you take, you end up with the same thing: a stable URL your team will actually open.
# 1. Clone & install the skill once git clone https://github.com/diesilveira/pergam cp -r pergam/skills/post-html-grid ~/.claude/skills/ # 2. Point it at a pergam (self-hosted or public) export PERGAM_URL="http://localhost:1111" # 3. Inside any project, ask Claude: # "armá un pergam de X y publicalo" # → returns view_url, ready to share.
# 1. Clone git clone https://github.com/diesilveira/pergam cd pergam # 2. Bring up app + Postgres docker compose up -d --build # 3. Verify and open curl http://localhost:1111/healthz # → {"ok":true} open http://localhost:1111/
It's a tiny self-hosted thing, not a SaaS. Stars are how I know it's solving a real problem — and how other devs find it.
FAQ
Devs and small teams whose AI assistant generates a steady stream of HTML artifacts — PR review boards, status dashboards, evaluation reports, design specs with Mermaid — that today die in chat scrollback.
Those strip CSS, break Mermaid, mangle dark themes, and require accounts. pergam keeps the artifact exactly as the AI rendered it.
Pergams are served from a sandboxed iframe on a different origin (api.pergam.dev) with a strict CSP that blocks everything except inline CSS and Mermaid from jsDelivr. Visitors are isolated. The 72-hour TTL also limits the blast radius of any abuse.
Yes — self-host. Public service is for ephemeral sharing. Self-host gives you a Postgres-backed, versioned, immutable history with no TTL.
Nothing. It's a markdown file in this repo. The AI's API costs are separate (whatever you pay for your Claude Code / Cursor / etc).
Those need a repo and a deploy step. pergam is a single POST /pergam with a body of HTML — that's the whole contract. It's designed for the throwaway-but-shareable case in between "screenshot in Slack" and "real deploy."
Anyone with this link can view the pergam for the next 72 hours.