Manage your Brilliant Directories website widgets using Claude Code.
- A Claude subscription (includes Claude Code)
- Claude Code installed — download at https://claude.ai/download
- Your BD API key (from BD Admin → API settings)
- Your BD site URL (e.g.
https://yoursite.brilliantdirectories.com)
You could also use this with any other MCP enabled tool, but this readme was meant for less tech-enabled users so I just went with Claude as a default.
Clone this repo or download it as a ZIP and put it somewhere on your computer (e.g. your Desktop or Documents folder).
These store your API credentials securely without hardcoding them in any file.
-
Press the Windows key, type environment variables, and click "Edit the system environment variables"
-
Click "Environment Variables..." near the bottom
-
Under "System variables", click "New..." and add each variable:
Variable name Variable value BD_API_KEYyour API key BD_SITE_URLhttps://yoursite.com -
Click OK on both dialogs to save
-
Restart Claude Code — it reads environment variables at launch
-
Open Terminal (search for it in Spotlight with
⌘ Space) -
Run this command to open your shell config file:
open -e ~/.zshenvIf TextEdit opens an empty file, that's fine — it's creating a new one.
-
Add these two lines to the file:
export BD_API_KEY="your-api-key-here" export BD_SITE_URL="https://yoursite.com" -
Save and close the file
-
In Terminal, run:
source ~/.zshenv -
Restart Claude Code so it picks up the new variables
- Open Claude Code
- Choose "Open folder..." and select the
BD Widget Managerfolder (wherever you put it in Step 1) - Claude will automatically read the project instructions and list your available widgets
That's it — Claude handles the rest from there.
After clone, enable the pre-commit hook so API keys and credentials cannot be committed by mistake:
bash scripts/setup-githooks.shRequires gitleaks on your PATH. Each commit runs gitleaks protect --staged and is blocked if secrets are found. Rules and allowlists: .gitleaks.toml.
At the start of each session, Claude will:
- List all your available widgets so you know what exists
- Walk you through any edits safely: fetch → review → confirm → push
- Remind you to clear your BD site cache after any change
You will always be asked to confirm before anything is pushed to your live site.
- Never delete widgets — this is disabled in the workflow
- Always clear your BD cache after a widget update (BD Admin → cache refresh tool)
- Your API key is stored in your system, not in any project file — it's safe to share this folder