Run any script with privileged permissions, prompting the user with a graphical OS dialog if necessary
This package is under development (and slow one.. 😐) so feel free to help it by making a PR
Globally
npm install --global sudo-cli
Locally
npm install --save-dev sudo-cli
You need to provide the name of your application for your application (optional) and the command to be executed with privileged permissions.
$ sudo-cli --name "[your app name]" "<command to run>"
sudo-cli supports only ESM modules. For any issue regarding this, please visit this link https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
For support, email [email protected] or open an issue at sudo-cli issues.
Contributions are always welcome!
See CONTRIBUTING.md
for ways to get started.
Please adhere to this project's CODE_OF_CONDUCT.md
.
If you want to make PR please first check your code by:
- Run
pnpm i
to install dependencies - Build your source code by running
pnpm build
- Run
node ./bin/sudo-cli.js -n "test" "test"
and check results of your code