The dart run <package>@[<descriptor>] syntax was recently introduced (unifying descriptor parsing, see dart-lang/sdk#62123) to allow dynamic, one-off execution of remote packages from pub.dev, similar to npx in the Node ecosystem.
Currently, this feature is completely undocumented on dart.dev.
Specifically:
src/content/tools/dart-run.md: This page currently explicitly directs users to the legacy command: "To run a program from an arbitrary location, use the pub global command." This should be updated to explain the dart run pkg@ syntax.
- Tutorials / Guides: High-traffic guides like
dart-doc.md that currently instruct users to install one-off servers (e.g., dart install dhttpd) should be updated to recommend dart run dhttpd@ to avoid polluting the user's PATH with temporary tools.
The
dart run <package>@[<descriptor>]syntax was recently introduced (unifying descriptor parsing, see dart-lang/sdk#62123) to allow dynamic, one-off execution of remote packages from pub.dev, similar tonpxin the Node ecosystem.Currently, this feature is completely undocumented on dart.dev.
Specifically:
src/content/tools/dart-run.md: This page currently explicitly directs users to the legacy command: "To run a program from an arbitrary location, use the pub global command." This should be updated to explain thedart run pkg@syntax.dart-doc.mdthat currently instruct users to install one-off servers (e.g.,dart install dhttpd) should be updated to recommenddart run dhttpd@to avoid polluting the user'sPATHwith temporary tools.