colorctl

Crates.iocolorctl
lib.rscolorctl
version0.1.0
created_at2025-09-06 04:49:02.685779+00
updated_at2025-09-06 04:49:02.685779+00
descriptionSimple variable substitution based templating
homepagehttps://github.com/mavenried
repositoryhttps://github.com/mavenried/colorctl
max_upload_size
id1826736
size32,471
Joseph Chacko (mavenried)

documentation

README

colorctl

A simple configuration templating tool written in Rust. It allows you to define variables and application templates, then apply them to generate real configuration files.

Installation

Build from source with Cargo:

cargo install --path .

Usage

colorctl [COMMAND] [ARGS]

It finds variables defined in $[] symbols to substitute

Commands

  • apply
    Apply all templates with the current variables.

  • vars
    Manage variables.

    • colorctl vars → List variables\
    • colorctl vars +name=value → Add or update variable\
    • colorctl vars -name → Remove variable
  • apps
    Manage applications (template + target pairs).

    • colorctl apps → List applications\
    • colorctl apps +appname=template_path,target_path → Add app\
    • colorctl apps -appname → Remove app
  • edit
    Open an app's template in your $EDITOR.

    • colorctl edit → Pick an app with fzf and edit its template\
    • colorctl edit app1 app2 → Edit specific apps
  • help
    Show usage information.

Example

# Add a variable
colorctl vars +color=blue

# Add an app (template, target)
colorctl apps +nvim=~/.config/nvim/init.vim,~/.cache/nvim/init.vim

# Apply all configs
colorctl apply

This will substitute variables like $[color] inside your template files and write the processed output to the target files.

Commit count: 9

cargo fmt