Skip to main content

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:

Release files for cfgcaddy 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cfgcaddy 0.1.8
File Size Uploaded
cfgcaddy-0.1.8.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cfgcaddy 0.1.8
File Interpreter ABI Platform
cfgcaddy-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / cfgcaddy-0.1.8.tar.gz

Download URL cfgcaddy-0.1.8.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
75dad80fa3e6d2a3defd601326d1a889bc963e4c71d11bc4ed01f845abd6bb56
BLAKE2b-256 checksum
How to use checksums
0856f295df6e1f32ebe881b9907a5e098e34f28ede289001c190b2ca66387a2e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / cfgcaddy-0.1.8-py3-none-any.whl

Download URL cfgcaddy-0.1.8-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f6acbe7671a9a0ff978dad3819486a79e9c95329fad3ed4f12ca4b3cdfbdabd
BLAKE2b-256 checksum
How to use checksums
4b8abc1222bad0ae00036b62c162d58b98e7fe33a242880ef9031809d86512c3
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page