Brutor CLI
brutor is a small command-line tool for developers working against a Brutor gateway. Log in once — the session token lands in your OS keychain, never a dotfile — then discover the models and MCP servers your resource groups can use and wire your local AI tools (Claude Code, Cursor, an SDK script) to the governed gateway without hand-copying URLs.
It talks only to the Core Proxy’s end-user Portal API (/v1/portal/*), the same surface the User Portal uses. It changes nothing on the gateway — it’s a client, not an admin tool.
Install
Section titled “Install”cargo install --path brutor-cli # builds the `brutor` binarybrutor --helpLog in
Section titled “Log in”brutor login prompts for the gateway URL, tenant, username, and password. Accounts with TOTP two-factor are prompted for the code. The resulting portal JWT is stored in the OS keychain (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux); only the non-secret connection settings go to ~/.config/brutor/config.json.
brutor login# Gateway URL [https://gateway.acme.com]:# Tenant ID [default]:# Username [ada]:# Password: ********# Logged in to https://gateway.acme.com (tenant default) as ada — session stored in the OS keychain.
brutor whoamiHeadless machines, containers and CI
Section titled “Headless machines, containers and CI”The keychain needs a desktop session — on Linux specifically, a running Secret Service (GNOME Keyring / KWallet). A headless server or a bare container has none, so the CLI falls back to a 0600 file next to the config and prints a note saying it did. Nothing silently downgrades.
Two environment variables cover the fully non-interactive case:
| Variable | Effect |
|---|---|
BRUTOR_TOKEN |
A portal JWT to use directly. Takes precedence over any stored session — no keychain, no file. |
BRUTOR_CONFIG_DIR |
Relocates all CLI state (default ~/.config/brutor). Useful for containers and per-job CI isolation. |
export BRUTOR_CONFIG_DIR=/var/lib/brutorexport BRUTOR_TOKEN="$(vault read -field=token secret/brutor/ci)"brutor models --jsonResolution order for a session is BRUTOR_TOKEN → OS keychain → fallback file.
Discover models
Section titled “Discover models”brutor models lists the models your groups can use — the same access policy the portal and API keys enforce. --snippets prints ready-to-paste client configuration.
brutor models# MODEL PROVIDER MODES# OpenAI GPT-5.5 openai responses# OpenAI GPT-5.2 Auto-Routing openai chat# ...
brutor models --snippetsThe snippets cover both endpoint families the gateway serves:
# OpenAI-compatible clients (SDKs, LangChain, LiteLLM, Open WebUI …)export OPENAI_BASE_URL=https://gateway.acme.com/v1/proxy/llmexport OPENAI_API_KEY=<your Brutor API key>
# Anthropic-native clients (Claude Code, Anthropic SDK)export ANTHROPIC_BASE_URL=https://gateway.acme.comexport ANTHROPIC_AUTH_TOKEN=<your Brutor API key>See Coding agents through the gateway for the full client story.
Discover and connect MCP servers
Section titled “Discover and connect MCP servers”brutor mcp search lists the governed MCP servers available to you; brutor mcp connect <name> prints the exact command to wire one into a client.
brutor mcp search github# SERVER DESCRIPTION# GitHub repos, issues, pull requests
brutor mcp connect github# GitHub — governed MCP endpoint# https://gateway.acme.com/v1/proxy/mcp/mcp-system-github-default## # Claude Code# claude mcp add --transport http github \# https://gateway.acme.com/v1/proxy/mcp/mcp-system-github-default \# --header "Authorization: Bearer <your Brutor API key>"## # Generic MCP client config (JSON)# {"mcpServers": {"github": {"type": "http", "url": "…", "headers": {…}}}}Every tool call through that endpoint is governed — guardrails, per-tool limits, approvals, and audit — exactly like any other MCP traffic. See Use MCP tools through the gateway.
Install a skill into a local agent
Section titled “Install a skill into a local agent”Agent Skills are normally consumed server-side via progressive disclosure over MCP. For skills an admin has marked exportable, brutor skills downloads the bundle and unpacks it into a local coding agent’s skills directory.
brutor skills search # skills your groups may exportbrutor skills install pr-review # → ~/.claude/skills/pr-review/brutor skills update # re-install tracked skills that changedinstall writes SKILL.md, scripts/, references/, and assets/ into ~/.claude/skills/<name>/ (override with --dir). Only skills with local export enabled and accessible to your resource groups are listed or downloadable; every export is audited server-side. See Agent Skills → Local export.
One-step setup
Section titled “One-step setup”brutor setup detects the AI tools installed on your machine and prints the wiring for each, so a fresh laptop is pointed at the governed gateway in one command.
brutor setup# Detected local AI tooling:# ✓ Claude Code# ✓ Cursor# ✓ VS Code# Point them at the governed gateway:# export OPENAI_BASE_URL=…# export ANTHROPIC_BASE_URL=…# MCP: run `brutor mcp search`, then `brutor mcp connect <name>`.Command reference
Section titled “Command reference”| Command | What it does |
|---|---|
brutor login |
Authenticate; store the session in the OS keychain. --password-stdin for CI. |
brutor logout |
Remove the stored session. |
brutor whoami |
Show the logged-in identity and gateway. |
brutor models [--snippets] [--json] |
List usable models; optionally print client config. |
brutor mcp search [query] [--json] |
List/search governed MCP servers. |
brutor mcp connect <name> |
Print the connect command/config for one server. |
brutor skills search [query] |
List skills your groups may export. |
brutor skills install <name> [--dir] |
Download + unpack a skill into a local agent. |
brutor skills update |
Re-install tracked skills with a newer version. |
brutor setup |
Detect local AI tools and print gateway wiring. |

