Skip to content

Add Privy CLI - #11

Open
awesamarth wants to merge 1 commit into
vincentsch:mainfrom
awesamarth:add-privy-cli
Open

awesamarth wants to merge 1 commit into
vincentsch:mainfrom
awesamarth:add-privy-cli

Conversation

@awesamarth

Copy link
Copy Markdown

Adds Privy CLI to Infrastructure And Cloud, next to Firebase CLI.

Disclosure: I'm the author. It's unofficial and not affiliated with Privy; the README, docs and npm description say so.

Privy has no first-party CLI for managing accounts and apps, so this covers what you would otherwise click through in the dashboard: creating apps, login methods and OAuth providers, users, wallets, policies, webhooks, team members and analytics. It talks to the dashboard's HTTPS endpoints directly; it does not drive a browser.

Evidence:

  • Output mode: JSON by default, plus privy schema <command> and privy cli search for discovery: agents guide
  • Non-interactive mode: writes run without prompts once --yes is passed; production changes additionally need --allow-production: app lifecycle
  • Auth: dashboard email login with a browser hCaptcha and the email code typed at the terminal. The session is stored only in the OS credential store (macOS Keychain, Windows Credential Manager, Linux Secret Service), with no plaintext fallback; auth login renews a saved session without a TTY. It is a full dashboard session, not a scoped token: authentication
  • Preview: --dry-run validates offline, --diff compares against the live app before writing, and writes are read back afterwards: example
  • Errors: failures print {"error": {"code", "message", "status", "hint", "requestId"}} on stderr, with exit code 2 for usage errors and 130 for cancellation: src/cli.ts

Caveat, also in the entry: most of the endpoints it uses are undocumented dashboard APIs, so a dashboard change can break a command until the CLI is updated. It does not sign wallet transactions or export private keys.

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