#cfg #programs #cli #tool #editor #aliases #configuration

app cfg-cli

A program configuration tool

2 releases

new 0.1.1 Dec 21, 2024
0.1.0 Dec 21, 2024

#119 in Configuration

GPL-3.0 license

7KB
93 lines

cfg

A CLI tool for quickly opening config files for various programs.

Installation

On Linux:

cargo install cfg-cli

Usage

For example, running

cfg bash

will open ~/.bashrc with the editor set in ~/.config/cfg/cfg.toml (set to $EDITOR by default). You can also explicitly pass an editor command:

cfg neovim --with vim

will open ~/.config/nvim/init.lua.

Many programs also have aliases, which are shortened names that can be used to configure them, i.e., to configure Neovim, you can also do:

cfg nvim

For a full list of programs and their config files and aliases, see the default configuration.

All config file paths and aliases can be changed, and new programs can be added via the config in ~/.config/cfg/cfg.toml, which will be automatically created upon the first time running cfg.

Dependencies

~1.5–8.5MB
~75K SLoC