Add explicit `--format` flag to CLI
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16
- Forks
- 3
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 121
Description
Currently, the CLI auto-detects which formatting to use based on whether stdout is attached to a TTY. If it is, regular text is printed, otherwise the text is wrapped in a JSON object.
This has to be configurable:
text– regular text output, no ANSI escape codestext-pretty– text output with ANSI escape codes (color, hyperlinks, other formatting)json– compact JSON outputjson-pretty– formatted multi-line JSON output
These options can be set globally using --format. This is separate from – and can be used in combination with – #37, which adds --[no-]stream, which allows output to either stream to the terminal, or be buffered and printed in a single call.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI's existing TTY-based output-format detection and trace how output is produced. Implement the globally configurable text, text-pretty, json, and json-pretty modes, preserving compatibility with the separate --[no-]stream option; done means each mode produces its specified output and combinations with streaming behave correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100