.Dd February 12, 2026 .Dt BOLT.TOML 5 .Os .Sh NAME .Nm bolt.toml .Nd bolt configuration file .Sh DESCRIPTION .Nm is the configuration file for .Xr bolt 1 . Bolt searches for this file in the current working directory or any parent directory until the root of the filesystem. .Pp Environment variables take precedence over configuration file settings if both are set. .Sh FILE FORMAT The configuration file uses TOML format with two sections: .Bl -tag -width Ds .It Cm [migrations] Migration-related settings. .It Cm [database] Database connection settings. .El .Sh MIGRATIONS SECTION .Bl -tag -width Ds .It Cm directory_path The directory where migration scripts are located. Defaults to .Pa migrations . This can be a relative path (from the current working directory) or an absolute path. .Pp Environment variable: .Ev BOLT_MIGRATIONS_DIR_PATH .El .Sh DATABASE SECTION .Bl -tag -width Ds .It Cm dsn The Data Source Name (connection string) for the database. See .Xr bolt-databases 7 for format details. .Pp Environment variable: .Ev BOLT_DB_DSN .It Cm driver The database driver to use. One of: .Qq postgresql , .Qq mysql , .Qq mssql , or .Qq sqlite3 . .Pp Environment variable: .Ev BOLT_DB_DRIVER .It Cm migrations_table The name of the table used to track applied migrations. Defaults to .Qq bolt_migrations . .Pp Environment variable: .Ev BOLT_DB_MIGRATIONS_TABLE .El .Sh ENVIRONMENT All configuration options can be set via environment variables. When both a configuration file setting and environment variable are present, the environment variable takes precedence. .Pp .Bl -column "BOLT_MIGRATIONS_DIR_PATH" "migrations.directory_path" -offset indent .It Sy Environment Variable Ta Sy Configuration Key .It Ev BOLT_MIGRATIONS_DIR_PATH Ta Cm migrations.directory_path .It Ev BOLT_DB_DSN Ta Cm database.dsn .It Ev BOLT_DB_DRIVER Ta Cm database.driver .It Ev BOLT_DB_MIGRATIONS_TABLE Ta Cm database.migrations_table .El .Sh EXAMPLES A complete configuration file: .Bd -literal -offset indent [migrations] directory_path = "migrations" [database] dsn = "postgresql://user:password@localhost:5432/mydb?sslmode=disable" driver = "postgresql" migrations_table = "bolt_migrations" .Ed .Pp Using environment variables: .Bd -literal -offset indent export BOLT_DB_DSN="postgresql://user:password@localhost:5432/mydb" export BOLT_DB_DRIVER="postgresql" export BOLT_MIGRATIONS_DIR_PATH="db/migrations" .Ed .Sh SEE ALSO .Xr bolt 1 , .Xr bolt-databases 7