General-purpose JSON output for CLI commands
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
When building other tools that wrap around FDB's CLI commands, we've hit a couple of general problems. The first problem is that parsing the `status json` output from the CLI can be error-prone, since the command isn't guaranteed to output a valid JSON document; it may output other information before outputting any JSON. The second problem is that commands beside `status json` don't provide machine-readable output. For instance, when running exclusion commands, the output is in text form, so running exclusions through other tools requires parsing the text in a way that is brittle to future changes. Could we consider having an option to request output in JSON form for most or all commands, in a separate stream from other output?
Contributor guide
Research direction
Start by reviewing the CLI handling for `status json` and the exclusion commands, focusing on how command output and other information are currently emitted. Define the supported command scope and the separate output stream behavior before implementing it. Done means callers can request valid machine-readable JSON without parsing unrelated text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100