Skip to content

About this page

On this page

Overview ​

There are four ways to configure dbx. They all feed the same toolchain model, so a project can combine them.

dbx.config.* ​

A standalone config file (dbx.config.ts, .mts, .cts, .js, .mjs, .cjs or .json) exports { toolchain: { ... } } with defineConfig.

It is the non-Vite path and is typed as ToolchainConfig (see the TypeScript guide). Every section is opt-in by presence.

Vite plugin ​

In a Vite or Vite+ project, pass the same toolchain object to the dbx() plugin in vite.config.*.

The CLI reads it back from the Vite config, so no dbx.config.* is required. See Vite plugin.

CLI ​

dbx command flags configure a command for one run. The available options are generated from the command descriptors. See the CLI reference.

Environment variables ​

Schema leaves that declare .meta({ envName }) can be set through env vars (the toolchain config uses the DBX_ prefix).

See the environment reference and the Config Generator.

Editor JSON Schema ​

The generated config.schema.json gives editors completion and validation for dbx.config.*.

The exhaustive object reference is dbx.config.

Types ​

Find all static types for the configurations here.

Fields ​

Every generated config reference page uses the same ConfigMeta fields defined in Zod/Untyped schemas:

  • description
  • required
  • deprecated
  • example
  • secret
  • scope
  • public
  • defaultValue
  • envName (the env fields)
  • envPath
  • cli / cliCommand (schema-driven CLI flags and commands)
  • envExpose (keep a value CLI-only) and more.