LinuxCommandLibrary

dolt

Version controlled SQL database management

TLDR

Initialize a new Dolt data repository

$ dolt init
copy

Show the current working tree status
$ dolt status
copy

Add a remote Dolt repository
$ dolt remote add [repository_name] [url]
copy

Stage changes to tables
$ dolt add [table_name]
copy

Record staged changes to the repository
$ dolt commit [[-m|--message]] "[commit_message]"
copy

Push local changes to a remote
$ dolt push
copy

Pull changes from a remote
$ dolt pull
copy

SYNOPSIS

dolt [flags] <subcommand> [<args>]

PARAMETERS

-h, --help
    Display help for dolt and exit

--version
    Print version information and quit

DESCRIPTION

Dolt is a MySQL-compatible relational database with built-in version control, modeled after Git. It treats data tables like code files, enabling branching, merging, diffing, committing, and collaborative workflows on structured data.

Key features include SQL support for queries, schema changes, and version operations via CLI subcommands. Initialize with dolt init, import data with dolt table import, stage changes with dolt add, and commit with dolt commit. View history via dolt log or diffs with dolt diff. Branches allow experimentation without affecting main data.

Ideal for data pipelines, ML feature stores, audit trails, and reproducible research. Supports DoltHub for remote repos like GitHub. Runs as a server with dolt sql-server or interactively via dolt sql. Open-source under Apache 2.0.

CAVEATS

Requires a .dolt/ directory (created by dolt init). Not a standard Linux package; install via binaries, apt, or brew. Data storage uses significant disk space due to history.

KEY SUBCOMMANDS

dolt init: Initialize repo.
dolt sql: Run SQL interactively.
dolt add: Stage tables.
dolt commit: Commit changes.
dolt branch: Manage branches.
dolt sql-server: Start server.

INSTALLATION (LINUX)

curl -sSf https://install.dolthub.com | sh
Or add DoltHub apt repo: docs.dolthub.com/install

HISTORY

Developed by Liquidata (now DoltHub), first public release in 2020. Reached v1.0 in 2022. Actively maintained with frequent updates for performance and MySQL compatibility.

SEE ALSO

git(1), mysql(1), sqlite3(1)

Copied to clipboard