Help us improve
Share bugs, ideas, or general feedback.
From brewdoc
Publishes text, markdown, JSON, or files to brewpage.app. Detects type via Bash, prompts for namespace and password using AskUserQuestion, sets TTL, returns public URL.
npx claudepluginhub kochetkov-ma/claude-brewcode --plugin brewdocHow this skill is triggered — by the user, by Claude, or both
Slash command
/brewdoc:publishhaikuThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Publish content to **brewpage.app** — free instant hosting for HTML pages, JSON documents, and files. No sign-up required.
Deploys a single HTML file to FluidDocs hosting. Handles browser sign-in and opens the live URL. Triggered by words like 'deploy', 'publish', 'ship it'.
Publishes HTML content with images, YouTube embeds, and diagrams to Telegraph via API. Auto-splits long articles and hosts media on GitHub using bash/Python scripts.
Generates original blog posts in HTML from text/URL/topic, adds images via Fal.ai or Playwright screenshots, commits to a GitHub Pages repo, and returns the public URL.
Share bugs, ideas, or general feedback.
Publish content to brewpage.app — free instant hosting for HTML pages, JSON documents, and files. No sign-up required.
Extract from $ARGUMENTS:
--ttl N → TTL in days (default: 5)content_arg| Input | Type | API |
|---|---|---|
content_arg is a path AND file exists (test -f) | FILE | POST /api/files (multipart) |
content_arg starts with { or [ | JSON | POST /api/json |
| Anything else | HTML | POST /api/html (format=markdown) |
For FILE: get file size and MIME type via Bash (file --mime-type -b).
For TEXT/JSON: count characters.
Content: <type description> · <size> · <api endpoint>
TTL: <N> days
Use AskUserQuestion:
Namespace determines the URL prefix and gallery visibility on brewpage.app.
Options:
1) public — visible in gallery (default)
2) {auto-suggested 6-8 char slug}
3) Enter custom namespace
4) Skip → use public
Reply with a number or your custom namespace (alphanumeric, 3-32 chars).
Auto-suggest: generate a meaningful short slug (3-16 chars, lowercase alphanumeric + hyphens) from content context:
api-docs, login-page, report-q2)pricing, team-intro, changelog)user-config, metrics)Resolution:
1, 4, or empty → public2 → suggested slug3 or any other string → use as-isUse AskUserQuestion:
Password protection (if set, page is hidden from gallery):
Options:
1) No password (default)
2) Random: {generated 6-char password, e.g. "kx7p2m"}
3) Enter custom password (min 4 chars)
4) Skip → no password
Reply with a number or your custom password.
Generate random password EXECUTE using Bash tool:
LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | head -c6 2>/dev/null
Resolution:
1, 4, or empty → no password2 → use generated random password3 or custom text → use as-isSECURITY: The ownerToken MUST never appear in conversation output. The bash block below handles curl, token parsing, and history saving atomically. The LLM only sees the URL.
HTML/Markdown text — EXECUTE using Bash tool:
HISTORY_FILE=".claude/brewpage-history.md"
if [ ! -f "$HISTORY_FILE" ]; then
mkdir -p "$(dirname "$HISTORY_FILE")"
cat > "$HISTORY_FILE" <<'HEADER'
# brewpage.app — Published Pages
> Owner tokens allow update/delete. Keep this file private.
> Delete: `curl -s -X DELETE "https://brewpage.app/api/{ns}/{id}" -H "X-Owner-Token: TOKEN"`
| Date | URL | Owner Token | TTL |
|------|-----|-------------|-----|
HEADER
fi
CONTENT=$(cat <<'BREWPAGE_EOF'
{content}
BREWPAGE_EOF
)
PAYLOAD=$(jq -n --arg c "$CONTENT" '{content: $c, format: "markdown"}')
RESPONSE=$(curl -s -X POST "https://brewpage.app/api/html?ns={ns}&ttl={days}" \
-H "Content-Type: application/json" \
{password_header} \
-d "$PAYLOAD")
URL=$(echo "$RESPONSE" | jq -r '.url // empty')
TOKEN=$(echo "$RESPONSE" | jq -r '.ownerToken // empty')
if [ -n "$URL" ]; then
[ -n "$TOKEN" ] && echo "| $(date '+%Y-%m-%d %H:%M') | [$URL]($URL) | \`$TOKEN\` | {ttl}d |" >> "$HISTORY_FILE"
echo "OK $URL"
else
echo "FAILED: $RESPONSE"
fi
JSON — EXECUTE using Bash tool:
HISTORY_FILE=".claude/brewpage-history.md"
if [ ! -f "$HISTORY_FILE" ]; then
mkdir -p "$(dirname "$HISTORY_FILE")"
cat > "$HISTORY_FILE" <<'HEADER'
# brewpage.app — Published Pages
> Owner tokens allow update/delete. Keep this file private.
> Delete: `curl -s -X DELETE "https://brewpage.app/api/{ns}/{id}" -H "X-Owner-Token: TOKEN"`
| Date | URL | Owner Token | TTL |
|------|-----|-------------|-----|
HEADER
fi
RESPONSE=$(curl -s -X POST "https://brewpage.app/api/json?ns={ns}&ttl={days}" \
-H "Content-Type: application/json" \
{password_header} \
-d '{original_json}')
URL=$(echo "$RESPONSE" | jq -r '.url // empty')
TOKEN=$(echo "$RESPONSE" | jq -r '.ownerToken // empty')
if [ -n "$URL" ]; then
[ -n "$TOKEN" ] && echo "| $(date '+%Y-%m-%d %H:%M') | [$URL]($URL) | \`$TOKEN\` | {ttl}d |" >> "$HISTORY_FILE"
echo "OK $URL"
else
echo "FAILED: $RESPONSE"
fi
File — EXECUTE using Bash tool:
HISTORY_FILE=".claude/brewpage-history.md"
if [ ! -f "$HISTORY_FILE" ]; then
mkdir -p "$(dirname "$HISTORY_FILE")"
cat > "$HISTORY_FILE" <<'HEADER'
# brewpage.app — Published Pages
> Owner tokens allow update/delete. Keep this file private.
> Delete: `curl -s -X DELETE "https://brewpage.app/api/{ns}/{id}" -H "X-Owner-Token: TOKEN"`
| Date | URL | Owner Token | TTL |
|------|-----|-------------|-----|
HEADER
fi
RESPONSE=$(curl -s -X POST "https://brewpage.app/api/files?ns={ns}&ttl={days}" \
{password_header} \
-F "file=@/absolute/path/to/file")
URL=$(echo "$RESPONSE" | jq -r '.url // empty')
TOKEN=$(echo "$RESPONSE" | jq -r '.ownerToken // empty')
if [ -n "$URL" ]; then
[ -n "$TOKEN" ] && echo "| $(date '+%Y-%m-%d %H:%M') | [$URL]($URL) | \`$TOKEN\` | {ttl}d |" >> "$HISTORY_FILE"
echo "OK $URL"
else
echo "FAILED: $RESPONSE"
fi
Replace {password_header} with -H "X-Password: {pass}" only when password was set; otherwise remove it entirely.
Success (bash printed OK {url}):
Published: {url from bash output}
Owner token saved to .claude/brewpage-history.md
NEVER print ownerToken in conversation. The token is only in the history file.
Error (bash printed FAILED: ...):
Publish failed.
-F "file=@...".jq -n --arg c "$CONTENT" '{content: $c, format: "markdown"}' to safely encode text content.5 days.public..claude/brewpage-history.md and use the delete command shown in that file's header.