Use bidsmith in Claude Cowork
Claude Cowork is Anthropic’s desktop
agent for knowledge work. It runs everything inside an ephemeral Linux
virtual machine (Apple Silicon only), so it can only see folders you
mount and only reach domains you allow. With a small one-time
setup you can let Cowork author .bid files and run bidsmith live
against your account — validate, plan, even apply — through the
bidsmith plugin.
How the sandbox behaves
Three facts explain why the steps below look the way they do:
- It’s per-session. The sandbox home is wiped between sessions, so anything installed into it is gone next time. Only your mounted folders persist.
- Each command is independent.
PATHand environment don’t carry from one command to the next, so every call has to putbidsmithonPATHitself. - It’s Linux (usually
aarch64), not macOS — so your Mac’s Homebrewbidsmithcan’t run there; the sandbox needs its own Linux build.
The setup works with these facts: mount a folder that persists, cache
the Linux binary in it, and re-point PATH at it each session.
Before you begin
- An Apple Silicon Mac. Cowork’s virtual machine requires it.
- bidsmith installed and signed in on your Mac. Run
brew install chrmod/tap/bidsmith, thenbidsmith auth loginonce. That writes~/.bidsmith/credentials.toml. The sign-in must happen on your Mac — the sandbox has no browser for the Google consent screen. - The bidsmith plugin added to Cowork. Customize → Plugins → Add
marketplace → enter
chrmod/bidsmith, then install the bidsmith plugin.
Set it up
-
Mount two folders into your Cowork project. Cowork only sees what you grant it, so add both:
- your campaigns repo (the folder with your
.bidfiles), and ~/.bidsmith— the folder holdingcredentials.toml(and, after step 3, the cached Linux binary).
- your campaigns repo (the folder with your
-
Allow the domains bidsmith needs. Open Claude → Settings → Capabilities and add these to the allow list:
release-assets.githubusercontent.comcodeload.github.comoauth2.googleapis.comgoogleads.googleapis.comDomain Why bidsmith needs it release-assets.githubusercontent.com,codeload.github.comDownload the Linux binary from GitHub Releases oauth2.googleapis.comExchange your refresh token for a short-lived access token googleads.googleapis.comThe Google Ads API itself — plan,apply,queryThese are
github.comrelease-download hosts. (Cowork may blockapi.github.com, which bidsmith doesn’t need.) If the binary download is still refused, also allowgithub.com. -
Install bidsmith into the sandbox. The simplest path: just ask Cowork to “set up bidsmith in this sandbox” — the plugin downloads the matching Linux build and puts it on
PATH.To make it survive future sessions, cache the binary in your mounted
~/.bidsmith. The repo shipsscripts/cowork-bootstrap.sh: copy it once to~/.bidsmith/bin/bootstrap.sh, then have Coworksourceit at the start of each session:Terminal window source ~/.bidsmith/bin/bootstrap.sh # puts bidsmith on PATHIt downloads the binary only the first time (caching it in the mounted folder), verifies the checksum, and re-establishes
PATHon every call. Because each Cowork command runs fresh, the agent re-sources it before runningbidsmith. -
Credentials just work — if
~/.bidsmithis mounted. bidsmith reads~/.bidsmith/credentials.tomlautomatically, so once the folder is mounted there’s nothing to export and no.envto source.bidsmith auth status,query,plan, andapplyall pick it up. (Re-minting a token still has to happen on your Mac — the browser sign-in can’t run in the sandbox.) -
Verify. Ask Cowork to run
bidsmith plan --whoami— it succeeds only when the credentials resolve and the token exchange works. Then trybidsmith validate .andbidsmith plan .against your repo.
What works now
- Author / edit
.bidfiles,validate,fmt,init— fully offline, no credentials needed. planandquery— live and read-only.apply— mutates the live account. Cowork shows you the plan first; read it before you approve.
Keep it simple next time
Once it’s set up, a returning session is nearly one step:
- The two mounts and the allow list persist — set them once.
- The cached binary lives in mounted
~/.bidsmith/bin/, so later sessions skip the download; sourcingbootstrap.shjust re-pointsPATH. - Credentials are already there via the mount.
So a fresh session is really: open the project (mounts restore) → Cowork sources the bootstrap → you’re live.
Simpler alternatives
If this is still more than you want to manage, two paths skip most of it:
- GitHub Actions (GitOps) —
bidsmith initscaffolds a repo where CI runsplanon PRs andapplyon merge. Cowork only edits files and opens PRs; credentials live in GitHub secrets, nothing to mount. - A hosted bidsmith connector (planned) — would hold the Google Ads sign-in server-side, removing the mounts and the domain allow list entirely.
Troubleshooting
| Symptom | Fix |
|---|---|
bidsmith: command not found | PATH doesn’t carry between commands — re-source ~/.bidsmith/bin/bootstrap.sh (or reinstall) at the start of the call. |
| Download / network error during install | Allow the GitHub domains above (and github.com); note api.github.com may be blocked but isn’t needed. |
plan / apply can’t reach Google | Allow oauth2.googleapis.com and googleads.googleapis.com. |
| ”no credentials” or auth errors | Mount ~/.bidsmith; make sure you ran bidsmith auth login on your Mac first so credentials.toml exists. |
See also
bidsmith init— the GitHub Actions flow, the lower-setup alternative.- Connect to Google Ads — minting the credentials this page mounts.
- Manage multiple client accounts
—
bidsmith.tomlrouting if you mount more than one campaign repo.