pergam
MIT · v0.1 · ~300 LOC of Python stdlib

Immutable parchment
for what your AI builds.

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.

  • Zero telemetry
  • Single binary
  • Immutable history

How it works

One prompt. One URL. Forever.

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.

STEP · 01

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.

STEP · 02

Skill auto-POSTs

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.

STEP · 03

Get a versioned URL

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

Built for the case where the AI makes the artifact.

Anonymous HTML hosts are fine for one-shot shares. pergam is for the workflow: your AI iterates, your team revisits, your infra stays private.

Claude Code skill, native

AI posts directly to your instance. No file upload step, no copy-paste, no leaving the terminal.

Documented API

A handful of clean HTTP endpoints. Curl-friendly, library-free, easy to wrap from any agent runtime.

Self-host in minutes

docker compose up behind your VPN. Your team's network is the trust boundary.

Versioned, immutable

Re-POST to the same id → new version. History is forever. /view is always latest. Nothing gets clobbered.

Filterable index

Find your pergams by author, type, or title substring. The index is just another HTML page — opinionated, fast, no JS framework.

Open source · MIT

One Python file. One schema. Audit it in 10 minutes. Fork it. No vendor account, no telemetry, no surprise pricing.

Quickstart · pick your path

From 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.

① Claude Code skill

primary flow
# 1. Clone & install the skill once
git clone https://github.com/diesilveira/pergam
cp -r pergam/skills/post-pergam ~/.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.

② Self-host

durable
# 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/

If pergam is the shape of what you wanted, star the repo.

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

Common questions.

Who's this for?

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.

Why not just paste into Notion / Confluence?

Those strip CSS, break Mermaid, mangle dark themes, and require accounts. pergam keeps the artifact exactly as the AI rendered it.

Is the public service safe? What about the embedded HTML?

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.

Can I keep pergams forever?

Yes — self-host. Public service is for ephemeral sharing. Self-host gives you a Postgres-backed, versioned, immutable history with no TTL.

What does the skill cost?

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).

How is it different from Vercel preview URLs or GitHub Pages?

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."