CLI

DocsCLI

Simple mode on — some technical details are condensed. Switch to Dev in the nav for full API reference.

Documentation

behalf CLI

Install the BehalfID CLI, action-time hooks, advisory MCP tools, and optional Managed Profiles launch policy.

Install

The CLI ships as a self-contained binary. No Node.js required after install.

curl (macOS / Linux)
curl -fsSL https://behalfid.com/install.sh | sh
npm (global)
npm install -g @behalfid/cli

Authenticate

terminal
behalf login

Create an agent

terminal
behalf agents create "Claude Code" --provider claude-code

Add a permission

terminal
behalf permissions create agent_xxx \
  --action deploy --resource vercel.com \
  --requires-approval

Set up the advisory MCP server

terminal
behalf mcp init && behalf claude

The MCP server supplies model tools and context; the Claude Code PreToolUse hook is the separate action-time gate.

Verify from the CLI

terminal
behalf verify --agent agent_xxx --action deploy --vendor vercel.com