Breign CLI
The breign command brings Breign to your terminal: chat with an agent, pipe a file into it, create and export agents from scripts, call any API route, and run your machine (or a server) as an execution node. Its messages are in French.
Installβ
With npm (Node.js 18 or later), on macOS, Linux (x64, arm64) and Windows (x64):
npm install -g @breign/cli
Check it works:
breign --version
Shell completion: breign completions zsh > ~/.zfunc/_breign (also bash, fish, powershell, elvish).
Sign inβ
breign login
Your browser opens Breign: sign in if needed, then click Authorize. The CLI stores its access in your system keychain and renews it on its own; after 30 days without any command, sign in again.
On a machine without a browser (SSH, server), the CLI shows a code instead. You can also ask for it directly:
breign login --device
Open the /device page of Breign on any device, enter the code and click Authorize.
For scripts and containers, use an API key instead: breign login --with-api-key < key.txt, or set BREIGN_.
Other commands: breign whoami (who you are), breign status (server, account, reachability), breign logout (revokes the access on this machine).
Server and organizationβ
By default the CLI talks to https://api.breign.eu. For another server, create a profile:
breign profile add dev https://api-dev.example.com --use
breign profile list, breign profile use <name> and -p <name> on any command switch between servers.
If you belong to several organizations, choose one: breign org list, then breign org use <slug>. --org overrides it for one command.
Chat with an agentβ
breign chat Support "How do I reset a customer's password?"
- Without a message,
breign chat Supportopens an interactive session;/newstarts a new conversation,/quitleaves. - Pipe content in:
cat requirements.md | breign chat PO. - Continue a conversation:
breign chat PO -c <conversation-id> "And ticket 3?".breign conversations list --agent POlists them;breign conversations show <id>prints one.
Tool calls show as they happen. If a tool needs your approval, the CLI tells you to approve it in Breign.
Manage agentsβ
breign agents list --search support
breign agents get Support
breign agents create --name QA --persona "A meticulous tester." --prompt-init @instructions.md
breign agents update QA --description "Tests every release"
breign agents export Support -o support.yaml
breign agents import support.yaml
breign agents delete QA
Text options accept literal text or @file. Initialization instructions need at least 50 characters. Add --json to any command for machine-readable output.
Call any API routeβ
breign api sends an authenticated request; {org} is replaced by your organization:
breign api get /organizations/{org}/agents
breign api post /organizations/{org}/projects -d '{"name":"Demo"}'
breign api patch /agents/<agent-id> -d @agent.json
See the API documentation.
Run your machine as an execution nodeβ
- Check the coding tools the node can use:
breign node runtimes. Claude Code and OpenCode are detected if installed; fx is installed on first start (macOS and Linux). - Associate the machine with your organization:
breign node associate. - Allow a folder:
breign node workspace add app ~/code/app --label "Main app". Only the alias and label are sent to Breign. - Start the node:
breign node start. It runs in the foreground; Ctrl-C stops it after the current turn. - Bind an agent, from Breign (the agent's Execution block) or from the CLI:
breign node attach <agent> -w app --runtime claude.breign node detach <agent>sends it back to the Breign server.
Useful settings, picked up without restarting:
| Command | Effect |
|---|---|
breign node slots 4 | Run up to 4 turns at once (a git repository gets one worktree per conversation). |
breign node tools set Read Edit Glob Grep | Tools Claude Code may use without asking. breign node tools reset restores the default. |
breign node model claude <model> | Model used by Claude Code (or opencode). fx always uses the agent's model. |
breign node join <group> / leave <group> | Join or leave a node group. |
breign node envs list / release <id> | Kept environments (node stopped). |
breign node status | Identity, folders, runtimes, organizations and agents. |
breign node unpair | Stop receiving tasks and forget this machine's identity. |
To run nodes on servers or Kubernetes with an API key, see Run a cluster of execution nodes.
Configurationβ
- Settings live in
~/.config/breign/config.toml(%APPDATA%\breign\config.tomlon Windows);breign config pathprints it. Credentials are in the system keychain, never in this file. - Environment variables override settings:
BREIGN_,SERVER BREIGN_,PROFILE BREIGN_,ORG BREIGN_(orAPI_ KEY BREIGN_),API_ KEY_ FILE BREIGN_,NODE_ GROUP BREIGN_,NODE_ NAME BREIGN_LOG=debug.
If something goes wrongβ
- The browser doesn't open: use
breign login --device. - "Unknown, expired or already used code" on the device page: run
breign login --deviceagain and use the new code. breign statussays the server is unreachable: check the profile's address (breign profile show) and your network.- An agent is not found: check the organization (
breign org use), or use its id. - Signed out after a while: the access expires after 30 days without any command. Run
breign login.