Skip to content

Instantly share code, notes, and snippets.

@carlozamagni
Forked from Tynael/README.md
Created February 18, 2025 21:27
Show Gist options
  • Select an option

  • Save carlozamagni/c306a482b5fbdbdb3b117f9920c13a33 to your computer and use it in GitHub Desktop.

Select an option

Save carlozamagni/c306a482b5fbdbdb3b117f9920c13a33 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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment