🌵 Cactus

Package Version Hex Docs mit gleam js gleam erlang

A tool for managing git lifecycle hooks with ✨ gleam! Pre commit, Pre push and more!

🔽 Install

gleam add --dev cactus

🌸 Javascript

Bun, Deno & Nodejs are all supported!

▶️ Usage

FIRST configure hooks and then run

# initialize configured hooks
gleam run -m cactus

⚙️ Config

Optional settings that can be added to your project’s gleam.toml

[cactus.pre-commit]
# list of actions for the hook
actions = [
    {
      # name of the command or binary to be run
      # required
      command = "format",
      # is it a gleam subcommand, a binary or a module
      # ["sub_command", "binary", "module"]
      # default: module
      kind = "sub_command",
      # additional args to be passed to the command
      # default: []
      args = ["--check"]
    },
]

[cactus.pre-push]
actions = [
    { command = "test", kind = "sub_command" },
    { command = "go_over", kind = "module", args=["--outdated"] },
]
Search Document