Skip to content

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.

Terminal window
privy accounts list

Copy the id of the account (workspace) the app should live in.

Terminal window
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 --yes

Privy 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.

Creating an app doesn’t select it. Use the id from the output:

Terminal window
privy --app APP_ID project init --yes
privy project show

Now every privy command run in this folder targets the new app. Next, turn on login methods.

Only development apps can be deleted, and you have to type the exact name:

Terminal window
privy --app APP_ID apps delete --confirm-name my-app --yes

More 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.