Add agentic JSON output mode for AI agent integration#536
Open
danielsuguimoto wants to merge 1 commit into
Open
Add agentic JSON output mode for AI agent integration#536danielsuguimoto wants to merge 1 commit into
danielsuguimoto wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a global
--output jsonflag that enables machine-readable JSON output across kool commands, making the CLI suitable for use by AI agents and automation tools. When JSON mode is active, commands emit structured payloads instead of human-readable tables or text, diagnostics route to stderr to keep stdout clean for data, and interactive prompts are automatically disabled.Commands with JSON output:
kool status: emits{"services":[...],"count":N}with service state, ports, and running statuskool logs: emits JSON Lines format ({"service":"...","message":"..."}) with streaming support for--followkool info: emits structured payload with kool/docker versions, binary paths, and environment variables (KOOL_API_TOKEN is redacted)kool run: script listing works in JSON mode; script-not-found errors emit structured JSON to stderr with suggestions fieldThe existing
--jsonflag onkool runis now hidden but remains functional for backwards compatibility, unified under the global--output jsonflag.Notes
--output jsonis a global flag that must be placed before the script name when usingkool runkool run <script>remains raw (unstructured) as it passes through the underlying command output--jsonflag onkool runis hidden but still works for backwards compatibilitygo vetclean