The auth command authenticates you to Neon. neon login is an alias for neon auth.
Usage
neon auth [options]The command launches a browser window where you authorize the Neon CLI to access your Neon account. Your credentials are then saved locally to credentials.json:
/home/<home>/.config/neonctl/credentials.jsonnote
If you use Neon through the Vercel-Managed Integration, authenticate with a Neon API key instead (see below). The neon auth command requires an account registered through Neon rather than Vercel.
Instead of running neon auth, you can provide an API key with the global --api-key option or the NEON_API_KEY environment variable. See Global options.
info
The Neon CLI resolves authentication in this order:
- The
--api-keyoption, if provided. - The
NEON_API_KEYenvironment variable, if set. - The
credentials.jsonfile created byneon auth. - If none are found, the CLI starts the
neon authweb authentication flow.
Options
Pass --keyring to store the credential in your operating system's keyring instead of the credentials.json file. The choice is saved per profile, so once set, neon auth keeps using the keyring for that profile even without the flag. Along with this option, auth accepts the global options.








