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

buster auth

When run without arguments, the command will prompt you interactively for connection details:

Command Options

OptionDescription
--hostSpecify the Buster API host URL
--api-keyProvide your Buster API key
--no-saveDon’t save credentials to disk
--clearClear saved credentials
--localUse local Buster instance (http://localhost:3001)
--cloudUse cloud Buster instance (https://api.buster.so)

Examples

Basic Authentication

buster auth

This will prompt you for the necessary credentials interactively.

Authentication with Arguments

buster auth --host https://api.buster.so --api-key your_api_key_here

Using Local Instance

buster auth --local --api-key your_api_key_here

Using Cloud Instance

buster auth --cloud --api-key your_api_key_here

Clear Saved Credentials

buster auth --clear

Authentication Process

  1. The command checks for existing credentials in your home directory
  2. If found, it will prompt you to confirm overwriting them
  3. If credentials are provided via command line arguments, it will use them
  4. Otherwise, it will prompt you to enter the missing information
  5. It validates the credentials by making a test request to the Buster API
  6. 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 URL
  • BUSTER_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.