Quickstart
Go from zero to a shareable link in under a minute.
What is pub?
pub is a publishing primitive for AI coding agents. You give it content — markdown, HTML, images, PDFs, plain text — and it gives you back a temporary, shareable URL.
The primary interface is natural language through your coding agent. You say "share this as a link" and pub handles the rest. There's also a direct HTTP API for programmatic use.
Setup with Claude Code
The fastest way to start using pub is with Claude Code. Add the pub CLAUDE.md to your project and Claude will know how to publish artifacts.
Step 1 — Add CLAUDE.md to your project
# Download the pub CLAUDE.md into your project
curl -o CLAUDE.md https://raw.githubusercontent.com/coreyrab/pubthis/main/CLAUDE.mdStep 2 — Ask Claude to publish something
I've generated a project summary and published it with pub.
Here's your link:
https://pubthis.co/a/01JABCDEFG
Expires in 7 days. Anyone with the link can view it.
Things you can say
Direct API usage
You can also call the pub API directly from any HTTP client, script, or CI pipeline.
curl -X POST https://pubthis.co/v1/publish \
-H "Content-Type: application/json" \
-d '{
"content": "# My Report\n\nHello, world!",
"content_type": "text/markdown"
}'See the API Reference for the full request/response schema.
Self-hosting
pub is open source. To run your own instance:
git clone https://github.com/coreyrab/pubthis.git
cd pub
npm install
npm run dev
# → pub listening on http://localhost:3000Set PUB_BASE_URL to your domain and update the endpoint in your CLAUDE.md to point to your instance.
Supported content types
Binary types (PDF, images) should be sent as base64-encoded strings in the content field.