Skip to content

CLI cheat sheet ​

<PROJECT_REF> means a project ID or name. <ENVIRONMENT_REF> means an environment ID or <PROJECT_REF>/<ENVIRONMENT_NAME>.

Global options ​

Global options work with commands throughout the CLI. A command may reject an option when it does not apply, such as --server with a local server command.

OptionWhat it doesExample
--server <URL>Use this server for one client command instead of the saved server or DOPBASE_URLdopbase --server https://dopbase.example.com project list
--data-dir <DIR>Use another directory for Dopbase state and configurationdopbase --data-dir /srv/dopbase server status
--jsonPrint machine-readable JSON where the command supports itdopbase --json project list
-h, --helpShow help for the current commanddopbase secret set --help
-v, -V, --versionShow the installed Dopbase versiondopbase -v

The built-in help command accepts the same command path. For example, dopbase help secret set shows the usage, argument descriptions, options, and examples for secret set.

Server and connection ​

TaskCommandCommand optionsExample
Initialize a local instancedopbase server setup--email <EMAIL>, --web, --config <FILE>, --master-key-file <FILE>; listener options require --webdopbase server setup --email admin@example.com
Run the server in this terminaldopbase server start--config <FILE>, --host <HOST>, --port <PORT>, --public-url <URL>, --shutdown-grace-seconds <SECONDS>, --docs, --no-docs, --no-web-ui, --master-key-file <FILE>dopbase server start --port 9000
Start the server in the backgrounddopbase server start --backgroundSame options as server start; -b is shorthand for --backgrounddopbase server start --background --docs
Restart the background serverdopbase server restart--timeout <SECONDS> (default: 10)dopbase server restart --timeout 30
Stop the background serverdopbase server stop--timeout <SECONDS> (default: 10)dopbase server stop --timeout 30
Check the local server processdopbase server statusNo command-specific optionsdopbase server status
Read background logsdopbase server logs--lines <COUNT> (default: 100), -w, --watch, --cleandopbase server logs --clean --watch
Select another serverdopbase client connect <SERVER_URL>No command-specific optionsdopbase client connect https://dopbase.example.com
Return to the local serverdopbase client connect localNo command-specific optionsdopbase client connect local
Check connection and logindopbase client statusNo command-specific optionsdopbase client status
Check connection and login (alias)dopbase statusNo command-specific optionsdopbase status
Sign indopbase login--token saves a runner token from a masked prompt or piped standard inputprintf '%s' "$RUNNER_TOKEN" | dopbase login --token
Sign outdopbase logoutNo command-specific optionsdopbase logout

Fresh server start uses web setup by default. DOPBASE_ROOT_EMAIL instead creates root with a generated password shown once; initialized startup ignores it. Explicit CLI setup remains optional: --email generates a password and supports --json; --web runs browser setup and only prefills a supplied email. With a disabled web UI, supply a root email or complete CLI setup first. Pending factory resets require explicit setup. See server setup.

--host defaults to 127.0.0.1 and --port defaults to 8840. When --host exposes the server beyond loopback, also set --public-url.

Projects and environments ​

TaskCommandCommand optionsExample
Create a project and first environmentdopbase init [PROJECT_NAME/ENVIRONMENT_NAME]No arguments scans ./.env; the explicit form requires --from <FILE|-> and supports --formatdopbase init
Create a projectdopbase project create <PROJECT_NAME>No command-specific optionsdopbase project create payment-service
List projectsdopbase project listNo command-specific optionsdopbase project list
Show a projectdopbase project show <PROJECT_REF>No command-specific optionsdopbase project show payment-service
Rename a projectdopbase project rename <PROJECT_REF> <NEW_PROJECT_NAME>No command-specific optionsdopbase project rename payment-service payments
Delete a projectdopbase project delete <PROJECT_REF>--yes skips confirmationdopbase project delete payment-service --yes
Create an environmentdopbase env create <PROJECT_REF/ENVIRONMENT_NAME>No command-specific optionsdopbase env create payment-service/production
Clone an environmentdopbase env clone <PROJECT_REF/SOURCE_ENVIRONMENT_NAME> <NEW_ENVIRONMENT_NAME>--yes skips clone confirmation but not recent authenticationdopbase env clone payment-service/local production
List environmentsdopbase env list [PROJECT_REF]No command-specific optionsdopbase env list payment-service
Show an environmentdopbase env show <ENVIRONMENT_REF>No command-specific optionsdopbase env show payment-service/production
Set the run defaultdopbase env default <ENVIRONMENT_REF>No command-specific optionsdopbase env default payment-service/development
Clear the run defaultdopbase env default --clear--cleardopbase env default --clear
Rename an environmentdopbase env rename <ENVIRONMENT_REF> <NEW_ENVIRONMENT_NAME>No command-specific optionsdopbase env rename payment-service/production prod
Delete an environmentdopbase env delete <ENVIRONMENT_REF>--yes skips confirmationdopbase env delete payment-service/staging --yes

Secrets and application commands ​

TaskCommandCommand optionsExample
Edit all secretsdopbase env edit <ENVIRONMENT_REF>--editor selects an editor; --dry-run previews without saving. Requires a terminal and password confirmationdopbase env edit payment-service/staging --editor hx
List secret keysdopbase secret list <ENVIRONMENT_REF>No command-specific optionsdopbase secret list payment-service/production
Set a secretdopbase secret set <ENVIRONMENT_REF> <KEY>--stdin reads the value from standard inputprintf '%s' "$API_KEY" | dopbase secret set payment-service/production API_KEY --stdin
Show secret metadatadopbase secret get <ENVIRONMENT_REF> <KEY>No command-specific optionsdopbase secret get payment-service/production API_KEY
Reveal a secretdopbase secret get <ENVIRONMENT_REF> <KEY>--reveal prints the value after password confirmationdopbase secret get payment-service/production API_KEY --reveal
Delete a secretdopbase secret delete <ENVIRONMENT_REF> <KEY>--yes skips confirmationdopbase secret delete payment-service/production API_KEY --yes
Import a secret filedopbase import <ENVIRONMENT_REF> <FILE|->Supports dotenv, JSON, YAML, and TOML. --format is required for stdin. --dry-run, --replace, and --yes keep their existing behaviordopbase import payment-service/staging secrets.toml --dry-run
Export to a filedopbase export <ENVIRONMENT_REF> --output <FILE>Runner tokens export their assigned environment without a prompt. --format overrides inference; --force overwrites an existing filedopbase export payment-service/staging --output secrets.yml --force
Export to standard outputdopbase export <ENVIRONMENT_REF> --stdoutDefaults to dotenv. Use --format json, --format yaml, --format toml, or export-only --format docker for another serializationdopbase export payment-service/staging --stdout --format toml
Run with injected secretsdopbase run [ENVIRONMENT_REF] -- <COMMAND>DOPBASE_TOKEN takes priority over the saved credential. Everything after -- is the child commanddopbase run payment-service/development -- npm start

Tokens, backups, and maintenance ​

TaskCommandCommand optionsExample
Create a runner tokendopbase token create <ENVIRONMENT_REF> --name <NAME>--name <NAME> is required. --role <ROLE> defaults to runner. --expires-in <DURATION> accepts never, hours, or days up to three years.dopbase token create payment-service/production --name deploy --expires-in 12h
List runner tokensdopbase token list <ENVIRONMENT_REF>No command-specific optionsdopbase token list payment-service/production
Revoke a tokendopbase token revoke <TOKEN_ID>No command-specific optionsdopbase token revoke tok_01ABCDEF
Create a backupdopbase backup [NAME]-o <FILE>, --output <FILE> downloads a local copydopbase backup pre-upgrade --output backup.dop
Restore a backupdopbase restore <FILE>-k <KEY>, --key <KEY> supplies the source master key. --setup-token <TOKEN> is required for first-run restore through automatic or explicit web setup. --yes skips confirmationdopbase restore backup.dop --key ./master.key --yes
List runtime cache metadatadopbase cache listGlobal --json prints machine-readable outputdopbase cache list --json
Clean old runtime cache entriesdopbase cache cleanDefaults to entries older than 14d. Supports --older-than <AGE>, --all, --dry-run, and --yesdopbase cache clean --older-than 30d --yes
Reset an admin password offlinedopbase admin reset-password <EMAIL>--config <FILE>, --master-key-file <FILE>dopbase admin reset-password admin@example.com --config /srv/dopbase/server.toml
Reset the local instance offlinedopbase admin factory-reset--config <FILE>, --no-backupdopbase --data-dir /srv/dopbase admin factory-reset
Check for a new releasedopbase updateNo command-specific optionsdopbase update

Run dopbase help <command> or dopbase help <command> <subcommand> for the same option descriptions in the terminal.

Open-source secrets management for developers.