Create a Privy app from the command line
Creating a Privy app from the terminal takes two commands: find your account, then create the app.
privy accounts listCopy the id of the account (workspace) the app should live in.
Preview, then create
Section titled “Preview, then create”privy apps create --account ACCOUNT_ID --name my-app \ --secret-store env --env-output .env.local --dry-run
privy apps create --account ACCOUNT_ID --name my-app \ --secret-store env --env-output .env.local --yesPrivy generates an app secret when the app is created, and the CLI makes you choose where it goes:
--secret-store |
Where the secret goes |
|---|---|
env |
A server env file (--env-output), as PRIVY_APP_SECRET unless you set --env-key |
keychain |
Your OS keychain, for use with other CLI commands |
both |
Both of the above |
none |
Nowhere. You’ll need to create a new API key later |
The env file must be git-ignored or untracked, and an existing variable is only replaced with --overwrite-env. The secret is never printed.
Point your project at it
Section titled “Point your project at it”Creating an app doesn’t select it. Use the id from the output:
privy --app APP_ID project init --yesprivy project showNow every privy command run in this folder targets the new app. Next, turn on login methods.
Deleting a test app
Section titled “Deleting a test app”Only development apps can be deleted, and you have to type the exact name:
privy --app APP_ID apps delete --confirm-name my-app --yesMore in Apps and project context and the apps create reference.
Privy CLI is an unofficial, community project by Samarth Saxena. Not affiliated with or endorsed by Privy. The Privy name and wordmark belong to Privy. It uses undocumented dashboard APIs that can change.