|Joop Kiefte e21177ed03|
Debby is a CLI tool that wraps Dolt and Visidata to enable you to do quick database and table interactions on the command line.
- Install VisiData. Any version should work, although I recommend getting a later version.
- Install Dolt. Again, it should work with any version, but tested with the most recent ones.
- Make sure you have Go installed for compiling debby.
go install git.kiefte.eu/lapingvino/debby@latest
If you have ~/go/bin on your path, you can now invoke debby directly, otherwise you might want to move it to a location that is in your path.
Debby has two main ways to use it. Running it without any arguments starts an interactive session. Here you can run any dolt command without the dolt part, e.g. status, add and commit to perform a normal versioning sequence. Of course the sql command works as well, but debby's special sauce is in the run command which will open the result of your query in visidata. If you want to do anything with this result, save it to a new file and e.g. import it.
The edit command on the other hand just takes a table name as input but does import the changes back into dolt. It might not be the best option for massive tables, but should be fine for most reasonable tables.
The create command lets you create a table from scratch. You can edit the headers with ^, add new rows with a, add new columns with i, delete rows with d, hide columns with - (they are not deleted but everything hidden won't be saved) and edit any cell with e. Check the visidata documentation for more advanced tricks. When you are done, debby will check the schema that dolt wants to give to this table and opens it in your default editor so you can adjust the schema before you submit it.
That's it for now. Feel free to ping me about any suggestions for improvement!