Problem
Currently output is JSON-only. Humans want pretty tables, scripts want raw values for piping.
Pattern from Go CLI Books
From "Building Modern CLI Applications in Go" (p.250-258):
type OutputFormatter interface {
Format(data interface{}) (string, error)
}
type JSONFormatter struct{}
type TableFormatter struct{}
type RawFormatter struct{}
// Auto-detect based on TTY
if isatty.IsTerminal(os.Stdout.Fd()) {
return TableFormatter{}
}
return JSONFormatter{}
Action Items
Examples
secrets status --output json # Structured JSON
secrets status --output table # Pretty tables
secrets status --output raw # Just values
secrets status # Auto: table if TTY, json otherwise
Book References
- Search:
pdf-brain search "output format table json" --fts --expand 2000
- Search:
pdf-brain search "isatty terminal detect" --fts --expand 2000
Priority
P1 - Better UX for both humans and agents
Problem
Currently output is JSON-only. Humans want pretty tables, scripts want raw values for piping.
Pattern from Go CLI Books
From "Building Modern CLI Applications in Go" (p.250-258):
Action Items
--outputflag to root command (json|table|raw)internal/output/Examples
Book References
pdf-brain search "output format table json" --fts --expand 2000pdf-brain search "isatty terminal detect" --fts --expand 2000Priority
P1 - Better UX for both humans and agents