-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
A-new-subcommandArea: new subcommandArea: new subcommandC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
Problem
There is no builtin support for running a command from a remote cargo package
Proposed Solution
$ cargo dlx --package [email protected] cowsay hello
_______
< hello >
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
$ ls ~/.cargox/
...Related FR
Notes
npx
Run a command from a local or remote npm package
https://docs.npmjs.com/cli/v11/commands/npx
details
$ npx --yes --package [email protected] cowsay hello
_______
< hello >
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
$ ls ~/.npm/
_cacache _logs _npx _update-notifier-last-checkednpm exec
https://docs.npmjs.com/cli/v11/commands/npm-exec
details
$ rm -rf ~/.npm \
&& cd `mktemp -d` \
&& npx --help \
&& npm exec --yes --package [email protected] cowsay hello \
&& ls ~/.npm
Run a command from a local or remote npm package
Usage:
npm exec -- <pkg>[@<version>] [args...]
npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
npm exec -c '<cmd> [args...]'
npm exec --package=foo -c '<cmd> [args...]'
Options:
[--package <package-spec> [--package <package-spec> ...]] [-c|--call <call>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[--workspaces] [--include-workspace-root]
alias: x
Run "npm help exec" for more info
_______
< hello >
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
_cacache _logs _npx _update-notifier-last-checkedyarn dlx
details
$ yarn dlx create-vite$ yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"$ yarn dlx -p [email protected] -- cowsay hello
...
_______
< hello >
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
$ ls ~/.yarn
berrypnpm dlx
details
$ rm -rf ~/.cache/pnpm \
&& pnpm dlx [email protected] hello \
&& ls ~/.cache/pnpm
Packages: +33
+++++++++++++++++++++++++++++++++
Progress: resolved 33, reused 0, downloaded 33, added 33, done
_______
< hello >
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
dlx metadata-v1.3deno run
https://docs.deno.com/runtime/reference/cli/run/
details
$ deno run --allow-all npm:[email protected] hello
_______
< hello >
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||bun
Nope.
Run a command from remote pypi package
uvx
https://docs.astral.sh/uv/guides/tools/#running-tools
details
$ rm -rf ~/.cache/uv && cd `mktemp -d` && uvx [email protected] hello && ls ~/.cache/uv
...
-----
< hello >
-----
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
CACHEDIR.TAG archive-v0 builds-v0 environments-v2 interpreter-v4 sdists-v9 simple-v18 wheels-v5Metadata
Metadata
Assignees
Labels
A-new-subcommandArea: new subcommandArea: new subcommandC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.