miller/pkg/terminals
John Kerl 2dd94cb181
Add machine-readable help catalog: mlr help --json (#2098) (#2099)
Emit Miller's existing help catalog (verbs, functions, flags, keywords)
as structured JSON so AI agents and tooling can model Miller's surface
without scraping prose. The --json token may appear anywhere on a
`mlr help ...` command line; plain text help is unchanged.

  mlr help --json                  # full catalog
  mlr help verb cat --json         # one or more verbs
  mlr help function splitax --json # one or more functions
  mlr help flag --ifs --json       # one or more flags
  mlr help keyword ENV --json      # one or more keywords

Functions and flags serialize fully (name/class/arity/help/examples;
section/name/alt_names/arg/help). Verbs carry a summary, ignores_input,
and captured raw usage_text as a Tier-1 fallback, since per-verb options
are prose-only today (each verb hand-writes its UsageFunc). Structured
verb options are a planned follow-on (see #2098).

This is a serialization layer over the existing registries -- no
refactor of the text-help path.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 16:55:54 -04:00
..
completion Shell tab-completion for bash and zsh (#2096) 2026-06-21 12:47:54 -04:00
help Add machine-readable help catalog: mlr help --json (#2098) (#2099) 2026-06-28 16:55:54 -04:00
registry Shell tab-completion for bash and zsh (#2096) 2026-06-21 12:47:54 -04:00
regtest Performance and style fixes (#1981) 2026-02-18 09:19:31 -05:00
repl Replace GOCC parser-generator with PGPG (#2015) 2026-03-15 22:28:57 -04:00
script Experiment with mlr script (#2009) 2026-03-05 20:14:32 -05:00
doc.go Export library code in pkg/ (#1391) 2023-09-10 17:15:13 -04:00
terminals.go Shell tab-completion for bash and zsh (#2096) 2026-06-21 12:47:54 -04:00