Config Init#
Because I got tired of setting up init scripts and looking up that particular config file every time.
Usage#
❯ config-init
Utils to init various configs
Usage:
config-init [command]
Available Commands:
caddy Init Caddyfile
completion Generate the autocompletion script for the specified shell
compose Init compose.yaml
direnv Init direnv
docker Init Docker
dockerfile Init Dockerfile
dvc Init dvc
github-actions Init Github Actions configs
goreleaser Init goreleaser config
help Help about any command
make Init Makefile
pre-commit Init pre-commit
renovate Init renovate ci config
sops Init sops
Flags:
-h, --help help for config-init
-t, --toggle Help message for toggle
-v, --version version for config-init
Use "config-init [command] --help" for more information about a command.
Bonus#
You can use git-xargs to mass update repos
export GITHUB_TOKEN=
export PR_BRANCH_NAME=
export COMMIT_MESSAGE=
git-xargs \
--no-skip-ci \
--branch-name "$PR_BRANCH_NAME" \
--repo $USER/$REPO \
--commit-message "$COMMIT_MESSAGE" \
$COMMAND
Cookbooks#
# pre-commit
yq e -i '(.repos[] | select(.repo== "https://github.com/DavidAnson/markdownlint-cli2").hooks[0].args) = "[--ignores, node_modules, src, --fix]"' .pre-commit-config.yaml