feat(cli): machine-readable output for editor and automation integrations - #499
Merged
Harsh4902 merged 1 commit intoAug 13, 2026
Conversation
Member
|
@Caesarsage Can you please resolve conflicts for this PR? |
Caesarsage
force-pushed
the
feat/vscode-service-test-json-commands
branch
from
August 12, 2026 10:40
e6b9171 to
0292dd4
Compare
Vaishnav88sk
previously requested changes
Aug 12, 2026
Caesarsage
force-pushed
the
feat/vscode-service-test-json-commands
branch
from
August 12, 2026 12:09
72d8bc3 to
e20c066
Compare
Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
Caesarsage
force-pushed
the
feat/vscode-service-test-json-commands
branch
from
August 12, 2026 15:59
aa904f2 to
69d220c
Compare
|
Looks perfect 👍🏻 @Harsh4902 |
Harsh4902
dismissed
Vaishnav88sk’s stale review
August 13, 2026 03:55
Dismissing this as @Vaishnav88sk's commented LGTM.
Harsh4902
approved these changes
Aug 13, 2026
Harsh4902
left a comment
Member
There was a problem hiding this comment.
Ready to merge. Thanks @Caesarsage
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.