Pagecast: Publish Markdown and HTML Reports to Cloudflare Pages
Pagecast: Publish Markdown and HTML Reports to Cloudflare Pages
Pagecast is a local-first publishing tool designed to turn local HTML reports, Markdown documentation, and static mini-apps into shareable Cloudflare Pages URLs. It is specifically optimized for agent-generated reports and small static web projects, providing a bridge between local development and instant public hosting.
Instant Deployment of Static Assets
Pagecast enables the rapid publication of static files from the terminal or a local admin UI. It supports three primary deployment patterns:
- Single Files: HTML or Markdown files can be published to a unique
/p/<token>/link, including any sibling assets located in the same folder. - Built Static Projects: Developers can publish the entry file of a built project (e.g., from a
distoroutfolder) after running a build command. - Entire Folders: Full directories can be deployed directly to a named Cloudflare Pages project.
To get started without a global installation, users can run npx pagecast. This launches a local admin UI at http://127.0.0.1:4173 and a local preview server at http://127.0.0.1:4174.
Edge-Enforced Password Protection
Pagecast provides a mechanism to gate published pages behind a password. This protection is enforced at the edge using a generated Cloudflare Pages Function, ensuring that the page and all associated files in a multi-file report are never served unprotected.
Users can manage password protection through the admin UI toggle or via the terminal using the following commands:
# Add password protection
npx pagecast publish "/absolute/path/report.html" --password "your-password" --json
# Remove password protection
npx pagecast publish "/absolute/path/report.html" --no-password --json
Integration with Coding Agents
Pagecast is built for modern AI-driven development workflows. It provides native skills for coding agents to publish finished artifacts upon user confirmation. Supported integrations include:
- Codex: Skills can be added by copying the provided skill directory to the
.codex/skills/folder. - Claude Code: Integration is available via the plugin marketplace (
/plugin marketplace add Amal-David/pagecast). - Generic Agents: A portable
SKILL.mdfile is provided for other agent frameworks.
Additionally, an experimental Chrome extension allows users to publish file:/// HTML reports directly to Pagecast when the local server is running.
Local Admin UI and Management
The local admin UI allows for the management of published versions, link renaming (where old links redirect to new ones), and the revocation of URLs. It also supports auto-syncing path-backed reports and the ability to edit HTML content directly within the app without modifying the original source file.
Security and Architecture
Pagecast follows a local-first security model:
- Local Access: The admin UI binds to
127.0.0.1, ensuring draft previews remain local. - Public Access: Content is only accessible via active
/p/<token>/links; revoked tokens result in a 404 error after redeployment. - Route Protection: Public routes reject directory traversal and hidden files to prevent accidental data leaks.
- Infrastructure: Pagecast uses scoped Wrangler OAuth (
account:read,user:read,pages:write) to connect to Cloudflare accounts.
Pagecast is licensed under the MIT license and requires Node.js 20+.