Repository navigation
usage 6.1.0 - #300229
Merged
Merged
usage 6.1.0#300229
Conversation
chenrui333
approved these changes
Aug 23, 2026
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. Caution Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created by
brew bumpCreated with
brew bump-formula-pr.Details
release notes
{Enum}{Variant}struct you canimpl Runon.#[usage(run_async)]on the enum and#[usage(run)]on the variant that should not.await.#[usage(run, external = fallback)]forwards the unmatched argv (and context, ifrun_with).#[usage(run)]on a struct with--verboseand a required subcommand generatesrun_commandinstead ofimpl Run, so top-level flags are not dropped.#[usage(no_ctx)]plusrun_with_lazy/run_async_with_lazy(FnOnce() -> Ctx) lets commands likeversionavoid loading a config file.output = Typeexplicitly names the match'sOutputinstead of borrowing it from the first command.Runtime identity in help, and flatten-site headings (#1220)
parse()already overlays the embedder's computedname/bin.parse_fromcallers that rendered help throughCli::spec()did not.Cli::render_helpandCli::render_failurenow apply the same identity, so vendored parsers stop leaking the portableaubename into help and diagnostics.#[usage(flatten, next_help_heading = "…")]at the flatten site now groups the unheaded flags of a flattenedArgsstruct — matching clap's behavior — and reaches into subcommand help and generated KDL too.USAGECLI_*settings prefix (#1213 by @JamBalaya56562)Because Windows env-var names are case-insensitive,
USAGE_DEBUG(a usage-cli setting) collides withusage_debug(a spec's own flag), and mise clears everything starting withusage_before running a task — including usage-cli's settings. Settings can now be read underUSAGECLI_*:USAGECLI_SHELL_{BASH,ZSH,FISH,PWSH}USAGE_SHELL_*USAGECLI_DEBUGUSAGE_DEBUGUSAGECLI_TRACEUSAGE_TRACEUSAGECLI_LOGUSAGE_LOGFirst name set wins. As a side benefit,
USAGE_LOGis no longer written back into the environment withset_var, so a spawned script's ownlogargument survives.Fixed
long_helpas forhelp: source-wrapped lines become spaces, indented examples and fenced code blocks keep their breaks, andverbatim_doc_commentis untouched (#1215).Spec::to_kdlemits#"""…"""#raw multiline strings for values that contain newlines, so generated.usage.kdlno longer collapses multi-paragraph help into one giant escaped line (#1215).Changed
#[usage(...)].#[command(...)],#[arg(...)],#[value(...)],#[group(...)], and inner synonyms (id,default_value,conflicts_with,value_parser,last, …) still parse, but fail at the source span with a diagnostic telling you the native replacement. Implicit clap-style#[group(...)]generation for one-member groups is gone — requiredness comes from the field type orrequired.#[usage(run_async)]on an enum variant is now rejected while parsing the attribute.Documentation
Breaking Changes
#[usage(...)]. Any remaining clap-shaped attributes (#[command],#[arg],#[value],#[group], or their inner synonyms) will now fail to compile with a diagnostic pointing at the replacement. See the clap migration guide for before/after rewrites.#[group(...)]generation is gone. If you relied on it for requiredness, mark the fieldrequiredor use its type (e.g. non-Option) instead.Full Changelog: jdx/usage@v6.0.0...v6.1.0
💚 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
usagepowers 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.View the full release notes at https://github.com/jdx/usage/releases/tag/v6.1.0.