feat(cli): machine-readable output for editor and automation integrations - #499
Open
Caesarsage wants to merge 15 commits into
Open
feat(cli): machine-readable output for editor and automation integrations#499Caesarsage wants to merge 15 commits into
Caesarsage wants to merge 15 commits into
Conversation
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
…ctions) Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
…paths Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
…lize command client/JSON helpers Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
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.
Give the human-facing commands a structured
--output jsonmode so the MicrocksVS Code extension (and CI/automation) can drive the CLI without scraping text.
The rule throughout: stdout carries the structured result, stderr carries
progress and diagnostics, so a consumer can parse stdout cleanly while a human
still sees what's happening.
This is the CLI half of the VS Code integration (LFX mentorship, D3). The
extension is using the CLI as communication interface than re-implementing Microcks
auth, context, and lifecycle logic API.
Depends on
Stacked on #488 (
--outputframework), which is itself stacked on #491(→ #490, error-handling refactor). This branch imports
pkg/output,pkg/errorsKind classification, andconnectors.GetFullTestResult— none ofwhich exist on
masteryet — so it will not compile standalone.Do not merge until #491 and #488 have landed. Merge order:
master, then mergeWhat's in it
capabilitiescommand —microcks capabilities [--output json]emits aversioned contract (
schemaVersion,cliVersion,capabilities[]) so aconsumer can feature-detect before depending on any JSON shape.
context --output json— list/use/delete now speak JSON; an empty configreturns
[]as a valid disconnected state.start --output json— prints only the structured start result on stdout;image-pull and readiness progress move to stderr.
import --output json— emits an array of import results.test --dry-run --watch --output json— a newline-delimited JSON eventstream (
ready → imported → test-result → waiting → … → stopped), since along-running watch can't wait for one final document.
service list/get,test list/get) andtheir documentation.
Testing
go build ./...,go vet ./...,go test ./...all pass.event writer (well-formed and malformed events).
Docs
documentation/cmd/{capabilities,context,import,start,test,service}.mdand thecommand table in
README.mdare updated for the new flags and JSON contracts.