What & why
alias ls, class ls, and watch ls print human tables only. A --json variant makes them scriptable, matching scan --json and keeping the CLI consistent.
Where
cmd/netwp/cmds.go (the runAlias/runClass/runWatch list branches) and cmd/netwp/json.go.
Scope
- When
hasArg("--json"), emit the list as a JSON array (MAC, name/class, etc.) via printJSON.
- Small command-local DTOs if the store types don't serialize cleanly (see how
scan --json uses a DTO).
- Document in help text and both READMEs.
Acceptance
netwp alias ls --json (and class/watch) emit valid JSON.
- Full verify suite clean.
Good first issue: repetitive, guided by the existing --json commands.
What & why
alias ls,class ls, andwatch lsprint human tables only. A--jsonvariant makes them scriptable, matchingscan --jsonand keeping the CLI consistent.Where
cmd/netwp/cmds.go(therunAlias/runClass/runWatchlist branches) andcmd/netwp/json.go.Scope
hasArg("--json"), emit the list as a JSON array (MAC, name/class, etc.) viaprintJSON.scan --jsonuses a DTO).Acceptance
netwp alias ls --json(and class/watch) emit valid JSON.Good first issue: repetitive, guided by the existing
--jsoncommands.