Docs menu · Reference

Interim page. Maintained by hand until it is generated from the resolved command index (IDL). Where this page and strata agents commands --json disagree, the command index wins.

Strata’s configurable surface is deliberately small. There is one global config file with one user key, a handful of environment variables, and per-invocation flags. Everything below is verified against the binary.

strata config verbs

$ strata config --help
VerbPurpose
strata config pathPrint the global config file path.
strata config showPrint the resolved hub configuration and which layer supplied it.
strata config getPrint the sanitized config.
strata config get-key <KEY>Print one sanitized value (hub.url reads the user config).
strata config set <KEY> <VALUE>Set a user-config key in the global config.
strata config unset <KEY>Remove a user-config key from the global config.

Config file

strata config path reports the file location, which honors XDG_CONFIG_HOME:

$ strata config path
{"path":"/home/you/.config/strata/config.toml"}

strata config set writes TOML. After setting hub.url the file contains:

[hub]
url = "https://your-hub.example/"

The file is created on first set; unset removes the key.

Known keys

The only user-config key in this release is hub.url — the address of the dataset hub used by strata clone. strata config show reports the resolved value and its source:

$ strata config show
{"hub.url":"https://hub.stratahub.io/","source":"built-in default"}

No other user-writable config keys are exposed by the binary. Durability, cache sizing, and similar engine behavior are not surfaced as config-file keys on the CLI in this release — if you need them, drive the database through the SDK.

Hub URL resolution

The hub address is resolved from four layers, highest precedence first. strata config show names the winning layer in its source field.

PrecedenceLayersource shownNotes
1--hub <URL> flag(per invocation)On strata clone; overrides env and config files for that call.
2STRATA_HUB_URL envSTRATA_HUB_URLOverrides the config file.
3Config file hub.urlthe config file pathSet with strata config set hub.url ….
4Built-in defaultbuilt-in defaulthttps://hub.stratahub.io/.

Observed precedence — the environment variable wins over the file:

$ STRATA_HUB_URL=https://env.example/ strata config show
{"hub.url":"https://env.example/","source":"STRATA_HUB_URL"}

Environment variables

Honored by the binary:

VariableEffect
STRATA_DBDefault database path when no [DB] argument, --db, or --cache is given. The no-database error explicitly suggests it.
STRATA_HOMEOverrides the Strata home directory that strata init prepares.
STRATA_HUB_URLOverrides the config-file hub address (layer 2 above).
XDG_CONFIG_HOMERelocates the config file ($XDG_CONFIG_HOME/strata/config.toml).

Honored by the install script only (not the binary):

VariableEffect
STRATA_VERSIONPin the version the installer downloads.
STRATA_INSTALL_DIRChoose where the installer places the binary.

Database open options (CLI)

Every command opens a database through the top-level options:

OptionMeaning
[DB] (positional)Durable database path.
--db <PATH>Durable database path. Cannot be combined with the positional form.
--cacheOpen an in-memory (non-durable) database for this process.
--branch <BRANCH>Default branch for commands that accept one.
--space <SPACE>Product space for commands that accept one.
--jsonEmit compact JSON.
--rawEmit script-friendly raw output where possible.

A command with no durable path, no --db, no --cache, and no STRATA_DB refuses:

$ strata info
error: [invalid_argument.cli.no_database]: no database specified
  hint: pass a path (strata ./mydb kv put …), set STRATA_DB, or use --cache for ephemeral

Could not verify

  • No config-file keys other than hub.url are exposed by the binary; durability mode is not a CLI config key in this release.
  • STRATA_VERSION and STRATA_INSTALL_DIR are installer variables and were not exercised here beyond their presence in the install script.

See also

agents: this page as markdown → /docs/reference/configuration-reference.md