Skip to content

Authentication

brdz uses API key-based authentication to securely access your resources.

Before you can authenticate, you need to create an account:

Terminal window
brdz accounts:create

You’ll be prompted to provide:

  • Email address
  • Password
  • Other account details

After creating an account, authenticate to receive an API key:

Terminal window
brdz auth:login

This command will:

  1. Prompt for your credentials
  2. Generate an API key
  3. Store the key in ~/.brdz/credentials

Your credentials are stored locally in ~/.brdz/credentials:

~/.brdz/
├── credentials # API key and hostname
└── context # Current project/app context

The credentials file contains:

  • Your API key
  • The API hostname

You can override stored credentials using environment variables:

Terminal window
# Set API key
export BRDZ_SECRET_ACCESS_KEY="your-api-key"
# Set API hostname
export BRDZ_HOSTNAME="https://api.example.com"

Environment variables take precedence over the credentials file.

For continuous integration or automated deployments:

Terminal window
# Set environment variables in your CI/CD pipeline
export BRDZ_SECRET_ACCESS_KEY="${YOUR_SECRET_KEY}"
export BRDZ_PROJECT="my-project"
export BRDZ_APP="my-app"
# Deploy without interactive prompts
brdz releases:create ./dist.zip
  1. Never commit credentials - Add ~/.brdz/ to .gitignore
  2. Use environment variables in CI/CD - Don’t hardcode API keys
  3. Rotate keys regularly - Generate new API keys periodically
  4. Restrict key permissions - Use project-specific keys when possible

If authentication fails, check:

  • Your credentials are correct
  • The API hostname is reachable
  • Your network connection is stable

If you receive an “invalid API key” error:

  1. Re-authenticate: brdz auth:login
  2. Verify environment variables aren’t overriding your credentials
  3. Check that your API key hasn’t been revoked