Manage your Privy account and apps from your agent or terminal. Inspired by Cloudflare's cf CLI (Unofficial)
Docs: privy-cli.awesamarth.dev
npm install -g @awesamarth/privy-cliEverything you'd normally click through in the Privy dashboard, as one discoverable command:
privy apps list
privy apps create --account ACCOUNT_ID --name my-dev-app --secret-store env --env-output .env.local --yes
privy --app APP_ID apps config update --google-oauth true --diff # preview a login-method change
privy --app APP_ID users list --query alice@example.com
privy --app APP_ID wallets list --chain-type ethereum
privy --app APP_ID webhooks create --url https://api.example.com/privy --yes
privy --app APP_ID analytics overviewCovers apps, login methods and OAuth providers, custom JWT auth, users, wallets, policies and key quorums, webhooks, API credentials, clients and domains, integrations (WalletConnect, smart wallets, Global Wallet), dashboard members and analytics.
Discover → schema → preview/diff → execute → verify. JSON output by default, offline workflow guides, explicit mutations and OS-backed credential storage. Operations use direct HTTPS, not browser automation. Most management endpoints are undocumented dashboard APIs and can change.
Not affiliated with or endorsed by Privy. This is not Privy's agent-wallet CLI and it never signs transactions.
Install the agent skill so Claude Code, Codex, Cursor and other agents know when and how to use the CLI safely:
npx skills add awesamarth/privy-cliThen just ask: "Use the Privy CLI to create an app called my-new-test and enable Google login." Without the skill, name "Privy CLI" in your request so the agent knows to look for the installed binary. The agent handles discovery, previews and verification. You only need to step in to log in (browser CAPTCHA plus an email code typed into your own terminal).
Choose one package manager:
# npm
npm install -g @awesamarth/privy-cli
# Bun
bun install -g @awesamarth/privy-cli
# pnpm
pnpm add -g @awesamarth/privy-cli
# Yarn Classic (v1)
yarn global add @awesamarth/privy-cliYarn 2+ does not support yarn global; use npm, Bun or pnpm for a global install. Make sure your package manager's global bin directory is on PATH (pnpm setup configures it for pnpm).
privy --version
privy # welcome banner and quick-start commands
privy --help
privy cli search "google login"
privy docs read getting-startedRun bare privy in a terminal for the welcome banner and quick-start commands. Flags, subcommands and piped output do not show the banner; NO_COLOR disables its colours.
Requires Node.js 22.18+ and an unlocked OS credential store. Runtime dependencies are Commander and an OS-keyring adapter.
privy doctor
privy --profile work auth login
privy --profile work auth status --remote
privy --profile work accounts list
privy --profile work apps listauth login first attempts to renew and remotely verify an existing saved session, including from an agent's non-interactive command. Fresh login—no saved credentials, or explicit --replace—uses your browser for CAPTCHA verification and a hidden terminal prompt for the email code. Do not paste codes into chat. No debugging port is needed. auth status --remote remains read-only; inspect state, remote.authenticated and recommendedAction, not only the exit code. Expired access does not prove the saved session cannot be renewed.
Profiles separate sessions and saved app selections. project show explains effective context; project init can bind a directory to an app without storing credentials. Profile precedence is flag → environment → directory binding → default; app precedence is flag → matching directory binding → saved selection. Account-scoped operations require explicit --account.
Read privy docs read authentication for session recovery and the optional shared-session CDP import; privy docs read app-lifecycle covers context and protection.
privy cli search "enable google login"
privy schema apps config update
privy apps config update --help
privy docs read providersSearch returns up to five commands with schema/guide pointers. Schema is the installed version's syntax authority: inputs, scope, confirmations and verification behavior. No skill installation, source checkout, login or network is required for discovery.
users list, wallets list and global-wallet providers list return useful JSON summaries by default. Add --full for their previous detailed rows, or inspect one user/wallet with get. --all selects more records; --full selects more detail. Explicit wallet balance requests retain full rows. Pagination and redaction are unchanged; see privy docs read resources.
For a new development app (replace uppercase placeholders with discovered IDs):
privy --profile work apps create --account ACCOUNT_ID --name my-dev-app --secret-store env --env-output .env.local --dry-run
privy --profile work apps create --account ACCOUNT_ID --name my-dev-app --secret-store env --env-output .env.local --yes
# Use the returned app ID; creation does not select or bind it implicitly.
privy --profile work --app APP_ID apps config update --google-oauth true --diff
privy --profile work --app APP_ID apps config update --google-oauth true --yes
privy --profile work --app APP_ID project init --yes
privy project showChoose app-secret storage explicitly: env, keychain, both or none. Env destinations must be untracked/ignored inside Git; existing target variables require --overwrite-env. CLI login sessions stay in the OS vault. See credentials/secrets for server-only variables, storage choices and partial-failure recovery.
Google's built-in login toggle does not universally require own OAuth credentials. Provider-specific setup is separate. A persisted flag is not a real Google sign-in test.
privy docs # Topic index
privy docs search "uncertain write"
privy docs read recovery # Markdown content inside JSON
privy docs path # Absolute directory for a file readerGuides ship with the CLI and work offline:
- Getting started: agent workflow, input/output and consent.
- Authentication · App lifecycle/context.
- Login providers · JWT authentication · Security settings.
- Credentials/secrets · Webhooks.
- Policies/approvals · Users/wallets/exports.
- Clients/integrations/global wallets · Accounts/analytics.
- Failure recovery: partial success, uncertain writes and verification limits.
- JSON results on stdout; structured errors/progress on stderr. Exit codes: 0 success, 1 runtime/API failure, 2 usage/safety refusal, 130 cancellation. Redaction is not anonymization.
--dry-runvalidates offline.--diff, where supported, reads live state without writing. Execution needs the operation's confirmations; risk flags do not authorize extra work.- Boolean values are explicit. Arrays replace entire arrays. Sensitive API input requires piped JSON, never argv, chat or plaintext body files. Generated app API secrets can be saved directly to an explicitly chosen server env file and/or OS vault; values are never printed.
secrets runtrusts its child; child output is not redacted. - No automatic write retry or rollback. After a timeout or verification failure, inspect state before repeating an operation. Check truncation, job status and pending-review fields; acknowledgement is not completion.
- Management covers users, wallets, policies/quorums, webhooks, credentials/clients, app settings/providers, workspace membership and analytics. Use the bundled guides for each workflow's prerequisites.
- No wallet signing/transactions, private-key export, owner-approval execution, billing setup, production conversion, custody onboarding or ownership/recovery migrations. Do not enable unrelated features or contact real providers just to bypass a gate.
- Configuration verification does not prove external login, DNS ownership, webhook receipt, wallet deployment or frontend behavior. Controlled credentials/resources are needed for those checks.
- End-to-end Global Wallet walkthrough: two-app connection requests, approvals and enable/disable flows using a Privy-approved provider workspace. The management commands already exist; provider availability requires Privy account approval. No release date is committed.
Is there a CLI for the Privy dashboard?
Yes, this one. It's unofficial and community-built. privy lets you create and configure Privy apps, toggle login methods and manage users, wallets, policies, webhooks, credentials, members and analytics from the terminal.
How is this different from @privy-io/agent-wallet-cli?
They're different tools. Privy's official agent-wallet CLI gives an AI agent its own wallet to fund and transact with. This CLI manages your Privy developer account and apps, the things you'd otherwise do in the dashboard. It never signs transactions or moves funds.
Can Claude Code, Codex or Cursor set up my Privy app?
Yes. Install the CLI and the skill (npx skills add awesamarth/privy-cli), log in once yourself, then ask your agent. It discovers commands with privy cli search and privy schema, previews with --dry-run/--diff and reads back every change.
Is it safe to let an agent run it? Mutations need explicit confirmation flags, previews never write, secrets only go through stdin, and failed writes are never retried or rolled back automatically. Billing, production upgrades, signing and key export are out of scope. Still review what your agent does, especially on production apps.
How does login work?
privy auth login asks for your dashboard email, opens a local page for the CAPTCHA, then takes the email code at a hidden terminal prompt. The session is stored in your OS keychain, not in env files.
Why "inspired by Cloudflare's cf CLI"? Same idea: the whole dashboard behind one consistent, machine-readable command line with built-in search, schemas, previews and docs, so humans and agents can drive it without guessing.
Will it break? Possibly. Most of the APIs it uses are the dashboard's own undocumented endpoints, which Privy can change at any time. Please open an issue if something stops working.
Use bun install, bun run typecheck, bun run build, then bun pm pack to create a local artifact. Packing is not publishing. The package includes compiled code, the public docs/user/ guides, README, MIT license and package metadata. Local maintainer notes and research are git-ignored and excluded from the package.