repo-config

store repo config in dotfiles


Keywords
repo, config, cli, dotfiles
License
Unlicense
Install
pip install repo-config==2020.12.3

Documentation

Installation

$ [sudo] pip install repo-config
$ [sudo] npm i -g repo-config

How it works

path/to/repo/.config/ - repo config

git@host:owner/repo.git - git remote, required for save/load

~/.config/repo-config/owner/repo/ - dotfiles

Features

  • store repos config in dotfiles
    • exclude unwanted files from commit
    • you can symlink dotfiles to a special backup repo
    • easy to perform search and commands

Config

$ echo "/.config" >> ~/.gitignore

optional. environment variables:

$ export REPO_CONFIG_HOME=~/.config/repo-config     # $XDG_CONFIG_HOME/repo-config by default
$ export REPO_CONFIG_DIR=.config                    # .config by default

Examples

$ cd path/to/repo
$ repo-config init .
$ ... # generate and edit config/tmp files
$ repo-config save .
.config/ saved to ~/.config/repo-config/owner/repo
$ repo-config load .
.config/ loaded from ~/.config/repo-config/owner/repo

symlink dotfiles to a special backup repository:

$ ln -fs path/to/backup-repository/repo-config ~/.config/repo-config
save/load multiple repos config
$ find ~/git -type d -maxdepth 1 -exec repo-config save {} \;
$ find ~/git -type d -maxdepth 1 -exec repo-config load {} \;

readme42.com