Description
Claude and Codex have hooks, and managing them through lefthook feels like something useful.
What problem it is solving?
You don't need to define hooks for the Claude, Codex, etc. You add a hook to lefthook.yml and generate the configs for the provider of your choice.
Details
Need to think of the better approach and configuration option.
Option 1 – Strictly configurable
# lefthook.yml
ai:
claude:
Stop: validate # references a named lefthook hook
validate:
jobs:
- run: go test ./...
Merges to:
Option 2 – Ask user
Stop:
jobs:
- run: go test ./...
When you run lefthook install
- Detects you have configured hooks for LLM (by name)
- Asks if you prefer to use Claude or Codex
2.1. Another option is to check existing .claude/ and .codex/ dirs
- Installs the hook (which call
lefthook run Stop)
Description
Claude and Codex have hooks, and managing them through lefthook feels like something useful.
What problem it is solving?
You don't need to define hooks for the Claude, Codex, etc. You add a hook to
lefthook.ymland generate the configs for the provider of your choice.Details
Need to think of the better approach and configuration option.
Option 1 – Strictly configurable
Merges to:
Option 2 – Ask user
When you run
lefthook install2.1. Another option is to check existing .claude/ and .codex/ dirs
lefthook run Stop)