Skip to main content

atmos git hooks

Run your project's checks automatically when developers commit or push. Define Git hooks through Atmos workflows and custom commands so the team shares the same checks, tools, and configuration.

Atmos installs small .git/hooks/* scripts that delegate to atmos git hooks run. Configure hook commands under git.hooks in atmos.yaml; they run through Atmos workflows and custom commands with the project's toolchain, environment, and identity settings.

Configure hooks once in atmos.yaml:

git:
hooks:
pre-commit:
command: atmos workflow pre-commit
commit-msg:
command: atmos workflow commit-msg -- "$1"

Then install the shims:

atmos git hooks install
Local Git hooks vs. lifecycle hooks

Local Git hooks are triggered by Git itself (git commit, git push, ...) in the current repository. They are separate from Atmos lifecycle hooks (the git hook kind), which trigger on Atmos events like after.terraform.apply.

Subcommands​