BHARATROUTER CODE
Code with a governed agent on GLM — in one command.
brcode is a Codex-/Claude-Code-style coding agent that runs on GLM
through BharatRouter. One br- key; the GLM provider key stays
BYOK on the platform. Bundles the open-source OpenCode engine.
Install
Homebrew (macOS / Linux):
brew install bharatrouter/tap/brcode Or one line (no Homebrew):
curl -fsSL https://bharatrouter.com/install/brcode.sh | bash Get coding
brcode login # sign in — zero-paste browser login
brcode init # engine + your org profile (model, MCP connectors, rules)
brcode # start the agent
A teammate is coding in two commands — brcode login && brcode init — and
inherits your org's default model, MCP connectors, and rules. Repo-local AGENTS.md
still travels with git clone, exactly like Codex.
What you get
- One-command handover — model + MCP connectors + rules served per-org (
/v1/me/profile), pulled oninit. - Zero-paste login — browser loopback OAuth; the key wires into your shell.
- Hooks (Claude-Code-style) —
PreToolUserules can block a tool;PostToolUseruns after (audit, auto-format). Edit~/.config/opencode/hooks.json. - In-agent commands —
/login,/doctor,/brprofile. - Org spend & audit —
brcode usageshows requests/tokens/₹ spend; every call is metered, budgeted, and audited on your key. - Governed & India-routed — one key, spend caps, data residency — around the coding agent.
Not affiliated with OpenAI ("Codex") or Anthropic ("Claude Code" / "Claude"). Built on OpenCode (MIT). See the API reference.