Install the BuildCaptain CLI
Install the optional command-line tool with Homebrew so AI coding agents like Claude Code and Codex can start your allowed Jenkins builds.
Written by Loris Siegenthaler · Maker of BuildCaptainThe BuildCaptain CLI is an optional companion to the app. It lets AI coding agents — Claude Code, Codex, or any MCP client — list and start the Jenkins builds you explicitly allowed in the app. The CLI never talks to Jenkins directly: every request goes through the BuildCaptain app on the same Mac, which enforces your per-repository rules and can require your approval before anything runs.
Install with Homebrew
Open Terminal and run:
brew install inuali/tap/buildcaptain
No Homebrew yet? Get it at brew.sh. You can also download the binary from GitHub Releases and place it on your PATH yourself.
Connect your AI agent
Register the CLI as an MCP server with the agent you use:
claude mcp add buildcaptain -- buildcaptain mcp
codex mcp add buildcaptain -- buildcaptain mcp
The agent gains three tools: list_run_configurations, trigger_run, and get_run_status. Configurations restricted to a Git repository are only visible when the agent works in a matching checkout, so it only ever sees the builds you allowed for that project. Configurations marked Any repository in the app are available everywhere.
trigger_run waits for the build to finish and reports the result, so the agent usually needs a single call. If the build is still going when the wait ends, it hands back a run_id for get_run_status.
Before it works
- The BuildCaptain app must be installed. If it isn't running, the CLI starts it in the background automatically.
- Enable the gateway in the app: AI Agents → Enable local agent gateway.
- Add at least one run configuration for your repository in the same settings pane.
Try it from Terminal
Run this anywhere:
buildcaptain configs
It prints the run configurations available in the current folder: inside a Git checkout you get that repository's configurations plus any-repository ones; elsewhere only the any-repository ones. buildcaptain run <configuration> starts one and waits for the result, printing each state change as it happens; add --no-wait to get straight back to your prompt. buildcaptain wait <run-id> picks a build back up and blocks until it finishes, and buildcaptain status <run-id> checks it once. Both fall back to the most recent run when you leave the ID out.
Troubleshooting
- "BuildCaptain is not running or Agent Access is disabled." — Open the app and switch on Enable local agent gateway.
- Repository-restricted builds are missing — the CLI identifies your project by its
originremote, so make sure you are inside the right checkout and the configuration's Git remote matches. Working in a fork whoseorigindiffers from the configured repository? SetBUILDCAPTAIN_REPO=github.com/acme/widgets(the configured repository) in your shell or MCP config. - No configurations listed at all — check that the configurations are enabled in the app.
The CLI is open source (MIT): github.com/inuali/buildcaptain-cli.
BuildCaptain