frbit CLI usage

Published

Updated

frbit commands are grouped by resource and mirror the public API. Each group comes with its main options and examples. `frbit help` lists all of them.

Help

frbit help                # all command groups
frbit apps list --help    # every option of one command
shell

The complete command reference is maintained next to the source code.

Common options

OptionEffect
--jsonPrints the API response unchanged, for scripts and jq
--page, --limit, --allPages through lists: --limit 50 fetches until 50, --all everything
--idRepeatable, lists only the given public IDs
--confirm <id>Confirms a delete or an overwrite without a terminal
--yesConfirms a billed change without a terminal, after the price was shown
--profile <name>Uses another stored sign-in, goes before the command group

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.

Choose the environment

Commands take the environment as an ID (en-a1b2c3), as a label from .fortrabbit/environments.yml, or by name as app/environment. An app with a single environment needs only the app name. In scripts and agents, use the ID: names can change.

frbit ssh en-a1b2c3
frbit ssh my-app/main
frbit ssh my-app            # the app has one environment
frbit ssh "Acme Shop/main"  # quotes for a name with spaces
shell

Commands that only read, plus db, files and ssh, can leave it out. They then use the environment of the project folder: the one linked with frbit link, or the one that deploys the current git branch. On a terminal without either, frbit asks. Commands that change the environment over the API, such as deploy, restart and update, always need it named.

Tab completion

With shell completion set up, Tab lists the environments of the account by name, plus the labels of the project folder:

frbit ssh <Tab>
my-app/main   my-app/staging   my-blog/main
shell

SSH

frbit ssh                                   # a shell on the linked environment
frbit ssh en-a1b2c3
frbit ssh -- php artisan migrate --force    # one command, exits with its exit code
frbit ssh --print                           # print the plain ssh command
shell

frbit connects with your own SSH key and checks the host key of the fortrabbit SSH endpoints, so the first connection from CI needs no known_hosts entry. Without a terminal, ssh never prompts.

Database

frbit db pull                               # the linked environment, to <environment>.sql.gz
frbit db pull en-a1b2c3 --output ./dumps/
frbit db push dump.sql.gz en-a1b2c3
shell

db pull runs mysqldump on the environment over SSH, so no database password reaches the local machine. It writes a gzipped dump and never touches a local database: import it yourself, or with DDEV. An existing file stays unless --force is set.

db push replaces the database with a local dump, plain or gzipped. It asks for the environment ID first, or takes --confirm <id>, and dumps the current database to /data/home/ on the environment before the import. When the import fails, the output names the backup and the command to restore it. See database up and database down.

frbit mysql get prints host, port, user and database, never the password. frbit mysql rotate-password <environment> sets a new one; the app needs a restart or a deployment to read it.

Files

frbit files pull web/uploads -e en-a1b2c3 --dry-run
frbit files pull web/uploads -e production
frbit files push web/uploads -e shop/production --confirm en-a1b2c3
shell

files pull and files push sync one path between /data/www/ on the environment and the current folder, with rsync over SSH. Without a path, the whole folder syncs. The environment goes in -e, because the argument is the path.

OptionEffect
--dry-runLists what would change, copies nothing
--deleteAlso removes files that the sending side does not have
--exclude <pattern>Repeatable, skips matching files
--confirm <id>Confirms a push, a whole-folder pull or a pull with --delete without a terminal

No sync touches .git/, .fortrabbit/, .ddev/, .env files, or the dumps and backups frbit saved. See rsync for plain rsync with other options.

Apps

frbit apps list
frbit apps get ap-a1b2c3
frbit apps create --name acme-shop --region eu-w1a --software laravel
frbit apps update ap-a1b2c3 --name renamed-shop
shell

apps create creates the app with its first environment. Without --preset, it books the smallest component preset of the software template; --component php=lg changes single components on top. --repository acme/shop --branch main --deploy connects GitHub and starts the first deployment.

A billed create prints the monthly price and asks first. --dry-run only prints the price, --yes skips the question in scripts. Trial apps without a payment method are created without a question.

Environments

frbit environments list
frbit environments get en-a1b2c3
frbit environments create --app ap-a1b2c3 --name staging --source-environment en-a1b2c3
frbit environments update en-a1b2c3 --branch develop --root-path public
frbit environments deploy en-a1b2c3
frbit environments restart en-a1b2c3
shell

--source-environment copies the component plans of another environment, --preset picks a preset instead. update changes the name, the branch, the build commands, the deployment strategy, exclude patterns and the PHP version.

Variables

frbit environments variables get en-a1b2c3               # values masked
frbit environments variables get en-a1b2c3 --reveal
frbit environments variables update en-a1b2c3 --set APP_ENV=production --delete OLD_FLAG
shell

Values on the command line can stay in the shell history. For secrets, pass the request as JSON with --file - on standard input.

Logs and metrics

frbit environments logs                                   # the linked environment, PHP errors
frbit environments logs en-a1b2c3 --source access --status 5xx --since 1h
frbit environments logs --follow
frbit environments metrics en-a1b2c3
frbit environments metrics en-a1b2c3 --metric php-requests --range 7d
shell

--source is php, apache, access or jobs. --status and --method filter the access log. metrics without --metric prints usage and limits per component and the last 24 hours.

Settings and components

frbit environments php-settings update en-a1b2c3 --set max_execution_time=120 --extension apcu=on
frbit environments basic-auth update en-a1b2c3 --enabled --username preview --password-stdin
frbit environments firewall-rules create en-a1b2c3 --description "Metrics exporter" --port 8080-8090
frbit environments components update en-a1b2c3 --component php=md
shell

Each group also has get or list. A component change shows the old and new monthly price and asks first.

Deployments

frbit deployments list
frbit deployments list -e production
frbit deployments get dp-a1b2c3
frbit deployments logs dp-a1b2c3 --follow
shell

list shows the newest 30 first, -e narrows it to one environment. logs --follow prints new lines until the deployment ends.

Domains

frbit domains list
frbit domains create en-a1b2c3 www.example.com --main
frbit domains create production acme-shop --cloud
frbit domains dns do-a1b2c3 --refresh
shell

create prints the DNS record to set at the DNS provider. A bare domain like example.com also creates www.example.com. With --cloud, the name is a label for a fortrabbit cloud domain, which needs no DNS record.

Jobs

frbit jobs list en-a1b2c3
frbit jobs create en-a1b2c3 --name queue --type worker --command "php artisan queue:work"
frbit jobs create en-a1b2c3 --name nightly --type cron --command "php artisan schedule:run" --interval day --max-runtime 3600
frbit jobs update jo-a1b2c3 --inactive
shell

A worker runs all the time, a cron job on a schedule. A cron job needs --interval and --max-runtime; --interval custom takes a cron --expression. The command starts with php or bash .

Backups

frbit backups list en-a1b2c3
frbit backups create en-a1b2c3
frbit backups download ba-a1b2c3 --type database --output ./backups/
frbit backups restore ba-a1b2c3 --confirm en-a1b2c3
shell

download saves the files or the database of a backup. restore overwrites the live database and files of the environment and cannot be undone.

Delete resources

frbit apps delete ap-a1b2c3 --confirm ap-a1b2c3
shell

Apps, environments, domains, jobs, teams and payment methods can be deleted. Deletes need a sign-in 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, or takes it with --confirm. 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.

A declined confirmation prints Aborted. and exits with 1, so a script can test the exit code.

Account and catalog

frbit people list
frbit teams list
frbit payment-methods list
frbit regions list
frbit plans list --component php --region eu-w1a
frbit component-presets list --group web-app
frbit templates list
frbit php-versions list
frbit git repositories
frbit git branches acme/site
shell

The catalog lists show the values apps create and environments create accept, so scripts and agents do not have to guess them.

Agent integration

frbit setup agent --remove
frbit mcp install --agent codex
frbit skills install --project
frbit skills update
shell

setup agent is on the setup page. mcp and skills manage either side on its own. skills install --project writes the skills into the current project, for Claude Code, Codex and GitHub Copilot. See agent skills and MCP server.

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗