Dolt CLI New Year's Resolutions
Dolt is a version controlled, relational database, the best of Git and MySQL combined. Recently, we've been giving a lot of love to the SQL side of Dolt and building a really robust experience. This year, I'm excited to give the Command Line Interface (CLI) side more attention and improvement. Since it's the start of a new year, I'll be sharing some New Year's resolutions I have for the CLI and giving you a brief overview of some improvements we made last year.
A Quick Look Back
CLI Migration -- Last year, we migrated the CLI to be backed by SQL so you could use CLI commands like dolt push
and dolt branch
that work on your running server. We also added global configurations that allow CLI commands to be run against any network accessible Dolt SQL server. Now you can interact with Hosted Dolt straight from your local command line! With that, our current plans for CLI migration are complete. All the important commands now work with a running Dolt SQL Server, but if you find one that doesn't, let us know!
dolt version
Enhancements -- dolt version
now tells you if you're out of date with our latest release, making it easy to know when it's time to upgrade.
$ dolt version
dolt version 1.30.3
Warning: you are on an old version of Dolt. The newest version is 1.30.5.
dolt config
Enhancements -- dolt config add
now strictly enforces what config values you can set and gives you a warning if you have unrecognized values in your config file, keeping everything nice and clean.
$ dolt status
Warning: Unknown global config option 'foo'. Use `dolt config --global --unset foo` to remove.
On branch main
nothing to commit, working tree clean
New Year's Resolutions
Importing Data -- dolt table import
and dolt schema import
have big potential for improvement this year. We've already added some better error messaging and support for more types, like JSON
and TEXT
. Coming soon will be features to allow greater control of types on import, such as the ability to default everything to TEXT
and provide partial schemas. dolt table import --strict
is another potential feature on the horizon, allowing you to assert that there are no duplicate primary keys on insert. In general, I'm excited to add more robust options to improve the experience of importing data into Dolt.
New CLI Commands -- A new edition to our docs is this handy side by side comparison of Git vs Dolt commands. dolt reflog
has just recently been added to our roster with the addition of its SQL complement, dolt_reflog
. dolt_rebase
is our newest procedure, so expect to see dolt rebase
available on the CLI soon! Beyond these new additions, we also have plans to support more Git commands such as dolt bisect
and dolt name-rev
. If you have a favorite Git command that you would like to see in Dolt, let us know!
$ dolt reflog
jm0d2j8doi3mj1n4nu1lr530r5fqle5r (HEAD -> b1) Latest NBA stats as of today
jm0d2j8doi3mj1n4nu1lr530r5fqle5r (HEAD -> master) Latest NBA stats as of today
6kpsjpqt9ak39vnvjv1ako2ali1gssc2 (master) Merge from DoltHub Master
ii54ianm3v79gn67r90uj9usm2fsm1v2 (origin/tim/add-bubble-stats) Add NBA Bubble Stats from 2020
f61cdmsq8o989in7m5vb7ej45ap9jotq (origin/sow-off) delete a table
dolt log
Enhancements -- With support for dolt rebase
coming soon, dolt log
enhancements are all the more relevant. dolt log --stat
, dolt log --graph
, and dolt log --all
are currently my top priorities this coming year. Personally, I'm most excited for dolt log --graph
since it's my favorite git command!
SQL Shell Enhancements -- Last year we deprecated dolt sql-client
. dolt sql
is now the only way to access a built-in SQL shell in Dolt. Neil has been working on embedding CLI commands into the SQL shell and adding more details to the shell prompt, with details like active branch name and an indicator for a dirty working set. We're excited about making dolt sql
an even better experience this year!
CLI Performance -- Last, but certainly not least, we'll be focusing our attention on generally improving the performance of CLI commands, with special attention on our push, pull, and clone commands. The start-up performance of large databases is also a big area of focus, since working with the CLi in these instances can be quite cumbersome. There's a ton we can do here to make the experience of working with large databases even better.
What are you looking forward to?
Those are all my New Year's Resolutions for the CLI right now. I gravitate towards the CLI more myself, so I'm excited to fulfill my own wishlist this year. Hopefully there was something on this list that also excited you! Let us know what CLI improvements you would like to see by sending us an issue or dropping by our Discord server.