Skip to content

Add aegisctl status command for a quick health overview #86

@saivedant169

Description

@saivedant169

Problem

To check if AegisFlow is running correctly today, you have to curl /health, curl /admin/v1/providers, and maybe check the dashboard. Three commands for something that should be one.

Acceptance criteria

  • New command: aegisctl status
  • Prints a one-screen summary:
    • Gateway reachable (yes/no) and response time
    • Admin API reachable (yes/no)
    • MCP gateway reachable if enabled
    • Number of pending approvals
    • Number of active credentials if credential broker is enabled
    • Last audit entry timestamp
    • Policy pack currently loaded (if detectable)
  • --json flag for machine-readable output
  • Exit 0 if everything is healthy, 1 if any required component is down

Files to touch

  • cmd/aegisctl/status.go (new, or extend main.go if there is already a stub)
  • cmd/aegisctl/main.go to wire the subcommand
  • cmd/aegisctl/status_test.go (new)

How to test locally

# Start AegisFlow
./bin/aegisflow --config configs/demo.yaml

# In another terminal
./bin/aegisctl status
# Expected: a short table with all components green

./bin/aegisctl status --json
# Expected: JSON with the same fields

Notes

Look at how the existing admin API endpoints are structured in internal/admin/admin.go. You should not need any new admin endpoints for this, just new client code that calls the existing ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions