Berth

Commands

Add --json to any non-interactive command for machine-readable output. Progress goes to stderr and the result to stdout, which is what scripts and agents want. berth <command> --help has more on each.

Command What it does
Setup
berth init --domain d one-time setup; safe to rerun (flags)
berth init --restore set up a new Mac from your off-Mac backups
berth doctor [--images] check everything and print fixes
berth cf:login <zone> connect another Cloudflare zone, for custom domains
berth trust-ca trust Caddy's local CA in your login keychain
berth upgrade [--check] upgrade Berth here (and, from a laptop, on the Mac)
berth uninstall [--purge] remove Berth
Apps
berth new <app> [--stack node|python|go|static] [--repo r] [--public] [--no-github] [--no-deploy] [-y] start an app: starter code, AGENTS.md, a GitHub repo, the first deploy
berth create <app> [--repo r] [--branch b] [--path p] [--private] [--no-webhook] [--no-deploy] register and deploy an app
berth deploy <app> [--ref r] [--no-cache] build and release now
berth rollback <app> [n] [--with-data] back to the previous (or nth) release; --with-data restores its databases too
berth restart | stop | start <app> lifecycle
berth releases <app> release history
berth destroy <app> [--keep-data] delete an app, its webhook and images
berth dockerfile <app> print the Dockerfile Berth would use
berth git:remote <app> [--host h] add a berth remote, for git push berth, dev:push and running commands from a laptop
berth app:set-key <app> use an SSH deploy key for this repo
berth app:set-repo <app> <repo> [--branch b] deploy from another repo or branch
berth ps:scale <app> <type>=<n>… how many of each Procfile worker to run
berth cron <app> · cron:run <app> <n> scheduled jobs from app.json; run one now
Config
berth config:set <app> K=v … [--no-restart] [--build-arg] set variables and redeploy
berth config:unset <app> K … remove variables
berth config:get <app> K print one variable
berth config:show <app> [--reveal] [--shell] list variables
berth config:import <app> <file|-> [--replace] load a .env file (- reads stdin)
Logs and status
berth logs <app> [-f] [-n N] [--since d] [--build [n]] [--release [n]] [--access] [--cron] app, build, release-command, access or scheduled-job logs
berth logs --all [-f] every app's logs
berth status [app] overview, or one app
berth events [-f] event log
Running things
berth run <app> <cmd…> one-off command in a fresh container (inside the running one, for apps with SQLite)
berth exec <app> [cmd…] command or shell in the running container
Data
berth pg:create | link | unlink | psql | backup | restore | expose | upgrade | destroy | list Postgres
berth redis:create | link | unlink | cli | backup | restore | expose | destroy | list Redis
berth sqlite:add | remove | shell | backup | restore <app> · sqlite:list an app's own SQLite database
berth storage:mount | unmount | list <app> [path] persistent folders
Hostnames and access
berth domains:add | remove | list <app> [host] [--force] custom domains
berth auth:set <app> user:pass · auth:unset <app> basic auth
berth access <app> [path] [public | signed-in | allow who... | off] [--remove] Google sign-in policy
berth auth:setup google [--host h] · auth:status · auth:group <name> [who...] · auth:sessions · auth:revoke <email> sign-in setup, groups, sessions
Dev versions and previews
berth dev:push [app] [--json] deploy the working tree to <app>-dev
berth dev:token <app> [--as email] [--revoke] · dev:db:copy · dev:reset · dev:agents · dev:off · dev:on manage dev versions
berth previews <app> · previews:on <app> [--max n] · previews:off <app> pull request previews
AI
berth ai:setup [--model m] [--cloud-only] install Ollama, download a local model, start the gateway
berth ai:key <provider> [key] [--url u] [--remove] add a cloud provider's key (or any OpenAI-compatible URL)
berth ai:alias [name] [provider/model] [--remove] name models for apps; changes apply at once
berth ai:enable <app> [--models …] [--monthly-tokens n] [--rpm n] · ai:disable <app> give or revoke an app's access
berth ai:status · ai:models · ai:pull <model> · ai:usage [app] [--month m] what's available, downloads, usage
Running the Mac
berth admin · admin:enable [--host h] [--owner email] · admin:disable the admin page for @owners
berth backup [file] · berth restore <file> archive and restore everything
berth offsite:setup · offsite:status · offsite:run · offsite:get [backup] · offsite:key · offsite:off encrypted nightly backups to S3-compatible storage
berth notify:set <url|off> notifications
berth gc clean up old images, dumps and build files
berth reboot planned reboot that comes back with nobody there
berth reload re-read ~/.berth after you've edited files by hand
berth completion zsh | bash | fish shell completions (Homebrew installs them)

Edit this page on GitHub (it's a section of the README)