Authentication
brdz uses API key-based authentication to securely access your resources.
Creating an Account
Section titled “Creating an Account”Before you can authenticate, you need to create an account:
brdz accounts:createYou’ll be prompted to provide:
- Email address
- Password
- Other account details
Logging In
Section titled “Logging In”After creating an account, authenticate to receive an API key:
brdz auth:loginThis command will:
- Prompt for your credentials
- Generate an API key
- Store the key in
~/.brdz/credentials
Credentials Storage
Section titled “Credentials Storage”Your credentials are stored locally in ~/.brdz/credentials:
~/.brdz/├── credentials # API key and hostname└── context # Current project/app contextThe credentials file contains:
- Your API key
- The API hostname
Environment Variables
Section titled “Environment Variables”You can override stored credentials using environment variables:
# Set API keyexport BRDZ_SECRET_ACCESS_KEY="your-api-key"
# Set API hostnameexport BRDZ_HOSTNAME="https://api.example.com"Environment variables take precedence over the credentials file.
Using API Keys in CI/CD
Section titled “Using API Keys in CI/CD”For continuous integration or automated deployments:
# Set environment variables in your CI/CD pipelineexport BRDZ_SECRET_ACCESS_KEY="${YOUR_SECRET_KEY}"export BRDZ_PROJECT="my-project"export BRDZ_APP="my-app"
# Deploy without interactive promptsbrdz releases:create ./dist.zipSecurity Best Practices
Section titled “Security Best Practices”- Never commit credentials - Add
~/.brdz/to.gitignore - Use environment variables in CI/CD - Don’t hardcode API keys
- Rotate keys regularly - Generate new API keys periodically
- Restrict key permissions - Use project-specific keys when possible
Troubleshooting
Section titled “Troubleshooting”Authentication Failed
Section titled “Authentication Failed”If authentication fails, check:
- Your credentials are correct
- The API hostname is reachable
- Your network connection is stable
Invalid API Key
Section titled “Invalid API Key”If you receive an “invalid API key” error:
- Re-authenticate:
brdz auth:login - Verify environment variables aren’t overriding your credentials
- Check that your API key hasn’t been revoked
Related Commands
Section titled “Related Commands”accounts:create- Create a new accountauth:login- Authenticate and get an API key