Allow disabling dlx function globally with vpx

Ouverte
#2,880 5 commentaires 3 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@BlankParticle y travaille déjà.

Depuis le 5/10/2026.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
48/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
rust
Domaine
cli

Piste de recherche

Start by locating the vpx binary-resolution path in the CLI crate — the point where a missing local binary falls back to downloading from npm and executing. The config schema needs the new vpxDlxBehaviour option (allow/ask/deny), with non-interactive environments treating ask as deny, while vp dlx keeps its current behaviour. Read CONTRIBUTING.md for build and test steps; done means vpx cowsay prints the suggested message under deny and existing dlx tests still pass.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

contribution welcome enhancement
Description

Basically same as what Nub does https://x.com/colinhacks/status/2099827579817779683
When the config is set, if the current project doesn't have the bin installed and the user tries to do vpx <something>, don't try to download it from npm and execute

Suggested solution

there can be option like vpxDlxBehaviour = allow(default) | ask | deny which will figure out what needs to be done when vpx is invoked with a not installed package, in non interactive envs like for agents, ask will deny, vp dlx will still work, but its a more conscious choice which is saying download and execute this from npm

$ vpx cowsay

`cowsay` is not a installed binary in this project, if you meant to execute `cowsay` from npm, use `vp dlx cowsay`
Alternative

Hope you don't typo the package name or use the wrong binary name,
I have done it most with typescript, where I don't have typescript installed, I try to do vpx tsc which resolves to tsc on npm (which is a placeholder that warns about this exact thing)

Additional context

No response

Validations
  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.
Langage dominant
TypeScript
Étoiles
6.6k
Forks
303
Merge moyen
1 j 5 h
PR mergées (30 j)
212

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de voidzero-dev/vite-plus

Toutes les issues de voidzero-dev/vite-plus

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.