LinuxCommandLibrary

dolt-config

Configure Dolt databases and repositories

TLDR

List all local and global configuration options and their values

$ dolt config --list
copy

Display the value of a local or global configuration variable
$ dolt config --get [name]
copy

Modify the value of a local configuration variable, creating it if it doesn't exist
$ dolt config --add [name] [value]
copy

Modify the value of a global configuration variable, creating it if it doesn't exist
$ dolt config --global --add [name] [value]
copy

Delete a local configuration variable
$ dolt config --unset [name]
copy

Delete a global configuration variable
$ dolt config --global --unset [name]
copy

SYNOPSIS

dolt config [options] [--local|--global|--system] [--edit] [--get|--set|--unset|--remove|--rename] <name> [<value>] [--type <type>] [--show-origin] [--list|--list-web] [--get-regexp|--get-all] <regexp> [--bool|--int] [--default <value>]

PARAMETERS

--list
    List all variables set in the config file(s)

--list-web
    List variables in a web-friendly format

--get <name>
    Get value for <name> or empty string if unset

--get-all <name>
    Get all values for <name>, one per line

--get-regexp <regexp>
    Get values matching regular expression

--set <name> <value>
    Set <name> to <value> (overwrites)

--unset <name>
    Remove the line for <name>

--unset-all <name>
    Remove all lines matching <name>

--rename-section <old> <new>
    Rename section from <old> to <new>

--remove-section <name>
    Remove entire section

--edit
    Edit config file in default editor

--local
    Use repository .doltconfig (default)

--global
    Use user ~/.doltconfig

--system
    Use system /etc/doltconfig

--type <type>
    Parse value as bool, int, or bool-or-int

--show-origin
    Show config file path with value

--bool
    Interpret as boolean (synonym for --type bool)

--int
    Interpret as integer (synonym for --type int)

--default <value>
    Use <value> if unset (with --get)

DESCRIPTION

dolt config reads, writes, and manages configuration variables for Dolt repositories, similar to git config. It supports multiple scopes: system-wide (--system), user-global (--global), and repository-local (--local, default).

Configuration files use INI format, stored at ~/.doltconfig (global), /etc/doltconfig (system), or .doltconfig (local). Many options mirror Git's, like user.name and user.email for commits. Dolt-specific options include database settings, branch behaviors, and SQL configurations.

Use --list to view all settings, --get <name> to retrieve a value, --set <name> <value> to assign, and --unset <name> to remove. Type conversion via --type bool|int ensures correct parsing. The --edit option opens the config in your default editor.

This command is essential for customizing Dolt's behavior across projects or globally, enabling tailored workflows like default SQL modes or remote credentials.

CONFIG FILE LOCATIONS

Local: .doltconfig in repo root.
Global: ~/.doltconfig or $XDG_CONFIG_HOME/dolt/config.
System: /etc/doltconfig.

EXAMPLES

dolt config --global user.name "John Doe"
dolt config --list
dolt config --get user.email

HISTORY

Introduced in Dolt 0.1.0 (October 2019) by Liquidata (now DoltHub) to provide Git-like configuration management for the version-controlled SQL database.

SEE ALSO

git-config(1), dolt(1)

Copied to clipboard