Skip to content

feat: pin publish / unpublish for public share links#2

Merged
terraboops merged 1 commit into
mainfrom
feat/publish
Jun 25, 2026
Merged

feat: pin publish / unpublish for public share links#2
terraboops merged 1 commit into
mainfrom
feat/publish

Conversation

@terraboops

Copy link
Copy Markdown
Collaborator

What

Two new subcommands for the public-sharing feature (pin server #16):

  • pin publish <id-or-url> [--ttl <dur>] — mint a login-free public capability link for an existing share. Default TTL 7d, server caps at 30d. The public URL is the only thing on stdout (safe to pipe); a loud ⚠ public… warning + expiry go to stderr.
  • pin unpublish <token-or-url> — revoke a public link early. Accepts a raw token or the full public URL (lifts ?token=).

Safety

pin publish is the deliberate "safety off" action — it sends the explicit "confirm":"publish-public" sentinel the server requires, so nothing publishes by accident. Both commands reuse the human's stored credentials like share/get.

Tests

TestParsePublicRef covers bare-token, full-URL token extraction, and the no-token case. Existing suite green.

Release

Needs a v0.4.0 tag after merge to ship via goreleaser → Homebrew tap.

🤖 Generated with Claude Code

Add `pin publish <id-or-url> [--ttl <dur>]` to mint a login-free public
capability link for an existing share, and `pin unpublish <token-or-url>`
to revoke one.

Publish POSTs the explicit confirm sentinel the server requires, so this
is the deliberate "safety off" action. Default TTL 7d (server caps at
30d). The public URL is the only thing on stdout (safe to pipe); a loud
warning + expiry go to stderr. unpublish accepts a raw token or the full
public URL (lifts ?token=).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@terraboops terraboops merged commit 862e7a9 into main Jun 25, 2026
1 check passed
@terraboops terraboops deleted the feat/publish branch June 25, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant