Configuration
The CLI stores its configuration in ~/.agent-to-bricks/config.yaml. The bricks config commands read and write this file, but you can also edit it directly.
Config file reference
Section titled “Config file reference”Here’s a complete config file with every available option:
site: url: https://your-site.com api_key: atb_a3b7c9d2e8f4...Site settings
Section titled “Site settings”| Key | Description | Example |
|---|---|---|
site.url | Your WordPress site URL, including the protocol | https://your-site.com |
site.api_key | API key from Settings > Agent to Bricks in WordPress | atb_a3b7c9d2e8f4... |
Setting values
Section titled “Setting values”Use bricks config set to update individual keys:
bricks config set site.url https://your-site.combricks config set site.api_key atb_a3b7c9d2e8f4Or run the interactive wizard to set everything at once:
bricks config initEnvironment variables
Section titled “Environment variables”You can override any config value with an environment variable. This is useful for CI pipelines, Docker containers, or keeping API keys out of the config file.
The pattern is ATB_ followed by the config key in uppercase with underscores replacing dots:
| Config key | Environment variable |
|---|---|
site.url | ATB_SITE_URL |
site.api_key | ATB_SITE_API_KEY |
Environment variables take precedence over the config file. Example:
ATB_SITE_URL=https://staging.your-site.com \ATB_SITE_API_KEY=atb_staging_key_here_here \bricks site infoThis connects to your staging site without modifying config.yaml.
Multiple site configurations
Section titled “Multiple site configurations”The config file supports a single site by default. To work with multiple sites, use environment variables to switch between them:
# ProductionATB_SITE_URL=https://your-site.com \ATB_SITE_API_KEY=atb_prod_key_here \bricks site info
# StagingATB_SITE_URL=https://staging.your-site.com \ATB_SITE_API_KEY=atb_staging_key_here \bricks site infoFor convenience, wrap these in shell aliases or a small script:
Mac / Linux — add to your .bashrc or .zshrc:
alias bricks-prod='ATB_SITE_URL=https://your-site.com ATB_SITE_API_KEY=atb_prod_key_here bricks'alias bricks-staging='ATB_SITE_URL=https://staging.your-site.com ATB_SITE_API_KEY=atb_staging_key_here bricks'Windows — add to your PowerShell profile ($PROFILE):
function bricks-prod { $env:ATB_SITE_URL='https://your-site.com'; $env:ATB_SITE_API_KEY='atb_prod_key_here'; bricks @args }function bricks-staging { $env:ATB_SITE_URL='https://staging.your-site.com'; $env:ATB_SITE_API_KEY='atb_staging_key_here'; bricks @args }Then use them like any other command:
bricks-staging site infobricks-prod site pull 1460Config file location
Section titled “Config file location”The config file lives at ~/.agent-to-bricks/config.yaml on all platforms:
| Platform | Path |
|---|---|
| Mac / Linux | ~/.agent-to-bricks/config.yaml |
| Windows | C:\Users\YourName\.agent-to-bricks\config.yaml |
The CLI creates this directory and file automatically the first time you run bricks config init or bricks config set.
Viewing current config
Section titled “Viewing current config”To see what’s currently configured:
bricks config listThis prints the active configuration with API keys partially redacted.