CLI
Published
Updated
⌨️
Where ClickOps can't go.
frbit is the fortrabbit command line client. It manages apps, environments, deployments and ENV vars from a terminal, a script or a CI job, signs in through the browser or with a personal API token, and sets up the MCP server and skills for coding agents.
The CLI is a single binary named frbit and runs on most operating systems. It is a client of the public API and it authenticates with a browser sign-in or a personal API token.
Use cases
- A person works from a terminal
- A script runs unattended
- A CI pipeline
- Sets up MCP server and the skills:
frbit setup agent
See agent setup for which tool to use when.
Scope
- Deploying, restarting and reading deployment and runtime logs from a terminal or a CI job
- Reading and setting environment variables without opening the dashboard
- Pulling and pushing the database and files of the local project, and opening a shell on an environment
- Listing apps, environments, domains and teams, with
--jsonfor scripts - Creating an app or a staging environment from a set of component plans
- Wiring the MCP server and the agent skills into a coding agent
The source code, the release archives and the full command reference are in the GitHub repository.
Install
The install script is the shortest path on macOS and Linux. On a Mac with Homebrew, brew install fortrabbit/tap/frbit is the better choice, because brew upgrade keeps it current. npm suits machines that already manage tooling that way. The release archives cover everything else, Windows included.
Install script
curl -fsSL https://www.fortrabbit.com/install.sh | sh
It detects operating system and CPU architecture, downloads the matching GitHub release, verifies its SHA-256 checksum and installs frbit in ~/.local/bin. When run as root, it uses /usr/local/bin instead. The script prints the line to add when the install directory is not on PATH. A frbit installed with Homebrew or npm stays in place: the script prints how to update it and installs nothing. FRBIT_INSTALL_DIR installs anyway.
Install a specific release or choose another destination by passing an environment variable to sh:
curl -fsSL https://www.fortrabbit.com/install.sh | FRBIT_VERSION=1.0.0 sh
curl -fsSL https://www.fortrabbit.com/install.sh | FRBIT_INSTALL_DIR="$HOME/bin" sh
Homebrew
The fortrabbit tap provides a binary formula for macOS and Linux:
brew install fortrabbit/tap/frbit
Upgrade an existing installation with brew upgrade frbit. Homebrew verifies the SHA-256 checksum generated for each release.
npm
The npm package installs the native binary for the current platform as an optional dependency:
npm install --global @fortrabbit/cli
Do not install with --omit=optional; the wrapper needs its platform package.
GitHub releases
Archives, checksums and software bills of materials are available on the GitHub releases page. The stable asset names work with generic binary installers such as eget, ubi and mise.
| Platform | Asset |
|---|---|
| macOS Apple silicon | frbit_macOS_AppleSilicon.tar.gz |
| macOS Intel | frbit_macOS_Intel.tar.gz |
| Linux arm64 | frbit_linux_arm64.tar.gz |
| Linux x86-64 | frbit_linux_amd64.tar.gz |
| Windows arm64 | frbit_windows_arm64.zip |
| Windows x86-64 | frbit_windows_amd64.zip |
Confirm the installation with frbit version.
Shell completion
Homebrew installs shell completion. For the other install methods, run the command for the shell once:
frbit completion install zsh # or bash, fish, powershell
Authenticate
The CLI signs in once in the browser and keeps the credential in the operating-system credential store. Automated jobs skip that and pass a personal API token per command 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 shows that the sign-in in the browser belongs to this terminal. When the last login in the browser is older than 2 hours, the dashboard asks to log in again before approving. The CLI waits up to 15 minutes for that. --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 shows up 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 again.
Tokens in scripts and CI
Create a personal API token under API tokens in the account menu of the dashboard. FRBIT_TOKEN supplies it for a single process and takes precedence over a stored credential, which makes it the right fit for 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
Commands
Commands are grouped by resource and mirror the API. Lists accept --page, --limit, --all and repeatable --id, and --json prints the API response unchanged for use with jq.
| Group | Covers |
|---|---|
auth | login, status, logout |
apps | list, get, create, update, delete |
environments | list, get, create, update, delete, deploy, restart, variables, logs, metrics, components, php-settings, basic-auth, firewall-rules |
deployments | list, get, logs |
domains | list, get, create, dns, delete |
jobs | list, get, create, update, delete: workers and cron jobs |
backups | list, get, create, restore, download |
mysql | get, rotate-password |
link, db, files, ssh | the local project, see below |
people, teams, payment-methods | list, get; teams and payment methods also delete |
regions, plans, templates, software, php-versions, php-extensions, php-settings, node-versions, git | what can be booked, and the connected repositories |
setup, mcp, skills, doctor, uninstall | agent integration, the setup check and removal |
A few everyday examples:
frbit apps list
frbit environments variables get en-a1b2c3
frbit environments deploy en-a1b2c3
frbit deployments logs dp-a1b2c3 --follow
frbit environments logs --source access --status 5xx --follow
Every command and option of the installed version is available under --help, for example frbit apps list --help. The complete command reference is maintained next to the source code.
API responses can contain account data, environment-variable values and application log output. Treat terminal captures and CI logs as sensitive, especially around --json and deployments logs.
Delete resources
Apps, environments, domains, teams and payment methods can be deleted. Deletes need a connection approved with Allow deletes, see Authenticate. A personal API token needs the Read, write and delete permission. The CLI shows what will be lost and asks for the exact public ID before it deletes. In scripts, repeat the ID with --confirm:
frbit apps delete ap-a1b2c3 --confirm ap-a1b2c3
Deleting an app or environment erases its files and database for good. Deleting a team or payment method can also delete the apps connected to it.
Local project
frbit link ties the current folder to an environment: the one that deploys the current branch, or an entry in .fortrabbit/environments.yml. The commands below, and most others, then work without an environment ID. Where a command takes an environment, it accepts the ID, a label, or app/environment by name, such as shop/production.
frbit link en-a1b2c3 --label production
frbit db pull # the database as production.sql.gz
frbit files pull web/uploads
frbit ssh -- php artisan migrate --force
frbit db pullandfrbit db pushrunmysqldumpandmysqlon the environment over SSH, so no database password reaches the local machine.db pushdumps the current database on the environment first.frbit files pullandfrbit files pushsync a folder with rsync over SSH.--dry-runlists what would change,--deletealso removes files.frbit sshopens a shell,frbit ssh -- <command>runs one command and exits with its exit code.--printprints thesshcommand for other tools.
These commands need ssh, and files also needs rsync. They connect with your own SSH key.
MCP server setup
The CLI also wires fortrabbit into a coding agent, so the MCP server and the agent skills do not have to be registered by hand:
frbit setup agent
It detects Claude Code and Codex, registers the MCP server with each and installs the latest skills. Repeating --agent claude-code or --agent codex bypasses detection. The frbit mcp and frbit skills command groups manage either side on its own.
Check the setup
frbit doctor 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. The install script runs it as its last step.
frbit doctor
Updates
frbit version reports the installed release, its source commit and build date. Interactive sessions check GitHub for a newer stable version at most once per day. The check is silent on network errors and can be turned off:
export FRBIT_NO_UPDATE_NOTIFIER=1
Upgrading follows the install method: re-run the install script, brew upgrade frbit or npm update --global @fortrabbit/cli. Agents never see the daily notice; frbit doctor checks the version on every run.
Uninstall
frbit uninstall removes the CLI with everything it set up. All steps, older versions included: remove the agent setup.