Skip to content

Instantly share code, notes, and snippets.

@Tynael
Last active April 1, 2025 13:22
Show Gist options
  • Save Tynael/0861d31ea17796c9a5b4a0162eb3c1e8 to your computer and use it in GitHub Desktop.
Save Tynael/0861d31ea17796c9a5b4a0162eb3c1e8 to your computer and use it in GitHub Desktop.
How to use npx to run gist based scripts
#!/usr/bin/env node
console.log("I was executed from a gist inside the terminal with npx!");
{
"name": "run-js-with-npx-from-gist",
"version": "1.0.0",
"bin": "./index.js"
}
@lmihaylov2512
Copy link

Great explanation of the differences between npm and npx 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment