Skip to content

Commands

bohr <command> [options]
Command What it does
deploy Build and deploy this folder (a preview, or production with --prod)
login Sign in from this computer (approve it in the browser)
logout Sign out: revoke this computer’s token and forget it
whoami Show who the CLI acts as, and with which token
projects List the projects the token can reach
link Link this folder to a project (.bohr/project.json)
open Print the project’s URL and open it in the browser
Option Description
--instance <url> The bohr instance (default: $BOHR_INSTANCE_URL, the folder’s link, or https://app.bohr.io)
--json Print one JSON object with the result, for scripts and AI agents (schemas)
-h, --help Show the help
-v, --version Print the version (bohr --version)

Unknown options and extra arguments are usage errors (exit code 2).

Terminal window
bohr login [--instance <url>]

Starts a sign-in, prints the link and code, opens the browser (at a terminal) and waits until you approve it in the panel. Stores a token named “CLI on <computer>”. See Authentication.

Fails with exit code 3 when the sign-in is denied (login_denied) or the code expires after 10 minutes (login_expired).

Terminal window
bohr logout [--instance <url>]

Revokes the stored token on the instance and deletes it from credentials.json. If the instance cannot be reached, it still forgets the token and tells you to revoke it in the panel. Warns when BOHR_TOKEN is still set.

Terminal window
bohr whoami [--instance <url>] [--json]
Terminal window
$ bohr whoami
Ada Lovelace <ada@example.com> on https://app.bohr.io
Token "deploy agent" (BOHR_TOKEN): 2 selected projects, expires 2027-01-10T12:00:00.000Z
Terminal window
bohr projects [--instance <url>] [--json]

Lists the projects the token reaches:

Terminal window
$ bohr projects
ID NAME REPOSITORY HOSTED ROLE URL
p3k9x0a7qd2m my-site acme/my-site bohr owner https://my-site-acme.bohr.io
p8b2m4c6d1ef shop acme/shop own account member -

HOSTED is bohr for projects bohr hosts and own account for projects in their owner’s Cloudflare account. bohr deploy publishes both; projects in their owner’s account only for their owners (details).

Terminal window
bohr link [--project <id>] [--instance <url>] [--json]

Writes .bohr/project.json at the repository root, so bohr deploy and bohr open know the project without a GitHub remote. Without --project, it uses the project of the origin remote. The file records the instance too, when it is not the default.

{
"projectId": "p3k9x0a7qd2m"
}

Commit it if everyone working on the folder should deploy to the same project.

Terminal window
bohr open [--branch <name>] [--print] [--project <id>] [--instance <url>] [--json]

Prints the production URL (or --branch’s preview) and opens it in the browser. --print only prints it. Fails with exit code 4 (no_address) when that branch was never deployed.

Terminal window
bohr open --branch feature/new-menu --print

Set BOHR_DEBUG=1 to print the stack trace of an error on stderr.