{"id":13741436,"url":"https://github.com/bwireman/cactus","last_synced_at":"2025-04-10T04:07:14.949Z","repository":{"id":246908620,"uuid":"824655183","full_name":"bwireman/cactus","owner":"bwireman","description":"A tool for managing git lifecycle hooks with ✨ gleam! Pre commit, Pre push and more!","archived":false,"fork":false,"pushed_at":"2025-04-05T15:47:22.000Z","size":459,"stargazers_count":14,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T04:07:10.010Z","etag":null,"topics":["beam","cli","dx","erlang","git","git-hooks","gleam","hooks","javascript","pre-commit","pre-commit-hook","tools"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/cactus","language":"Gleam","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bwireman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-05T15:56:49.000Z","updated_at":"2025-04-05T15:47:26.000Z","dependencies_parsed_at":"2024-07-19T05:28:27.554Z","dependency_job_id":"e4955c76-6aab-47cf-ac52-5daf2e65e713","html_url":"https://github.com/bwireman/cactus","commit_stats":null,"previous_names":["bwireman/cactus"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwireman%2Fcactus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwireman%2Fcactus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwireman%2Fcactus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwireman%2Fcactus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bwireman","download_url":"https://codeload.github.com/bwireman/cactus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154984,"owners_count":21056543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beam","cli","dx","erlang","git","git-hooks","gleam","hooks","javascript","pre-commit","pre-commit-hook","tools"],"created_at":"2024-08-03T04:00:59.182Z","updated_at":"2025-04-10T04:07:14.925Z","avatar_url":"https://github.com/bwireman.png","language":"Gleam","readme":"# 🌵 Cactus\n\n[![Package Version](https://img.shields.io/hexpm/v/cactus)](https://hex.pm/packages/cactus)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/cactus/)\n[![mit](https://img.shields.io/github/license/bwireman/cactus?color=brightgreen)](https://github.com/bwireman/cactus/blob/main/LICENSE)\n[![gleam js](https://img.shields.io/badge/%20gleam%20%E2%9C%A8-js%20%F0%9F%8C%B8-yellow)](https://gleam.run/news/v0.16-gleam-compiles-to-javascript/)\n[![gleam erlang](https://img.shields.io/badge/erlang%20%E2%98%8E%EF%B8%8F-red?style=flat\u0026label=gleam%20%E2%9C%A8)](https://gleam.run)\n\nA tool for managing git lifecycle hooks with ✨ gleam! Pre commit, Pre push and\nmore!\n\n# 🔽 Install\n\n```sh\ngleam add --dev cactus\n```\n\n#### 🌸 Javascript\n\nBun, Deno \u0026 Nodejs are _all_ supported!\n\n### 🎥 Obligatory VHS\n\n![demo](https://raw.githubusercontent.com/bwireman/cactus/main/images/demo.gif)\n\n# ▶️ Usage\n\n**_FIRST_** configure hooks and then run\n\n```sh\n# initialize configured hooks\n# specify the target depending on how you want the hooks to run\ngleam run  -m cactus\n```\n\n### Config\n\nSettings that can be added to your project's `gleam.toml`\n\n```toml\n[cactus]\n# init hooks on every run (default: false)\nalways_init = false\n\n# hook name (all git hooks are supported)\n[cactus.pre-commit]\n# list of actions for the hook\nactions = [\n    # command: name of the command or binary to be run: required\n    # kind: is it a gleam subcommand, a binary or a module: [\"sub_command\", \"binary\", \"module\"], default: module\n    # args: additional args to be passed to the command, default: []\n    # files: file paths \u0026 endings that you want to trigger the action, default: [] (meaning always trigger)\n\n    # check formatting\n    { command = \"format\", kind = \"sub_command\", args = [\"--check\"], files = [\".gleam\", \"src/f/oo.gleam\"] },\n    # run tests\n    { command = \"./scripts/test.sh\", kind = \"binary\" },\n    # check dependencies 🕵️‍♂️\n    # self plug of https://github.com/bwireman/go-over\n    { command = \"go_over\", args=[\"--outdated\"] }\n]\n```\n","funding_links":[],"categories":["Packages"],"sub_categories":["Project Tooling"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwireman%2Fcactus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwireman%2Fcactus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwireman%2Fcactus/lists"}