Skip to content

feat(cli): add kernel status command#123

Open
jarugupj wants to merge 6 commits intomainfrom
phani/kernel-status-cli
Open

feat(cli): add kernel status command#123
jarugupj wants to merge 6 commits intomainfrom
phani/kernel-status-cli

Conversation

@jarugupj
Copy link
Contributor

@jarugupj jarugupj commented Feb 25, 2026

Displays overall system status and per-group/component breakdown from the API's /status endpoint, with color-coded output matching the dashboard indicator.


Note

Low Risk
Low risk: adds a read-only status check command and small refactors to centralize base URL selection, with minimal impact on existing deploy flows.

Overview
Adds a new unauthenticated kernel status command that fetches /status from the API and prints a color-coded service/group/component health summary (or pretty JSON via --output json).

Centralizes API base URL selection in util.GetBaseURL() and updates GitHub deploy and the new status command to use it; also registers status in rootCmd and exempts it from auth checks.

Written by Cursor Bugbot for commit 95e2273. This will update automatically on new commits. Configure here.

jarugupj and others added 2 commits February 25, 2026 16:30
Displays overall system status and per-group/component breakdown
from the API's /status endpoint, with color-coded output matching
the dashboard indicator.
@jarugupj jarugupj marked this pull request as ready for review February 25, 2026 21:53
Added error handling to the `runStatus` function to log an error message and return an error when the response status code from the Kernel API is not in the 2xx range. This improves user feedback when the API is unreachable.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Contributor

@masnwilliams masnwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd/status.go line 43 — nit: getBaseURL() + defaultBaseURL is duplicated from cmd/deploy.go — consider extracting to a shared helper so they stay in sync. also note that KERNEL_BASE_URL isn't actually set anywhere (no .env), so this always hits api.onkernel.com — worth a comment clarifying it's for internal dev/staging only.

cmd/status.go line 57 — nit: double error output — pterm.Error.Println prints a user-facing message, then the returned error gets printed by cobra too. pick one or the other (same on line 63).

… output

- Move base URL resolution to shared util.GetBaseURL() so status.go
  and deploy.go stay in sync.
- Fix status command returning both pterm error and fmt.Errorf (double
  output); use pterm + return nil to match codebase convention.
- Run gofmt to fix pre-existing indentation in deploy.go.
@jarugupj
Copy link
Contributor Author

cmd/status.go line 43 — nit: getBaseURL() + defaultBaseURL is duplicated from cmd/deploy.go — consider extracting to a shared helper so they stay in sync. also note that KERNEL_BASE_URL isn't actually set anywhere (no .env), so this always hits api.onkernel.com — worth a comment clarifying it's for internal dev/staging only.

cmd/status.go line 57 — nit: double error output — pterm.Error.Println prints a user-facing message, then the returned error gets printed by cobra too. pick one or the other (same on line 63).

Good catch - extracted to util.GetBaseURL() in pkg/util/client.go, both status.go and deploy.go use it now. Also fixed the double error output to pterm.Error + return nil.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants