Skip to content

CLI Install and Setup

Last updated

View as Markdown

The DBGorilla CLI is how you set up collectors and wire AI tools into DBGorilla. Install it once, sign in once, and every other page that needs it can assume both are done.

The binary is dbgorilla. Homebrew also installs dbg as an alias for it.

Terminal window
brew install dbgorilla/tap/dbgorilla

Use the full dbgorilla/tap/dbgorilla name. Tab completion for bash, zsh and fish is set up for you.

Terminal window
go install github.com/dbgorilla/dbgorilla-cli/cmd/dbgorilla@latest

A Go install gives you dbgorilla only. If you want the shorter dbg, create the symlink yourself:

Terminal window
ln -s "$(which dbgorilla)" /usr/local/bin/dbg

Binaries are on the releases page.

File Platform
dbg-darwin-arm64 macOS, Apple silicon
dbg-darwin-amd64 macOS, Intel
dbg-linux-arm64 Linux, arm64
dbg-linux-amd64 Linux, x86-64

There is no Windows build. Rename the file you download to dbgorilla and put it on your PATH.

Every release binary carries build provenance, so you can confirm where it came from before you run it. This needs the GitHub CLI:

Terminal window
gh attestation verify dbg-darwin-arm64 \
--repo dbgorilla/dbgorilla-cli \
--signer-workflow dbgorilla/dbgorilla-cli/.github/workflows/release.yml

An exit code of 0 confirms the file was built by that repository’s release workflow. Naming the workflow matters: --repo on its own accepts anything built anywhere in the repository, and the release workflow is the only thing that should be producing these binaries.

For Go and manual installs, set up completion separately:

Terminal window
source <(dbgorilla completion zsh) # this shell only
dbgorilla completion --help # bash, zsh, fish, powershell
Terminal window
dbgorilla login

On DBGorilla SaaS that is the whole command. The CLI talks to app.dbgorilla.com unless you tell it otherwise.

The CLI picks the sign-in mode for you: it asks your deployment whether single sign-on is enabled. If it is, you get the browser device flow, where the CLI prints a code you approve in a browser. If it is not, you get a username and password prompt. Force one with --mode sso or --mode password. In password mode you can pass --account and --tenant instead of being prompted.

Check it worked:

Terminal window
dbgorilla whoami # your email and organization
dbgorilla whoami --json # the same, as JSON
Terminal window
dbgorilla doctor

It checks your API URL and where it came from, your auth token, that an MCP key exists, and then one check per detected editor. It exits 0 only if everything passed.

Checking DBGorilla setup...
[ OK ] API URL https://app.dbgorilla.com (source: default)
[ OK ] Auth + API you@example.com (org: ...)
[ OK ] MCP API key exists
[ OK ] MCP: Claude Code registered (`claude mcp list`)
[ OK ] MCP: Cursor entry present in ~/.cursor/mcp.json
[FAIL] MCP: VS Code no config at ./.vscode/mcp.json -- run: dbgorilla setup-ide --client vscode
[ OK ] MCP: Gemini CLI entry present in ~/.gemini/settings.json

Two settings persist: api-url and insecure.

Terminal window
dbgorilla config get api-url # the value, and where it came from
dbgorilla config set api-url https://dbgorilla.your-company.example
dbgorilla config unset api-url

A setting can come from five places. The first one wins:

  1. --api-url on the command line
  2. the DBGORILLA_API_URL environment variable
  3. your config file: ~/.config/dbgorilla/cli.toml, or $XDG_CONFIG_HOME/dbgorilla/cli.toml
  4. a system-wide file your IT team deploys: /Library/Application Support/dbgorilla/cli.toml on macOS, /etc/dbgorilla/cli.toml on Linux
  5. app.dbgorilla.com, the built-in default

dbgorilla config unset api-url therefore returns you to SaaS rather than leaving the CLI with nowhere to talk to.

dbgorilla config get tells you which layer won, which is the fastest way to find out why a command is talking to the wrong deployment.

Terminal window
dbgorilla upgrade

On a Homebrew install this runs brew upgrade for you. On any other install it does not update anything: it prints instructions and you run them yourself. Download the current binary from the releases page and replace the file. The CLI does not replace its own binary.

Terminal window
dbgorilla logout