fix(cli): idx config prints JSON only when JSON is asked for

Auto output stays plain text when piped, as in 0.3.2, so scripts that
read $(idx config path) or $(idx config get KEY) keep working; -o json,
IDX_OUTPUT=json, or general.output = "json" print JSON. The config
goldens return to their 0.3.2 content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V3syn2fN2LNo5pvTSqc6eh
This commit is contained in:
hermes 2026-10-18 02:11:31 +00:00
commit 57eccc5843
10 changed files with 62 additions and 18 deletions

View file

@ -22,6 +22,10 @@ idx config get cache.quote_ttl
idx config path
```
`idx config` prints plain text, even when piped, so `$(idx config path)` works
in scripts. Ask for JSON with `-o json`, `IDX_OUTPUT=json`, or
`output = "json"`.
```toml
[general]
provider = "msn" # msn | yahoo