Skip to content

feat: add description parameter to task args for --help output#957

Merged
thesayyn merged 2 commits intoaspect-build:mainfrom
sallustfire:feat/task-arg-description
Mar 10, 2026
Merged

feat: add description parameter to task args for --help output#957
thesayyn merged 2 commits intoaspect-build:mainfrom
sallustfire:feat/task-arg-description

Conversation

@sallustfire
Copy link
Contributor

Tasks already support a top-level description field shown in --help, but individual task args have no way to describe what they do. This means aspect --help shows flag names, types, defaults, and required status but no human-readable explanation. For tasks with several flags, users have to read the .axl source to understand what each arg controls.

This adds an optional description parameter to all args.*() functions so .axl authors can write:

  "output_dir": args.string(description = "Directory to write results to, if not provided STDOUT is used"),

The description is passed through to Clap's .help() and appears in --help output next to the flag.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: no
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: yes

Task arguments now accept an optional description parameter. The description is displayed in aspect --help output.

Test plan

There do not appear to be tests for this in the repo, but the functionally was manually tested:
a. Add description = "..." to an arg in a .axl file
b. Run aspect --help
c. Verify the description appears next to the flag
d. Verify args without description still work as before (backward compatible)

Allow .axl authors to provide human-readable descriptions for task
arguments via `args.string(description = "...")` etc. The description
is shown in `aspect <command> --help` output via Clap's `.help()`.
@sallustfire sallustfire force-pushed the feat/task-arg-description branch from 8291da8 to 9d2852e Compare March 8, 2026 20:05
@thesayyn thesayyn merged commit 09deca5 into aspect-build:main Mar 10, 2026
4 checks passed
@sallustfire
Copy link
Contributor Author

@thesayyn Thanks. If I make another PR, I'll set up rustfmt first.

@sallustfire sallustfire deleted the feat/task-arg-description branch March 10, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants