Skip to content

CLI overview ​

The Dopbase command-line interface starts a server, selects a remote server, manages projects and environments, and runs applications with their secrets.

Both server and client commands ship in the same dopbase executable:

bash
# Server role
dopbase server start

# Client role
dopbase client status
dopbase login
dopbase init
dopbase env create payment-service/staging
dopbase env clone payment-service/staging preview-42
dopbase import payment-service/staging .env.staging
dopbase run payment-service/development -- npm start

Fresh server start automatically enters web setup. Supplying DOPBASE_ROOT_EMAIL instead creates root with a generated password; initialized startup ignores it. Explicit server setup initializes local storage and root without starting HTTP. Set DOPBASE_ROOT_EMAIL or pass --email to generate a password without prompts. With --web, the same email prefills the browser form. init creates a project and environment through the running server. See server setup.

No hidden project or environment ​

Without configuration, the CLI connects to http://localhost:8840. Connecting to another endpoint saves only that server in the user's machine-global config. Dopbase does not write repository configuration and does not save an active project or environment.

Commands accept an environment directly. An environment reference can be an immutable env_... ID or PROJECT_REF/ENVIRONMENT_NAME, where PROJECT_REF is a project ID or name. Because each environment belongs to one project, no separate project selection is required.

Read target projects and environments for the full development, staging, and production workflow.

See environment variables for every supported DOPBASE_* setting, including sample values and precedence rules.

Typical sequence ​

  1. Run dopbase server start and complete first-run setup, or obtain another Dopbase endpoint.
  2. Use implicit localhost or select another server with dopbase client connect.
  3. Authenticate with dopbase login or a scoped runner token.
  4. Run dopbase init from a directory with a .env, or pass a target and file explicitly.
  5. Pass an environment reference to secret, import, export, or run commands.

Output and secrets ​

Commands should work in both a terminal and automation. Human-readable and structured output includes a secret value only when the user requests reveal, export, or generated-password setup. server setup --email and fresh startup with DOPBASE_ROOT_EMAIL print the new root password once; protect that output.

Errors identify the server, project, environment, and failed operation when safe. They must not include request bodies, tokens, plaintext secrets, or decrypted values.

Exit behavior ​

Client commands return a nonzero status for invalid configuration, connection failures, authentication failures, authorization failures, and rejected server operations. dopbase run returns the child process exit status after the child has started.

Open-source secrets management for developers.