Appearance
Import a .env file
Dopbase treats .env as an import and export format. It does not store the file as one opaque object.
Create a project from .env
Use init when the project does not exist yet:
bash
dopbase init payment-service development --from .envThe file is validated first. Dopbase then creates the project, environment, and individual secret records atomically. If validation or creation fails, no partially imported project remains.
init fails if the project name already exists. To add another environment to that project, create it explicitly and import into it:
bash
dopbase env create payment-service staging
dopbase import payment-service/staging .env.stagingUpdate an existing environment
Import merges by default:
bash
dopbase import payment-service/staging .env.stagingKeys in the file are created or updated. Existing remote keys that are absent from the file remain unchanged. Preview the operation without making changes:
bash
dopbase import payment-service/staging .env.staging --dry-runUse --replace only when the environment should exactly match the file. Dopbase shows which keys would be deleted and requires confirmation or --yes.
The parser accepts blank lines, comments, quoted values, and empty values. It does not expand variables or execute substitutions. Duplicate or invalid keys reject the complete import before any server state changes.
Export
Export requires an explicit file or stdout destination:
bash
dopbase export payment-service/staging --output .env.staging
dopbase export payment-service/staging --stdoutFile export refuses to overwrite an existing path without --force and uses restrictive permissions where supported. Export reveals plaintext values, so it is permission-controlled and audited.
Prefer dopbase run when an application only needs secrets in its process environment.
The same import and export workflows are available in the browser. The Admin UI parses the file locally, shows a key review and a dry-run summary before applying, and downloads exports; see import and export.
Handle values safely
Import and export output never echoes secret values as status information. Do not paste .env contents, revealed output, private service URLs, or tokens into logs, screenshots, issues, or shell history.