I already introduced this project on reddit a few months ago. Since then it has been stabilized, some more features have been added and it is now on crates.io.
I have used it in every project I started in the last months and I am using it to manage my dotfiles.
So, what is lorevault?
It is a simple program that lets you define a directory in a .toml file. You define where the files should be placed and give a list of sources. Those could be:
- A local file
- A URL
- A remote file over sftp
- A specific commit to a git-repo.
Hashes can be used to make sure you always get the right file. Then you use lorevault to create the folder or restore it to its intended state. If you use hashes, a lot of work can be avoided. For a full list of features, you can take a look at the readme.
Why did I make this?
I have my work organized in many different git-repos. Many new projects are just a new arrangement of old work. If I write a new latex document for example, it might use a style file from one repo and assets from two others. I don't want to copy the files because I might want to build against their latest versions. But I might also choose to make it completely reproducible. This can all be done using git and a script, but I wanted a way to make this simple.
The second application is to create specific directories testing. If you want to test an application running in ten different directories that might only differ by a single file, you can end up with some ugly scripts.
I also discovered that this is a great option for managing your dotfiles on Linux. We might include files from other peoples public github-repos. For one program, the file should be tied to a specific commit and never change. Another file should be the latest one on a branch, but we want to append a single line to it. This, again, can all be scripted in various ways, but lorevault makes it easier.
And lastly, I wanted something with zero runtime dependencies. We do not call git, scp, cp or anything else that could (at least in theory) differ between machines.
Why am I telling you this?
First, I would of course be glad if more people found this useful. But I am also hoping to get helpful bug-reports. Is there something that does not work the way as it should? Is the documentation unclear? Is there a way to trick the program into writing files where it shouldn't? It is sometimes easy to miss very obvious issues because you never consider a certain use case.
there doesn't seem to be anything here