What
Add a --json flag to the kbot status command so it outputs machine-readable JSON instead of the current human-readable terminal output.
Why
Scripting and automation workflows (CI pipelines, monitoring dashboards, other tools) need to consume kbot's status programmatically. Right now, kbot status only prints formatted text with chalk colors, which is hard to parse.
Suggested approach
- Add a
--json option to the status command definition in cli.ts (around line 164).
- When
--json is passed, call getStatus() as usual but output JSON.stringify(status, null, 2) to stdout instead of calling printInfo().
- Follow the same pattern already used by the global
--json flag (see GLOBAL_OPTIONS in completions.ts line 37).
Example output:
{
"version": "3.41.0",
"agent": "kernel",
"tier": "pro",
"toolCount": 60,
"learning": {
"patternsCount": 42,
"knowledgeCount": 15
},
"sessionCount": 7
}
Files to look at
packages/kbot/src/cli.ts — The status command definition (~line 164)
packages/kbot/src/ide/bridge.ts — The getStatus() function that returns the status object
packages/kbot/src/completions.ts — Update the completions data if adding new subcommand options
What
Add a
--jsonflag to thekbot statuscommand so it outputs machine-readable JSON instead of the current human-readable terminal output.Why
Scripting and automation workflows (CI pipelines, monitoring dashboards, other tools) need to consume kbot's status programmatically. Right now,
kbot statusonly prints formatted text with chalk colors, which is hard to parse.Suggested approach
--jsonoption to thestatuscommand definition incli.ts(around line 164).--jsonis passed, callgetStatus()as usual but outputJSON.stringify(status, null, 2)to stdout instead of callingprintInfo().--jsonflag (seeGLOBAL_OPTIONSincompletions.tsline 37).Example output:
{ "version": "3.41.0", "agent": "kernel", "tier": "pro", "toolCount": 60, "learning": { "patternsCount": 42, "knowledgeCount": 15 }, "sessionCount": 7 }Files to look at
packages/kbot/src/cli.ts— Thestatuscommand definition (~line 164)packages/kbot/src/ide/bridge.ts— ThegetStatus()function that returns the status objectpackages/kbot/src/completions.ts— Update the completions data if adding new subcommand options