Skip to content

Add --json output flag to 'runbook status' command #33

Description

@manthan787

Description

Add a --json flag to the runbook status command for machine-readable output.

Why

Currently runbook status outputs human-readable text. Adding JSON output would make it easier to:

  • Integrate with monitoring tools
  • Parse output in scripts
  • Build dashboards

What to do

  1. Look at src/cli.tsx for the status command implementation
  2. Add a --json boolean flag using the existing CLI framework
  3. When --json is passed, output structured JSON instead of formatted text
  4. Include the same information: service health, recent incidents, etc.

Example output

{
  "timestamp": "2026-02-11T10:00:00Z",
  "services": [
    {"name": "checkout-api", "status": "healthy"},
    {"name": "cart-service", "status": "degraded"}
  ],
  "incidents": []
}

Getting Started

bun install
bun run dev status  # See current output

Good for learning the CLI structure!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions