Skip to content

Conversation

@ascorbic
Copy link
Owner

Summary

Adds a new pds identity command that handles the PLC directory update during migration from another PDS (like bsky.social). This streamlines the migration flow to:

  1. pds migrate – import your data
  2. pds identity – update your DID to point to Cirrus
  3. pds activate – go live

What it does

  • Requests a PLC operation signature from your source PDS (triggers email confirmation)
  • After you enter the token, signs the operation with your new Cirrus signing key
  • Submits the signed operation to plc.directory
  • Verifies the DID document was updated correctly

Architecture

  • plc-client.ts – modular PLC operations using @atcute/client
    • SourcePdsPlcClient: handles token requests and operation signing against source PDS
    • PlcDirectoryClient: fetches documents and submits operations to plc.directory
  • identity.ts – guided CLI flow with clear prompts and error handling
  • Updates migrate.ts to show pds identity in the "next steps" output

Tests

16 tests covering:

  • Token request and signing flows
  • Error handling (expired tokens, network failures, PLC rejection)
  • Client configuration and auth headers

Test plan

  • Run tests: pnpm test
  • Manual test with actual migration (can use a test account)
  • Verify error messages are helpful when things go wrong

🤖 Generated with Claude Code

New command streamlines migration from bsky.social (or any PDS) by
handling the PLC directory update:

- `plc-client.ts`: modular PLC operations using @atcute/client
  - SourcePdsPlcClient: request token, sign operations
  - PlcDirectoryClient: fetch docs, submit operations
- `identity.ts`: guided CLI flow with email token verification
- Updates migrate.ts to show the new command in next steps
- 16 tests covering client operations and error handling

Migration flow is now: migrate → identity → activate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 10, 2026

Open in StackBlitz

npm i https://pkg.pr.new/create-pds@91
npm i https://pkg.pr.new/@getcirrus/oauth-provider@91
npm i https://pkg.pr.new/@getcirrus/pds@91

commit: b34d509

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 10, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
atproto-pds b34d509 Jan 11 2026, 12:42 PM

ascorbic and others added 3 commits January 11, 2026 12:19
- Mark account migration as "tested and verified" in root README
- Add passkey authentication to feature list
- Update packages/pds README from "Experimental" to "Beta" status
- Document `pds identity` command in CLI reference
- Update migration wizard plan to completed status (11 Jan 2026)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add steps 1-5 with detailed explanations for each command
- Include "Full command sequence" section for quick reference
- Update template README with same migration flow
- Add identity, status, and passkey commands to CLI table
- Update template from "Experimental" to "Beta" status

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pds init already prompts to deploy to Cloudflare at the end of the flow,
so showing a separate `pds init --production` step was misleading.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ascorbic ascorbic merged commit 886785a into main Jan 11, 2026
4 checks passed
@ascorbic ascorbic deleted the pds-identity-command branch January 11, 2026 12:29
@mixie-bot mixie-bot bot mentioned this pull request Jan 11, 2026
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.

2 participants