Skip to content

CLI cheat sheet

Use payment-service/production anywhere a command asks for an environment. An immutable ID such as env_482731 works too.

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, --versionShow the installed Dopbase versiondopbase --version

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
Run the server in this terminaldopbase server start--config <FILE>, --host <HOST>, --port <PORT>, --public-url <URL>, --shutdown-grace-seconds <SECONDS>, --docs, --no-docs, --master-key-file <FILE>dopbase server start --port 9000
Start the server in the backgrounddopbase server upSame options as server startdopbase server up --docs
Stop the background serverdopbase server down--timeout <SECONDS> (default: 10)dopbase server down --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

--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> <ENVIRONMENT> --from <FILE>--from <FILE> (required)dopbase init payment-service development --from .env
Create a projectdopbase project create <NAME>No command-specific optionsdopbase project create payment-service
List projectsdopbase project listNo command-specific optionsdopbase project list
Show a projectdopbase project show <PROJECT>No command-specific optionsdopbase project show payment-service
Rename a projectdopbase project rename <PROJECT> <NEW_NAME>No command-specific optionsdopbase project rename payment-service payments
Delete a projectdopbase project delete <PROJECT>--yes skips confirmationdopbase project delete payment-service --yes
Create an environmentdopbase env create <PROJECT> <NAME>No command-specific optionsdopbase env create payment-service production
List environmentsdopbase env list [PROJECT]No command-specific optionsdopbase env list payment-service
Show an environmentdopbase env show <ENVIRONMENT>No command-specific optionsdopbase env show payment-service/production
Set the run defaultdopbase env default <ENVIRONMENT>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> <NEW_NAME>No command-specific optionsdopbase env rename payment-service/production prod
Delete an environmentdopbase env delete <ENVIRONMENT>--yes skips confirmationdopbase env delete payment-service/staging --yes

Secrets and application commands

TaskCommandCommand optionsExample
List secret keysdopbase secret list <ENVIRONMENT>No command-specific optionsdopbase secret list payment-service/production
Set a secretdopbase secret set <ENVIRONMENT> <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> <KEY>No command-specific optionsdopbase secret get payment-service/production API_KEY
Reveal a secretdopbase secret get <ENVIRONMENT> <KEY>--reveal prints the value after password confirmationdopbase secret get payment-service/production API_KEY --reveal
Delete a secretdopbase secret delete <ENVIRONMENT> <KEY>--yes skips confirmationdopbase secret delete payment-service/production API_KEY --yes
Import a dotenv filedopbase import <ENVIRONMENT> <FILE>--dry-run previews changes; --replace removes remote keys absent from the file; --yes skips confirmationdopbase import payment-service/staging .env.staging --dry-run
Export to a filedopbase export <ENVIRONMENT> --output <FILE>--output <FILE> or --stdout is required; --force overwrites an existing filedopbase export payment-service/staging --output .env.staging --force
Export to standard outputdopbase export <ENVIRONMENT> --stdout--stdout conflicts with --outputdopbase export payment-service/staging --stdout
Run with injected secretsdopbase run [ENVIRONMENT] -- <COMMAND>--token <TOKEN> overrides other credentials; 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> --name <NAME>--name <NAME> is required; --role <ROLE> defaults to runnerdopbase token create payment-service/production --name deploy --role runner
List runner tokensdopbase token list <ENVIRONMENT>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 used for first-run restore --yes skips confirmationdopbase restore backup.dop --key ./master.key --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>dopbase --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.