Configuration¶
Metaxy can be configured using TOML configuration files, environment variables, or programmatically.
Either TOML-based or environment-based configuration is required to use the Metaxy CLI.
Configuration Priority¶
When the same setting is defined in multiple places, Metaxy uses the following priority order (highest to lowest):
- Explicit arguments - Values passed directly to
MetaxyConfig() - Environment variables - Values from
METAXY_*environment variables - Configuration files - Values from
metaxy.tomlorpyproject.toml
Config Discovery¶
Configuration files are discovered automatically by searching in the current or parent directories. metaxy.toml takes precedence over pyproject.toml.
Templating Environment Variables¶
Metaxy supports templating environment variables in configuration files using the ${VARIABLE_NAME} syntax.
Configuration Options¶
Store Configuration¶
The stores field configures metadata store backends. Each store is defined by:
type: Full import path to the store class (e.g.,metaxy.ext.metadata_stores.duckdb.DuckDBMetadataStore)config: Dictionary of store-specific configuration optionsfallback_stores- optional list of store names to pull missing metadata from. Learn more here.
store¶
Default metadata store to use
Type: str | Default: "dev"
stores¶
Named store configurations
Type: dict[str, metaxy.config.StoreConfig]
migrations_dir¶
Directory where migration files are stored
Type: str | Default: ".metaxy/migrations"
entrypoints¶
List of Python module paths to load for feature discovery
Type: list[str]
theme¶
Graph rendering theme for CLI visualization
Type: str | Default: "default"
hash_truncation_length¶
Truncate hash values to this length.
Type: int | Default: 8
auto_create_tables¶
Auto-create tables when opening stores. It is not advised to enable this setting in production.
Type: bool | Default: False
project¶
Project name for metadata isolation. Used to scope operations to enable multiple independent projects in a shared metadata store. Does not modify feature keys or table names. Project names must be valid alphanumeric strings with dashes, underscores, and cannot contain forward slashes (/) or double underscores (__)
Type: str | None
locked¶
Whether to raise an error if an external feature doesn't have a matching feature version when syncing external features from the metadata store.
Type: bool | None
sync¶
Whether to automatically sync external feature definitions from the metadata during some operations. It's recommended to keep this enabled as it ensures versioning correctness for external feature definitions with a negligible performance impact.
Type: bool | Default: True
metaxy_lock_path¶
Relative or absolute path to the lock file, resolved from the config file's location.
Type: str | Default: "metaxy.lock"