croft 0.1.1

Per-project dev-loop tool: Docker Compose, scripts, hooks, and agents in one config
Documentation
# Example: git hook configuration end to end.
#
# croft recognises hooks from two places, both run by the installed
# shim:
#
# 1. `[hooks.<stage>]` below — native croft hooks (recipe / script
#    names).
# 2. `.pre-commit-config.yaml` at the project root — standard
#    pre-commit-format file, parsed by croft directly.
#
# Run `croft hooks install` from this directory to wire up the
# shims (you'll need a git repo; `git init` first if needed).

[project]
name        = "hooks-demo"
description = "Native croft hooks plus pre-commit-config.yaml integration"

[runtime]
backend = "none"             # host-only

[install]
install_git_hooks = false    # so this example can be run without
                             # affecting the host project's hooks

# ---- Recipes referenced by [hooks.pre-commit] below ----------

[command.fmt]
desc = "Check formatting (no autofix)"
run  = "echo '[fmt] would run cargo fmt --check / prettier --check / etc.'"

[command.lint]
desc = "Run static analysis"
run  = "echo '[lint] would run cargo clippy / eslint / phpstan / etc.'"

# Aggregator. `croft check` runs both in order; first non-zero exit
# halts the chain.
[command.check]
desc = "Format + lint, in that order"
run  = ["fmt", "lint"]

# ---- Native croft hooks ------------------------------------

[hooks]
# Run on `git commit`. Recipe / script names from above (or
# discovered under .croft/commands/).
pre-commit = ["check"]
# Run on `git push`. Empty list = no hook for that stage.
pre-push   = []