Configuration Files
The brdz CLI stores configuration in your home directory under ~/.brdz/.
Configuration Directory
Section titled “Configuration Directory”~/.brdz/├── credentials # API authentication└── context # Current project/appLocation
Section titled “Location”- Linux/macOS:
~/.brdz/ - Windows:
%USERPROFILE%\.brdz\
credentials File
Section titled “credentials File”Stores authentication information and API hostname.
Location: ~/.brdz/credentials
Created by: brdz auth:login
Format:
api_key=your-api-key-herehostname=http://localhost:8001Fields
Section titled “Fields”api_key
Section titled “api_key”Your API authentication key.
- Generated during
brdz auth:login - Required for all API operations
- Can be overridden by
BRDZ_SECRET_ACCESS_KEY
hostname
Section titled “hostname”The API server URL.
- Default:
http://localhost:8001 - Can point to custom or production servers
- Can be overridden by
BRDZ_HOSTNAME
Example
Section titled “Example”api_key=brdz_abc123xyz789def456hostname=https://api.brdz.iocontext File
Section titled “context File”Stores your current working project and app.
Location: ~/.brdz/context
Created by: brdz ctx:use
Format:
project=my-projectapp=my-appFields
Section titled “Fields”project
Section titled “project”The currently selected project slug.
- Set by
brdz ctx:use - Used by project-aware commands
- Can be overridden by
BRDZ_PROJECT
The currently selected app name.
- Set by
brdz ctx:use - Used by app-aware commands
- Can be overridden by
BRDZ_APP
Example
Section titled “Example”project=productionapp=web-frontendFile Permissions
Section titled “File Permissions”Configuration files should have restricted permissions:
# Recommended permissionschmod 600 ~/.brdz/credentialschmod 600 ~/.brdz/contextThis ensures only your user can read the files.
Managing Configuration
Section titled “Managing Configuration”View Current Configuration
Section titled “View Current Configuration”# View credentials (be careful with output)cat ~/.brdz/credentials
# View contextcat ~/.brdz/context
# Or use the CLIbrdz ctx:getEdit Configuration
Section titled “Edit Configuration”# Edit credentialsnano ~/.brdz/credentials
# Edit contextnano ~/.brdz/contextReset Configuration
Section titled “Reset Configuration”# Delete and re-authenticaterm ~/.brdz/credentialsbrdz auth:login
# Reset contextrm ~/.brdz/contextbrdz ctx:useBackup Configuration
Section titled “Backup Configuration”# Backup your configurationcp -r ~/.brdz ~/.brdz.backup
# Restore from backupcp -r ~/.brdz.backup ~/.brdzMultiple Profiles
Section titled “Multiple Profiles”For managing multiple accounts or environments, you can use shell aliases:
# In ~/.bashrc or ~/.zshrc
# Production profilealias brdz-prod='BRDZ_SECRET_ACCESS_KEY=prod-key BRDZ_HOSTNAME=https://api.brdz.io brdz'
# Staging profilealias brdz-staging='BRDZ_SECRET_ACCESS_KEY=staging-key BRDZ_HOSTNAME=https://staging-api.brdz.io brdz'
# Local developmentalias brdz-local='BRDZ_SECRET_ACCESS_KEY=local-key BRDZ_HOSTNAME=http://localhost:8001 brdz'Usage:
brdz-prod projects:listbrdz-staging releases:create ./dist.zipbrdz-local apps:listConfiguration Precedence
Section titled “Configuration Precedence”Configuration values are resolved in this order:
- Default values (hardcoded defaults)
- Configuration files (
~/.brdz/credentials,~/.brdz/context) - Environment variables (
BRDZ_*variables)
Environment variables always take precedence over files.
Security Considerations
Section titled “Security Considerations”1. Protect Configuration Files
Section titled “1. Protect Configuration Files”# Set restrictive permissionschmod 600 ~/.brdz/credentialschmod 600 ~/.brdz/context
# Verify permissionsls -la ~/.brdz/2. Never Commit Configuration
Section titled “2. Never Commit Configuration”Add to .gitignore:
.brdz/3. Rotate API Keys
Section titled “3. Rotate API Keys”# Generate new keybrdz auth:login
# This updates ~/.brdz/credentials automatically4. Use Environment Variables in Shared Environments
Section titled “4. Use Environment Variables in Shared Environments”On shared systems, prefer environment variables over files:
export BRDZ_SECRET_ACCESS_KEY="your-key"export BRDZ_HOSTNAME="https://api.brdz.io"5. Clear Context When Done
Section titled “5. Clear Context When Done”# Clear sensitive contextrm ~/.brdz/context
# Or set to non-sensitive defaultsbrdz ctx:use # Select test projectTroubleshooting
Section titled “Troubleshooting””No credentials found” Error
Section titled “”No credentials found” Error”If you see this error:
- Check file exists:
ls ~/.brdz/credentials - Verify permissions:
ls -la ~/.brdz/ - Re-authenticate:
brdz auth:login - Check environment variables:
env | grep BRDZ
”No project in context” Error
Section titled “”No project in context” Error”If you see this error:
- Check file exists:
ls ~/.brdz/context - View contents:
cat ~/.brdz/context - Set context:
brdz ctx:use - Or use environment variable:
export BRDZ_PROJECT=my-project
Permission Denied
Section titled “Permission Denied”If you can’t read/write configuration:
- Check ownership:
ls -la ~/.brdz/ - Fix ownership:
sudo chown -R $USER ~/.brdz/ - Fix permissions:
chmod -R 600 ~/.brdz/*
Corrupted Configuration
Section titled “Corrupted Configuration”If configuration is corrupted:
# Backup current configmv ~/.brdz ~/.brdz.corrupted
# Create fresh directorymkdir -p ~/.brdz
# Re-authenticatebrdz auth:login
# Reset contextbrdz ctx:useMigration and Portability
Section titled “Migration and Portability”Export Configuration
Section titled “Export Configuration”# Create portable backuptar -czf brdz-config-backup.tar.gz -C ~/ .brdz/
# Copy to another machinescp brdz-config-backup.tar.gz user@remote:~/Import Configuration
Section titled “Import Configuration”# Extract on new machinetar -xzf brdz-config-backup.tar.gz -C ~/
# Verifybrdz ctx:getShare Team Configuration
Section titled “Share Team Configuration”For teams sharing access (only share context, not credentials):
# Export context onlycat ~/.brdz/context > team-context.txt
# Import contextcat team-context.txt > ~/.brdz/context
# Each team member uses their own credentialsbrdz auth:login