Skip to main content
The Unbound CLI lets you authenticate, configure AI coding tools, and manage your Unbound AI Gateway — all from the terminal. It handles login, tool setup, and teardown in a single command.

Installation

Requires Node.js 18+.
npm install -g unbound-cli
Verify:
unbound --version
Both unbound and unbound-cli are installed and refer to the same CLI — use whichever you prefer.

Debugging command conflicts

If unbound --version fails, prints unexpected output, or seems to invoke a different program, another tool on your system likely owns the unbound name and is taking precedence on your PATH. Compare which binary each alias resolves to:
which unbound
which unbound-cli
If unbound-cli points at the Unbound CLI but unbound points elsewhere (or to nothing), something earlier on your PATH is shadowing it. Use unbound-cli directly while you investigate, or inspect the conflicting path:
type -a unbound
ls -l "$(which unbound)"
Common causes:
  • A different package providing an unbound binary was installed before unbound-cli and lives in an earlier PATH entry (e.g. /usr/local/bin, /opt/homebrew/bin, /usr/sbin).
  • A shell alias or function defined in ~/.zshrc, ~/.bashrc, or ~/.profile is overriding the command. Check with alias unbound and type unbound.
  • A previous install left a stale symlink. Remove it or reorder your PATH so the npm global bin directory (npm bin -g) comes first.
Once which unbound and which unbound-cli resolve to the same path under your npm global install, the conflict is resolved.

Authentication

Login

Sign in via browser:
unbound login
For CI/CD or headless environments, use an API key:
unbound login --api-key <your-api-key>
If your organization uses a custom domain:
unbound login --domain custom.example.com

Verify

unbound whoami
This shows your email, organization, and role.

Logout

unbound logout

Setting Up AI Tools

The CLI can automatically configure AI coding tools to route through Unbound. Each command handles authentication, environment variables, and tool-specific configuration.
unbound setup <tool>
ToolCommand
Cursorunbound setup cursor
Claude Codeunbound setup claude-code
Gemini CLIunbound setup gemini-cli
Codexunbound setup codex
For tools like Roo Code, Cline, and Kilo Code, get your API key at gateway.getunbound.ai/connect and follow the setup instructions on each tool’s integration page. To remove Unbound configuration from a tool:
unbound setup <tool> --clear
If you are not logged in, the CLI will automatically open your browser to authenticate before proceeding with setup.
For detailed setup instructions for each tool, see the Integrations section.

Managing Your Gateway

The CLI also supports managing policies, users, groups, and connected tools from the terminal. Use --help on any command to see available options.
unbound policy list              # List policies
unbound users list               # List organization members
unbound user-groups list         # List user groups
unbound tools list               # List connected tools
unbound status                   # Check API connectivity
All list and get commands support --json for machine-readable output.

Custom Tenant Domains

If your organization runs Unbound on its own hosts — for example api.acme.com instead of api.getunbound.ai — point the CLI at your tenant’s URLs. Configure on login:
unbound login --api-key <YOUR_API_KEY> \
  --gateway-url https://api.acme.com \
  --frontend-url https://gateway.acme.com \
  --backend-url https://backend.acme.com
Or any time:
unbound config urls https://api.acme.com https://gateway.acme.com https://backend.acme.com
To change one:
unbound config set-gateway-url  https://api.acme.com
unbound config set-frontend-url https://gateway.acme.com
unbound config set-backend-url  https://backend.acme.com
View current values with unbound config show.

Defaults

URLDefault
Gatewayhttps://api.getunbound.ai
Frontendhttps://gateway.getunbound.ai
Backendhttps://backend.getunbound.ai

Integrations

See setup instructions for each AI tool

Tool Policies

Configure security guardrails and cost controls