Skip to content

Add npx-like behavior #157

Open
@renejfc

Description

@renejfc
I'm submitting this feature request encouraged by @marvinhagemeister on the Discord server.

Context

I was wondering if we could run packages "on the fly" similar to how npx, yarn dlx, pnpm dlx and bunx does.

Behavior

Basically, the expected behavior would be the same or similar as explained in the docs of the previously mentioned commands (npx for reference).

In other words, running the command will first search for the package locally. If it's found, it will run it directly. Otherwise, the command will temporarily fetch the package, run it, and then delete it after use.

Examples

I guess this will be discussed either here, in the pr or by the team but here are a few examples from the top of my head.

  • bunx jsrx @<namespace>/<package>
  • npx jsr:@<namespace>/<package>
  • And honestly that would be it. Feel free to comment more examples.

NOTE: I hope the idea is well conveyed and there wasn't a misunderstanding with the feature, feel free to comment what you think about it or ping me if want to add something to the post.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions