Add status subcommand (health check) #4

Open
opened 2026-04-09 13:38:08 +00:00 by jbr870 · 0 comments
Owner

Summary

Add a claude-permit status subcommand that verifies the system is healthy and properly wired up. Currently there's no way to confirm claude-permit is actually running — validate only checks config syntax.

User Stories Served

  • US-18: Health check — confirm hooks are wired up and the binary is responding

Suggested Checks

  1. Binary exists at expected path (~/.claude/bin/claude-permit)
  2. Config file exists and is valid
  3. Policy file exists
  4. Hooks are wired in ~/.claude/settings.json (PreToolUse, PermissionRequest, PostToolUse)
  5. Audit log exists and last entry timestamp (to confirm it's actively logging)
  6. Auto-rules file exists
  7. LLM reachable (optional --check-llm flag that does a test call)

Output

Human-readable checklist with pass/fail per check. Non-zero exit code if any critical check fails.

claude-permit status
  Binary:     ✓ ~/.claude/bin/claude-permit (v0.3.0)
  Config:     ✓ ~/.claude/claude-permit/config.toml (7 deny, 10 allow)
  Policy:     ✓ ~/.claude/claude-permit/policy.md
  Hooks:      ✓ PreToolUse, PermissionRequest, PostToolUse wired in settings.json
  Audit log:  ✓ Last entry: 2m ago (1,847 entries)
  Auto-rules: ✓ 12 auto-promoted rules
  LLM:        (skipped, use --check-llm)
## Summary Add a `claude-permit status` subcommand that verifies the system is healthy and properly wired up. Currently there's no way to confirm claude-permit is actually running — `validate` only checks config syntax. ## User Stories Served - **US-18:** Health check — confirm hooks are wired up and the binary is responding ## Suggested Checks 1. Binary exists at expected path (`~/.claude/bin/claude-permit`) 2. Config file exists and is valid 3. Policy file exists 4. Hooks are wired in `~/.claude/settings.json` (PreToolUse, PermissionRequest, PostToolUse) 5. Audit log exists and last entry timestamp (to confirm it's actively logging) 6. Auto-rules file exists 7. LLM reachable (optional `--check-llm` flag that does a test call) ## Output Human-readable checklist with pass/fail per check. Non-zero exit code if any critical check fails. ``` claude-permit status Binary: ✓ ~/.claude/bin/claude-permit (v0.3.0) Config: ✓ ~/.claude/claude-permit/config.toml (7 deny, 10 allow) Policy: ✓ ~/.claude/claude-permit/policy.md Hooks: ✓ PreToolUse, PermissionRequest, PostToolUse wired in settings.json Audit log: ✓ Last entry: 2m ago (1,847 entries) Auto-rules: ✓ 12 auto-promoted rules LLM: (skipped, use --check-llm) ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jbr870/claude-permit#4
No description provided.