Added
- Embedded parse outcomes.
embedded::outcomeand the derive-generatedCli::embedded_outcome/embedded_outcome_intolet N-API, WASM, editor, and test-runner hosts parse without terminating the process, returning a renderedOutcome::Exitwith stream and clap-compatible status (#1250, #1270, #1281). - Structured diagnostic reports.
diagnostic::reportreturns a stableCode, subject, and optionalArgvSpan(index plus byte offsets intoOsStr) so hosts can label parse failures without scraping terminal text (#1255). - Opt-in response files.
usage::response::expandpre-parses@filearguments with shell-style quoting, nested includes,@@escaping, and cycle detection — kept off the zero-allocation parse path (#1259). - Ordered argument groups.
#[usage(multiple)]on anArgGroupenum collects related flags like-A/-W/-DintoVec<T>in argv order (#1271). - Value-carrying argument groups.
ArgGrouptuple variants now declare one value-taking flag (Migrate(Source),StdinFilepath(PathBuf)), bound throughFromStr, lossless path conversion, orValueEnum(#1253). - Typed command finalization.
#[usage(validate_with = …)]runs command-wide invariants after field conversion, and#[usage(try_into = DomainType)]addsparse_into*entry points that finalize throughTryFrom(#1254). - Runtime-computed defaults.
default_fnevaluates a typed default at parse time, withdefault_notefor help prose that describes it honestly (#1256). - Dynamic command catalogs. New
usage-dynamiccrate merges runtime-discovered plugin specs into a derived host's help, completion, and parsing viaCatalog::builder, attaching to a staticexternal_subcommandcatch-all (#1275). - Addressable help topics.
help::topicsandhelp::render_topicrender a single standard orhelp_headingsection without inventing fake subcommands (#1257). - Inline formatting in help text. Coloured
--helprenders Markdown-style bold, italic, inline-code, and strikethrough spans in prose, leaving plain and piped output unchanged (#1245). - Elvish shell completions. Elvish joins bash, zsh, fish, PowerShell, and Nushell as a first-class completion target (#1243).
- Semantic completion candidates. Candidates carry a
kind(Command,Flag,File,Directory,Value) so PowerShell can use nativeCompletionResulttypes, plus adisplaylabel so zsh and PowerShell can show a richer name while insertingvalue(#1239, #1242). - Path extension filters. Specs declare
type="path:toml,yaml"(or use.extensions("toml", "yaml")onFilePath/AnyPath) and every generated completion script filters accordingly; directories still traverse (#1240). - Completion traces. Public
CompletionTracerecords words, prefix, command path, cursor owner, separator state, candidates, and shell path fallback for a Tab answer (#1241). - Grouped help template sections.
{{grouped_args}},{{ungrouped_args}},{{grouped_flags}}, and{{ungrouped_flags}}let templates interleave namedhelp_headinggroups with default lists (#1251). - Section prose on headings.
heading("Ignore Files", help = "…")(andheading "Title" help="…"in KDL) puts a sentence under a named section, next to the entries it explains (#1282). - Command outputs, exit codes, and media types. Specs declare
outputblocks with text/JSON/JSONL framing, selectors, defaults, JSON Schemas (includingschema file="…"), an optionalmedia_type, and documentedexitcodes — surfaced through derives, MCP, generated Python/TypeScript SDKs, Markdown, and manpages (#1249, #1274). - Semantic note and warning blocks.
#[usage(note = "…", warning = "…")](or KDLnote/warningchildren) render as labeled admonitions in long help and portable Markdown blockquotes (#1273). - Surface availability metadata.
#[usage(surface = "…", available_if(…))]carries descriptive audience labels through KDL, JSON, docs, and conformance tables without changing parse behavior (#1258). - Overridable Markdown templates.
MarkdownRenderer::with_templateand theusage generate markdown --template NAME=PATHflag replace individual bundled Tera templates while unchanged ones remain available via{% include %}(#1267).
Changed
- Compact Markdown references by default. Generated Markdown now uses
MarkdownTheme::Compact— dense grouped lists instead of one heading per argument or flag, with title-cased metadata labels, "Output Formats" instead of "Output", and long output catalogs collapsed behind<details>. The previous layout isMarkdownTheme::Detailed(#1272, #1280). - Redesigned command lists on
-hand--help. Rows now show one aligned column of leaf names plus a short summary; usage syntax and children's fulllong_helpstay on their own pages. mise's root--helpdrops from hundreds of lines to 136 (#1284). - Short help wraps. Descriptions and annotations like
[env: …]no longer run off the terminal on-h; they join first and wrap into the description column together, matching what--helphas always done (#1287). - Long-help annotations align to the description column.
[possible values: …],(default: …), and env notes now sit under the description they qualify instead of at a fixed four-space indent (#1291).
Fixed
- Attached completion values.
--format=jnow completes as--format=json— static choices, named completers, and runtime overlays route through the attached-value context. Generated specs also materialize the parser-supplied help/version spellings asbuiltin=#trueflags so listings and completions see them (#1277). - Flattened command metadata. Outputs,
select, and exit codes declared on flattenedArgstypes survive spec emission (including nested flatten) (#1268). - Typed defaults with restricted choices. Choice validation now runs only on values from argv or environment variables, so a
default_fnmay return an empty or non-advertised typed value (#1269). - Override does not erase an invalid choice.
mise --log-level=v --traceused to be accepted by usage-argv (and usage-go) because the post-binding choice check sat inside thegivenguard thatoverridesclears. Both parsers now judge a displaced flag's leftover choice like usage-lib and clap do; Go exports a matchingCheckDisplaced(#1286). - KDL writers agree on three more nodes.
write_groupquotes dashed members ("--allow"not--allow),cmdwriteshelp_headingbeforehelp, and rootbefore_help/after_helpmove earlier and into before-then-after order. A maximal fixture now covers every node both writers emit (#1289). - Generated partial fields no longer trip Clippy.
#[expect(clippy::pub_underscore_fields)]onPartialstructs keeps internal fields public for cross-module flattening without noisy adopter lints (#1278). - Nushell completion. Replaces deprecated
str downcaseusage on Windows so case-insensitive command matching keeps working (#1262 by @TheBearodactyl).
Performance
- Skip empty admonition contexts in Markdown rendering, clawing back most of the cost added by note/warning blocks (#1279).
- Reduce sort code size in the argv hot path (#1264).
New Contributors
- @TheBearodactyl made their first contribution in #1262
💚 Sponsor usage
usage is maintained by @jdx, an open source developer for entire.io, the title sponsor of the jdx.dev open source tools including mise, aube, hk, and more. Work on usage is funded by sponsorships.
If usage powers CLI specs, docs, or completions for a tool you maintain or use, please consider sponsoring at jdx.dev. Every sponsorship helps the project stay independent and moving.