ht-ml.app — Printing Press CLI
Prerequisites: Install the CLI
This skill drives the ht-ml-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
- Install via the Printing Press installer. It defaults binaries to
$HOME/.local/binon macOS/Linux and%LOCALAPPDATA%\Programs\PrintingPress\binon Windows:npx -y @mvanhorn/printing-press-library install ht-ml --cli-only - Verify:
ht-ml-pp-cli --version - Ensure the reported install directory is on
$PATHfor the agent/runtime that will invoke this skill.
If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer). This installs into $GOPATH/bin (default $HOME/go/bin), so add that directory to $PATH instead:
go install github.com/mvanhorn/printing-press-library/library/cloud/ht-ml/cmd/ht-ml-pp-cli@latest
If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.
ht-ml.app is deliberately accountless: you POST one HTML document, get a public URL, and a write key shown exactly once. That makes publishing frictionless and management impossible. This CLI is the missing memory layer. Every publish is captured to a local SQLite store, so you can list and audit everything you've shipped, update a site by id without ever touching its key, auto-upload referenced assets in one pass, roll back to any prior version, and export a passphrase-sealed vault of your keys for disaster recovery.
When to Use This CLI
Use this CLI whenever an agent needs to publish a single HTML document to a public URL fast (prototypes, diagrams, decks, status reports, code reviews) and then manage it over time. It is the right tool when you will publish more than once and need to find, update, version, or recover past sites, capabilities ht-ml.app's accountless API does not provide on its own.
Anti-triggers
Do not use this CLI for:
- Do not use this CLI to host multi-file apps, SPAs with build steps, or anything needing a server runtime; ht-ml.app serves one HTML document per site.
- Do not publish private or confidential content; everything is public, and a per-site password is only a shared-secret gate, not real security.
- Do not use it as a CDN for a large media library; assets must be referenced by the site's HTML to be uploadable.
Unique Capabilities
These capabilities aren't available in any other tool for this API.
Registry & recovery
list— See every site you've ever published, with health flags for orphaned sites and broken assets.Reach for this to recall or audit what you've shipped; it's the only way to enumerate sites the accountless API won't list.
ht-ml-pp-cli list --agent --select url,title,statuskeys export— Reveal a single write key, or export/import a passphrase-sealed vault of all your update_keys for disaster recovery and a second machine.Use after publishing or before switching machines; without a vault, a lost key orphans the site forever.
ht-ml-pp-cli keys export --out ht-ml-keys.vault
Asset reconciliation
assets sync— Parse a site's HTML, find every referenced-but-missing image or video, and upload them all in one pass.Pick this whenever a published page has broken images; it fixes all of them at once instead of one upload per file.
ht-ml-pp-cli assets sync <site_id> --root ./publicassets audit— Across all your sites, list the ones with publicly-visible broken or missing images.Run during a review to catch broken client-facing pages before someone else does.
ht-ml-pp-cli assets audit --missing-only --agent
Versioning & living docs
rollback— Revert a live site to any prior HTML version stored locally, with the update_key resolved for you.Use when a republish shipped bad data; it restores the last-good HTML in one command.
ht-ml-pp-cli rollback <site_id>republish— Publish a recurring document under a stable local alias: update in place if the alias exists, or create it once and bind it.Pick this for scheduled or daily publishes so the public URL never churns.
ht-ml-pp-cli republish --as status-report ./status.html
Publish safety
scan— Mechanically scan HTML for leaked secrets and PII before it becomes a public, permanent URL.Run before any publish on a person's behalf; it returns a typed exit code so it can gate a pipeline.
ht-ml-pp-cli scan ./page.html
Command Reference
sites — Inspect ht-ml.app sites
ht-ml-pp-cli sites <site_id>— Get a site's status and the assets its HTML references (no auth; public read)
Finding the right command
When you know what you want to do but not which command does it, ask the CLI directly:
ht-ml-pp-cli which "<capability in your own words>"
which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.
Recipes
Publish a deck and get just the URL
ht-ml-pp-cli publish ./deck.html --agent --select url,site_id
Publish and return only the live URL and id, ready to hand to a downstream step.
Inspect a site's referenced assets compactly
ht-ml-pp-cli sites <site_id> --agent --select status,assets.relative_path,assets.status
Use dotted --select to narrow the verbose site-plus-assets payload to just status and each asset's path and status.
Audit every site for broken images
ht-ml-pp-cli assets audit --missing-only --agent
Cross-site join that lists publicly-visible missing assets the API cannot surface in one call.
List your published sites by title
ht-ml-pp-cli list --sort title --agent --select site_id,title,url
The local registry is the only inventory of what you have shipped (the API has no list endpoint); sort by title to find a page fast.
Recover keys on a second machine
ht-ml-pp-cli keys import ht-ml-keys.vault
Import a passphrase-sealed vault so update and rollback work from another machine.
Auth Setup
ht-ml.app has no global API key. Creating and reading sites needs no credential at all. Each site mints a high-entropy update_key once at creation — the only write credential, with no recovery endpoint. This CLI captures that key into a local store at create time, so update, asset, and password commands resolve it automatically by site_id. Keep the store safe and back it up with keys export; losing an update_key with no backup orphans the site forever.
Run ht-ml-pp-cli doctor to verify setup.
Agent Mode
Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.
Pipeable — JSON on stdout, errors on stderr
Filterable —
--selectkeeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:ht-ml-pp-cli sites mock-value --agent --select id,name,statusPreviewable —
--dry-runshows the request without sendingOffline-friendly — list and audit commands use the local SQLite store when available
Non-interactive — never prompts, every input is a flag
Read-only — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests
Response envelope
Commands that read from the local store or the API wrap output in a provenance envelope:
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}
Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal AND no machine-format flag (--json, --csv, --compact, --quiet, --plain, --select) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.
Paths and state
Agents should treat the CLI's path resolver as part of the runtime contract:
Use
--home <dir>for one invocation, or setHT_ML_HOME=<dir>to relocate all four path kinds under one root.Use per-kind env vars only when a specific kind must diverge:
HT_ML_CONFIG_DIR,HT_ML_DATA_DIR,HT_ML_STATE_DIR,HT_ML_CACHE_DIR.Resolution order is per-kind env var,
--home,HT_ML_HOME, XDG (XDG_CONFIG_HOME,XDG_DATA_HOME,XDG_STATE_HOME,XDG_CACHE_HOME), then platform defaults.configcontains settings likeconfig.tomland profiles.datacontainscredentials.toml,data.db, cookies, and auth sidecars.statecontains persisted queries, jobs, andteach.log.cachecontains regenerable HTTP/cache files.Stored secrets live in
credentials.tomlunder the data dir. Existing legacyconfig.tomlsecrets are read for compatibility and leaveconfig.tomlon the first auth write.Run
ht-ml-pp-cli doctor --fail-on warnto surface path and credential-location warnings.agent-contextexposes a schema v4pathsblock for agents that need the resolved dirs.For MCP, pass relocation through the MCP host config. The MCP binary does not inherit CLI flags:
{ "mcpServers": { "ht-ml": { "command": "ht-ml-pp-mcp", "env": { "HT_ML_HOME": "/srv/ht-ml" } } } }
Fleet precedence: an inherited per-kind env var overrides an explicit --home for that kind. Use HT_ML_HOME or per-kind vars as durable fleet levers, and use --home only for a single invocation. Relocation is not reversible by unsetting env vars; move files manually before clearing HT_ML_HOME, or doctor will not find credentials left under the former root.
Agent Feedback
When you (or the agent) notice something off about this CLI, record it:
ht-ml-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
ht-ml-pp-cli feedback --stdin < notes.txt
ht-ml-pp-cli feedback list --json --limit 10
Entries are stored locally as feedback.jsonl under the resolved data dir. They are never POSTed unless HT_ML_FEEDBACK_ENDPOINT is set AND either --send is passed or HT_ML_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
Output Delivery
Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
| Sink | Effect |
|---|---|
stdout |
Default; write to stdout only |
file:<path> |
Atomically write output to <path> (tmp + rename) |
webhook:<url> |
POST the output body to the URL (application/json or application/x-ndjson when --compact) |
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
Named Profiles
A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
ht-ml-pp-cli profile save briefing --json
ht-ml-pp-cli --profile briefing sites mock-value
ht-ml-pp-cli profile list --json
ht-ml-pp-cli profile show briefing
ht-ml-pp-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (wrong arguments) |
| 3 | Resource not found |
| 5 | API error (upstream issue) |
| 7 | Rate limited (wait and retry) |
| 10 | Config error |
Argument Parsing
Parse $ARGUMENTS:
- Empty,
help, or--help→ showht-ml-pp-cli --helpoutput - Starts with
install→ ends withmcp→ MCP installation; otherwise → see Prerequisites above - Anything else → Direct Use (execute as CLI command with
--agent)
MCP Server Installation
- Install the MCP server:
go install github.com/mvanhorn/printing-press-library/library/cloud/ht-ml/cmd/ht-ml-pp-mcp@latest - Register with Claude Code:
claude mcp add ht-ml-pp-mcp -- ht-ml-pp-mcp - Verify:
claude mcp list
Direct Use
- Check if installed:
which ht-ml-pp-cliIf not found, offer to install (see Prerequisites at the top of this skill). - Match the user query to the best command from the Unique Capabilities and Command Reference above.
- Execute with the
--agentflag:ht-ml-pp-cli <command> [subcommand] [args] --agent - If ambiguous, drill into subcommand help:
ht-ml-pp-cli <command> --help.