Package: config-keeper2
config-keeperUser-friendly CLI for keeping your personal files or directories in
a repository.In a few wordsconfig-keeperdoes following:Collects information about what files on current machine it should keepMakes a temporary copy of all these files and pushes it to specified
repositoryPulls files from a repository later and puts them to the right placesTable of contentsUse casesKey featuresInstallUsing pipx (recommended)Using pipUsageQuick startAutocompletionCLI ReferenceUse casesYou spend a lot of time writing launch/build tasks or making config files
for a project you develop, but these stuff cannot be placed along with the
project itself.You have to switch between work computers from time to time while you
working on same project and you have to send yourself archives with
bunch of updated files.You want to save some system-wide config (like .bashrc) to use
it later or quickly restore if something goes wrong.Finally, you want toautomatethese stuff.Key featuresCreate projects as logical groups of files to sync and a repositoryAll configuration in a single YAML file - update it using CLI or by hands
usingvalidatecommand afterTerminal auto-completionUser-friendly error messages if something goes wrongInstallUsing pipx (recommended)Installpipxfirst.pipxinstallconfig-keeper2Using pippipinstall--userconfig-keeper2NOTE: if you are using latest versions of Ubuntu/Debian/Fedora, you may
also need to use--break-system-packagesflag. Refer toPEP 668for more information.Usageconfig-keeperrelies on aprojectas logical group of files to sync
and a repository. Each project consists ofPaths. These are any files or directories in your filesystem which you
want to keep. Some of them might not exist yet, if you are want to pull them
first from existing repository. But they must exist if you are going to push.Repository. Here your files and directories live. When you going to push
or pull, this repository is used.Branch. The branch of repository. Nothing special. If you want, you can
use the same repository across multiple projects with different branches.Quick startTo begin, create a project:config-keeperprojectcreatemyproject# Repository: git@github.com:MyUser/personal-stuff.git# Branch [main]: mybranch# Project "myproject" saved.Here assumed that repository exists and you have permissions
to communicate with it. Branch may exist or not - if not, it will be created
at first push.Next, add path to the project:config-keeperpathsadd\--projectmyproject\my_config.ini:~/configs/my_config.ini\# Project "myproject" saved.Here we said that~/configs/my_config.inifile should live in our
repository asmy_config.ini.Assuming that~/configs/my_config.iniexists, let's push it:config-keeperpushmyproject# Going to push into following branches:# - "mybranch" at git@github.com:MyUser/personal-stuff.git (from "myproject")# Proceed? [Y/n]:If something goes wrong at this step (or at any other step) you will probably
have a nice-readable error. If this is not your case please create anissuedescribing how
to reproduce the bug and the desired behavior.Now, if you visit repository, you should see thatmybranchhas recent
commit withmy_config.inifile.Finally, imagine you want to restoremy_config.inion your local machine
from a repository. All you need to do isconfig-keeperpullmyproject# Following paths will most likely be replaced:# - /home/<my_user>/configs/my_config.ini (from "myproject")# Proceed? [Y/n]:If you confirmed replacing, the~/configs/my_config.inifile now should
be the same as in repository one.AutocompletionRunconfig-keeper--install-completionand reload shell.NOTE: there is aknown issuewithzsh. As a workaround you can addcompinit -Dto the end of your.zshrcafter installing completion.CLI ReferenceTo learn what commands are available, please refer toREFERENCE.NOTE: you can always check the description of any command by using--help, e.g.config-keeperpush--help