Summary
Add CLI commands for listing, testing, and managing workspace hooks.
Parent issue: #392
Scope
New CLI subcommands in cli/app.py
-
cf hooks list — show configured hooks for current workspace
- Display hook name, script preview (first 80 chars), timeout
- Indicate which hooks are configured vs. not set
-
cf hooks test <hook-name> — dry-run a specific hook
- Execute the hook with current workspace context
- Show stdout/stderr/exit code
- Useful for validating hook scripts before relying on them
-
cf hooks show <hook-name> — display full hook script and config
Changes to existing commands
cf status — show hook summary (N hooks configured) in workspace status output
Acceptance Criteria
Dependencies
Summary
Add CLI commands for listing, testing, and managing workspace hooks.
Parent issue: #392
Scope
New CLI subcommands in
cli/app.pycf hooks list— show configured hooks for current workspacecf hooks test <hook-name>— dry-run a specific hookcf hooks show <hook-name>— display full hook script and configChanges to existing commands
cf status— show hook summary (N hooks configured) in workspace status outputAcceptance Criteria
cf hooks listdisplays all configured hooks with previewcf hooks test before_taskexecutes the hook and shows resultscf hooks show after_initdisplays the full scriptcf statusincludes hook count in workspace summaryDependencies