Set up the frbit CLI
Published
Updated
After the install, frbit needs a sign-in. Linking the project folder saves typing the environment ID, and one command connects a coding agent. frbit doctor checks it all.
Sign in
frbit signs in once in the browser and keeps the credential in the credential store of the operating system. CI jobs use a personal API token instead.
frbit auth login
The command prints a URL and a code, and opens the URL in the default browser. Log in, or sign up when there is no account yet, then type the code and approve frbit CLI. The code ties the sign-in in the browser to this terminal. frbit waits up to 15 minutes; when the last browser login is older than 2 hours, the dashboard asks to log in again first.
--no-browser only prints the URL, for a machine without a browser. --json prints the URL, the code and the result as JSON lines, for coding agents.
The approval page has an Allow deletes box, unticked by default. Without it, the CLI can read and change everything, but deletes, backup restores and switching a component off fail and ask to run frbit auth login again, this time with the box ticked. A new frbit auth login ends the earlier frbit CLI login of the account, also on other machines.
The credential expires after an hour and renews itself. The connection ends one year after approval, or after 30 days without use, whichever comes first; then run frbit auth login again. It is listed under AI agents in the account menu of the dashboard, where it can be disconnected.
frbit auth status shows the stored credential and the next open setup step. frbit auth logout removes it.
Tokens in scripts and CI
Create a personal API token under API tokens in the account menu of the dashboard. FRBIT_TOKEN passes it to a single process and wins over a stored credential, which suits CI jobs and containers. frbit auth login refuses to run while it is set:
FRBIT_TOKEN=frbit-at-… frbit apps list
To store a token without an interactive prompt, pass it on standard input. Avoid putting tokens into shell history, command arguments or source control:
printf '%s' "$FRBIT_TOKEN" | frbit auth login --token-stdin
Profiles
Separate accounts are kept apart by profile. The default profile is named default, and --profile goes before the command group:
frbit --profile work auth login
frbit --profile work apps list
Link the project
Run it in the project folder:
frbit link # show the environment of this folder
frbit link en-a1b2c3 # link it, under the name of the current branch
frbit link en-d4e5f6 --label staging
frbit link shop/production
With a GitHub repository connected to the app, frbit link finds the environment that deploys the current branch and writes nothing. Otherwise it writes .fortrabbit/environments.yml at the top of the git checkout, a map of label to environment ID. Commit the file. From then on, frbit ssh, frbit db pull and most other commands work without an environment ID.
Connect a coding agent
frbit setup agent
It detects Claude Code and Codex, registers the MCP server with each and installs the latest agent skills. --agent claude-code or --agent codex, repeatable, skips the detection. --remove undoes the setup and signs the CLI out. Other agents connect as described in agent setup.
Shell completion
Homebrew sets it up. With the other install methods, run once:
frbit completion install zsh # or bash, fish, powershell
Check the setup
frbit doctor
It checks the CLI version against the latest release, the sign-in, ssh, rsync and git, the linked environment with an SSH connection, and the agent setup. Each problem comes with the fix. It exits with 1 when a check fails, and --json prints the result for agents.