Yeoman generator to create a workspace for userscript easily.
Read this for more details.
First of all, make a new directory for your userscript.
$ mkdir my-script
$ cd my-script
Then follow one of the options below to create the files.
Please make sure your npm
is up to date because in earlier versions (e.g. 8.12.x) there was a bug that prevented npx
from installing the correct dependencies.
$ npm i npm -g
# Use the latest version from git
$ npx -p github:violentmonkey/generator-userscript -p yo yo @violentmonkey/userscript
$ pnpm --package github:violentmonkey/generator-userscript --package yo dlx yo @violentmonkey/userscript