Loading...
Loading...
Publish content to brewpage.app — text, markdown, JSON, or file. Asks namespace and password, returns public URL. Triggers: publish, share link, upload to brewpage, host page, brewpage.
npx skill4agent add kochetkov-ma/claude-brewcode brewpage-publish$ARGUMENTS--ttl N5content_arg| Input | Type | API |
|---|---|---|
| FILE | |
| JSON | |
| Anything else | HTML | |
file --mime-type -b📊 Content: <type description> · <size> · <api endpoint>
TTL: <N> daysNamespace 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).14public23Password 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.LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | head -c6 2>/dev/null1423CONTENT=$(cat <<'BREWPAGE_EOF'
{content}
BREWPAGE_EOF
)
PAYLOAD=$(jq -n --arg c "$CONTENT" '{content: $c, format: "markdown"}')
curl -s -X POST "https://brewpage.app/api/html?ns={ns}&ttl={days}" \
-H "Content-Type: application/json" \
[-H "X-Password: {pass}"] \
-d "$PAYLOAD"curl -s -X POST "https://brewpage.app/api/json?ns={ns}&ttl={days}" \
-H "Content-Type: application/json" \
[-H "X-Password: {pass}"] \
-d '{original_json}'curl -s -X POST "https://brewpage.app/api/files?ns={ns}&ttl={days}" \
[-H "X-Password: {pass}"] \
-F "file=@/absolute/path/to/file"-H "X-Password: {pass}"{
"id": "abc123xyz",
"ns": "public",
"url": "https://brewpage.app/public/abc123xyz",
"ownerToken": "...",
"ownerLink": "..."
}echo "$RESPONSE" | jq -r '.url, .ownerToken'✅ Published!
🔗 https://brewpage.app/{ns}/{id}
🔑 Owner token: {ownerToken} ← saved to .claude/brewpage-history.md❌ Publish failed.
Response: {raw_response}.claude/brewpage-history.mdHISTORY_FILE=".claude/brewpage-history.md"
if [ ! -f "$HISTORY_FILE" ]; then
cat > "$HISTORY_FILE" <<'EOF'
# brewpage.app — Published Pages
> Owner tokens are saved here for update/delete operations.
> Delete a page: `curl -s -X DELETE "https://brewpage.app/api/{ns}/{id}" -H "X-Owner-Token: {ownerToken}"`
| Date | URL | Owner Token | Password | TTL |
|------|-----|-------------|----------|-----|
EOF
fi
echo "| $(date '+%Y-%m-%d %H:%M') | [{url}]({url}) | \`{ownerToken}\` | {password_or_none} | {ttl}d |" >> "$HISTORY_FILE".claude/~/.claude/brewpage-history.md.claude/brewpage-history.md-F "file=@..."jq -n --arg c "$CONTENT" '{content: $c, format: "markdown"}'5publiccurl -X DELETE "https://brewpage.app/api/{ns}/{id}" -H "X-Owner-Token: {ownerToken}"| brewpage.app | Free instant hosting — HTML, JSON, files, KV. No sign-up. |
| brewcode | Claude Code plugin suite — infinite tasks, code review, skills, hooks. |