Skip to content

docs: clarify yarn dlx version and bin resolution behavior#7100

Open
jarvisz8 wants to merge 2 commits into
yarnpkg:masterfrom
jarvisz8:docs/dlx-behavior-clarify
Open

docs: clarify yarn dlx version and bin resolution behavior#7100
jarvisz8 wants to merge 2 commits into
yarnpkg:masterfrom
jarvisz8:docs/dlx-behavior-clarify

Conversation

@jarvisz8

@jarvisz8 jarvisz8 commented Apr 15, 2026

Copy link
Copy Markdown

Summary

  • document that yarn dlx accepts package versions in both the command and -p,--package forms
  • clarify the single-package fallback behavior when the requested command does not match an exposed binary
  • add focused examples for both cases

Closes #7083
Closes #7072

Why

Issue #7072 appears partially addressed in code already, but the generated command documentation still omits a couple of practical behaviors that matter in real use: version-qualified packages and the single-package fallback to the sole exposed binary. This keeps the change docs-only and source-backed from the current command implementation.

Testing

  • docs-only change to command metadata and examples
  • source-reviewed against packages/plugin-dlx/sources/commands/dlx.ts behavior

@@ -0,0 +1,2 @@
declined:
- "@yarnpkg/plugin-dlx" No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yarnpkg/cli and @yarnpkg/dlx need releases (because yarn dlx --help output changes)


By default Yarn will download the package named \`command\`, but this can be changed through the use of the \`-p,--package\` flag which will instruct Yarn to still run the same command but from a different package.

The package name can include a version (e.g., \`create-vite@4\`), which will install that specific version.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can take anything yarn add accepts? If so please further clarify that.

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.

dlx document missing 4 more cases

2 participants