feat: honor NO_COLOR and keep pipe output parseable
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cli, typescript
- Domain
- cli
Research direction
Start with src/output.ts, logo.ts, and the docs, status, and extensions output paths; inspect the existing cli-table3 and TTY handling. Trace where ANSI, Unicode borders, checkmarks, and stdout diagnostics are emitted, then add TTY and non-TTY tests. Done means NO_COLOR and --no-color suppress ANSI, piped human output is TSV or JSON, and stdout contains data only.
Written by the indexing model from the issue text.
Description
We check TTY in a few places (logo.ts already honors NO_COLOR; docs ask disables the spinner off-TTY) but human tables always use Unicode box drawing (src/output.ts + cli-table3), and elastic status prints checkmarks. No --no-color. Piped human output is not a stable TSV.
Pre-1.0, do not add a pager. Do:
- Honor
NO_COLORandFORCE_COLOReverywhere we emit ANSI - Add
--no-coloras a global alias forNO_COLOR - When stdout is not a TTY and
--jsonis absent, render tables as TSV (or fall back to JSON). Unicode borders and checkmarks are TTY-only - Keep stdout = data, stderr = diagnostics (audit
docs/status/ extensions)
Relates to #623 (nested object rendering). This issue is the output contract, not that CAT bug.
Acceptance: NO_COLOR=1 elastic status has no ANSI and no checkmark glyphs. elastic stack es cat indices | cat is TSV or JSON, not a box table. Tests cover TTY and non-TTY.
- Dominant language
- TypeScript
- Stars
- 45
- Forks
- 26
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 67
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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.
More from elastic/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
elastic/cli#707 · 1 assignee ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
A per-context command allowlist can be bypassed with `--use-context` (no way to lock an agent to its context)Possibly taken @margaretjgu claimed this today. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
elastic/cli#700 · 1 assignee ·
Maintainers usually reply within 1 day
-
bug: malformed JSON passed to --document (and other body object flags) silently passes validationPossibly taken @margaretjgu claimed this today. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 74/100
elastic/cli#699 · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Doist/todoist-cli#576 ·
Maintainers usually reply within 1 day
-
🐛 Bug supabase/cli
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CopilotKit/aimock#491 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
agilepathway/label-checker#710 · 2 comments ·
Maintainers usually reply within 1 day