A tool for managing git lifecycle hooks with ✨ gleam! Pre commit, Pre push and more!
gleam add --dev cactus
Bun, Deno & Nodejs are all supported!
FIRST configure hooks and then run
# initialize configured hooks
# specify the target depending on how you want the hooks to run
gleam run --target <javascript|erlang> -m cactus
Settings that can be added to your project's gleam.toml
# hook name (all git hooks are supported)
[cactus.pre-commit]
# list of actions for the hook
actions = [
# command: name of the command or binary to be run: required
# kind: is it a gleam subcommand, a binary or a module: ["sub_command", "binary", "module"], default: module
# args: additional args to be passed to the command, default: []
{ command = "format", kind = "sub_command", args = ["--check"] },
{ command = "./scripts/test.sh", kind = "binary" },
]