Skip to main content

A cli for managing user's config files

Project description

Config Caddy

Travis CI PyPI version

Config Caddy is a tool used for managing your configuration files.

One way to version your configuration files is to keep them in a git repository. This has several drawbacks, among them, git requires the files it manages to be located within a single file tree. You can overcome this limitation by using symbolic links. The links point from locations in your filesystem such as /etc/someconfig.confto files within the git repository like $HOME/tstapler/dotfiles/someconfig.conf.

Config Caddy creates symlinks to your dotfiles directory, so you don't have to. Each time you add a new file to your dotfiles repo, run cfgcaddy link to generate symlinks. By default cfgcaddy will create links from files in the dotfiles repo to their relative location in your home directory. cfgcaddy will also read from a configuration file. This allows the user to ignore certain files and create more complex linking relationships.

Usage

  1. Install using pip
pip install cfgcaddy
  1. Generate or import a configuration file for cfgcaddy
cfgcaddy init --help

Usage: cfgcaddy init [OPTIONS] SRC_DIRECTORY DEST_DIRECTORY

  Create or import a caddy config

Options:
  -c, --config PATH  The path to your cfgcaddy.yml
  --help             Show this message and exit.

cfgcaddy init $HOME/dotfiles $HOME
  1. Run the linker
cfgcaddy link

Configuration File Format

cfgcaddy uses a configuration file to store important information about your configuration. The .cfgcaddy.yml consists of several parts. A preferences section which contains information like where your dotfiles are located and where you want them linked to, A links section where you can specify more complex symlinks, and an ignore section where you specify files you do not want managed by cfgcaddy.

Config files for cfgcaddy are stored in your home directory by default. $HOME/.cfgcaddy.yml

A sample .cfgcaddy.yml which leverages most features can be found here

Development

  1. Clone the repository
git clone https://github.com/tstapler/cfgcaddy
  1. Install cfgcaddy as an editable package
pip install --editable ./cfgcaddy
  1. ??????

  2. Profit

Motivation/Prior Art

I'm an automation fiend, this tool grew out of a personal need to manage my configurations across multiple machines and operating systems. It fits my needs and I'll add features as I need them (Like Windows support). PRs are always welcome :)

Here are several projects that I've drawn inspiration from:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cfgcaddy-0.1.8.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

cfgcaddy-0.1.8-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file cfgcaddy-0.1.8.tar.gz.

File metadata

  • Download URL: cfgcaddy-0.1.8.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for cfgcaddy-0.1.8.tar.gz
Algorithm Hash digest
SHA256 75dad80fa3e6d2a3defd601326d1a889bc963e4c71d11bc4ed01f845abd6bb56
MD5 6257cf1b4d574f46d77d923dff83f436
BLAKE2b-256 0856f295df6e1f32ebe881b9907a5e098e34f28ede289001c190b2ca66387a2e

See more details on using hashes here.

File details

Details for the file cfgcaddy-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: cfgcaddy-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for cfgcaddy-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9f6acbe7671a9a0ff978dad3819486a79e9c95329fad3ed4f12ca4b3cdfbdabd
MD5 4cac77b4a561216e800ef312647583fb
BLAKE2b-256 4b8abc1222bad0ae00036b62c162d58b98e7fe33a242880ef9031809d86512c3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page