Skip to main content
Neon Postgres Docs
current

Search documentation

Type to search this documentation.

On this pageOverview

Neon CLI command: login

The login command authenticates you to Neon. neon auth is a legacy alias for neon login. Usage. The command launches a browser window where you authorize the Neon CLI to access your Neon account. Your...

The login command authenticates you to Neon. neon auth is a legacy alias for neon login.

Bash
neon login [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:

title="Output"
~/.config/neon/credentials.json

Instead of running neon login, you can provide an API key with the global --api-key option or the NEON_API_KEY environment variable. See Global options.

Option Description Type Default Required
--keyring Store the credential in the OS keyring. Per profile; later auth without the flag stays there. See neon profile list. boolean — No

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 login keeps using the keyring for that profile even without the flag. Along with this option, login accepts the global options.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu