Skip to main content
Celesto uses an API key to identify your project and authorize SDK or CLI requests. You can save the key once for CLI commands, set it in your environment for SDK code, or pass it directly when you create a client.

Save your key for the CLI

If you use the celesto CLI, save your key one time and reuse it for every command:
celesto auth login
The command prompts for your API key and stores it in your operating system’s secure credential store: Keychain on macOS, Credential Manager on Windows, or Secret Service on Linux. Manage the saved key with:
celesto auth status
celesto auth logout
The saved key is scoped to the Celesto API URL. If you point the CLI at a different environment with --base-url or CELESTO_BASE_URL, sign in again for that URL.

API key lookup order

The CLI resolves the API key in this order:
  1. --api-key flag
  2. CELESTO_API_KEY environment variable
  3. .env file in the current directory
  4. Key saved by celesto auth login
Last modified on June 7, 2026