Skip to content
Taylor Nekroze Lawson edited this page Nov 3, 2018 · 2 revisions

Dab uses files and folders to store a simple tree structured key value store comprising of one data type, the list. A list is a file and each line in the file is an element of the list, even if it only has a single element. This simple structure provides a powerful basis for coordinating and configuring dab and its features.

The configuration is used primarily internally by dab subcommands, for example when you register a repository with dab repo add it will store the address as the value of key repo/NAME/url where NAME would be replaced with the name of the repository you are registering. This config key can then be retrieved by the user via dab config get or used by other dab subcommands such as dab repo clone which will read the repo/NAME/url key to get the git address to clone from.

We have seen how configuration values can be retrieved via dab config get now lets have a look at setting and deleting values. This functionality is provided by dab config set which allows you to overwrite a value with a new one, or if you give it no new value it will delete the config key itself.

At this point it is worth hearkening back to an earlier statement that the dab config is just a file and folder structure, as such there are some limitations that you may not expect a normal key value store to have. For example if a config key under a namespace exists such as foo/bar then you may set and retrieve other keys under foo such as foo/barry however you cannot do so for the foo namespace itself as it is a directory, not a file. The inverse is also true, if you have a config get such as fliberty/gibbits set to 42 then you cannot then use that as a namespace under which you can place other keys, so setting fliberty/gibbits/mcgoo would fail as gibbits is a file not a directory.

Clone this wiki locally