USING THE CLI
Auth
Authenticate with the Buster API
Authentication with Buster
The buster auth
command allows you to authenticate with the Buster API service. This command needs to be run before using other commands that interact with the Buster API, such as deploy
.
Basic Usage
When run without arguments, the command will prompt you interactively for connection details:
- The Buster API host URL (defaults to https://api.buster.so)
- Your API key
Command Options
Option | Description |
---|---|
--host | Specify the Buster API host URL |
--api-key | Provide your Buster API key |
--no-save | Don’t save credentials to disk |
--clear | Clear saved credentials |
--local | Use local Buster instance (http://localhost:3001) |
--cloud | Use cloud Buster instance (https://api.buster.so) |
Examples
Basic Authentication
This will prompt you for the necessary credentials interactively.
Authentication with Arguments
Using Local Instance
Using Cloud Instance
Clear Saved Credentials
Authentication Process
- The command checks for existing credentials in your home directory
- If found, it will prompt you to confirm overwriting them
- If credentials are provided via command line arguments, it will use them
- Otherwise, it will prompt you to enter the missing information
- It validates the credentials by making a test request to the Buster API
- Upon successful validation, it saves the credentials to disk (unless
--no-save
is specified)
Environment Variables
You can also set these environment variables instead of using the command-line options:
BUSTER_HOST
: The Buster API host URLBUSTER_API_KEY
: Your API key for the Buster service
When set, these environment variables will be used as defaults, but can be overridden by command-line options.
Credentials Storage
Your credentials are securely stored in ~/.buster/credentials.yml
. This file is used by other commands to authenticate with the Buster API.