
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
npm-scripts-gui
Advanced tools
This project has been renamed Screwy
A GUI interface for npm scripts.
Tested on OS X Yosemite, OS X El Capitan, and Ubuntu
Install as a Dev Dependency
npm i -D npm-scripts-gui
...Or Install Globally
npm i -g npm-scripts-gui
Installing as a dev dependency allows anyone who downloads your project to also get access to the gui... for free!
To launch Npm Script GUI (NSG), you must be in a directory with a package.json file.
If Installed Globally
Then simply run:
npm-script-gui or the shorter nsg
If Installed as a Dev Dependency (Recommended)
You must create an npm script task in the package.json that runs the nsg command and then you would run npm run <command_name> from the terminal.
{
"scripts": {
"nsg": "nsg"
}
}
Whether NSG is installed globally or as a dependency, any text output associated with any npm script task will be printed to the command line where NSG was launched.
To quit the app, it is safer to close the actual renderer window rather than quiting the process from the command line. If quiting from the command line, NSG may not do the check to make sure all processes are killed before closing.
Processes will die automatically when they finish or when the app is closed, but there may be times when you want to manually kill a process. Simply double click the button.
You can also use the KILL command with file watching and hotkeys.
You can tell NSG to watch files and how to respond to those changes. You need to create a watch block in the .nsgrc file. You can watch directories, files, and use the * and ** wildcards.
After specifying a path, you need to specify which npm script task to respond to the file change and how it should respond. There are 3 options regarding the type of action to perform:
START (default, may be excluded)KILLRESTART (if the task is running, this will kill it and start it)NOTE: A whitespace is required after any of the keywords.
Example:
{
"watch": {
"src/scripts/*.js": "RESTART transpile-scripts",
"./index.js": "RESTART start-server",
"src/styles": "stylus"
}
}
In the example, the first watcher will restart the transpile-scripts task when any .js files are changed at src/scripts. The second watcher will apparently restart the server when the index.js file is changed. The last watcher will run START stylus (START is default).
Hotkey combinations are configurable in the .nsgrc file. These allow you to trigger any npm scripts without needing to even click on the button or even being focused on the GUI window.
Again, you can have the GUI window minimized and the hotkeys will still trigger button clicks, and output will be sent to the terminal.
Hotkeys are defined in the .nsgrc file. They require the name of the npm script as the key and the hotkey combination as the value.
Just as with file watching, the START, RESTART, and KILL commands may be used with the npm task name.
Note: As of v0.0.17, the order of the hotkey/npm command has switched to match the file watching format. The hotkey combo should now come first.
{
"hotkeys": {
"Control+Cmd+Alt+s": "start",
"Control+Cmd+Alt+r": "RESTART start",
"Control+Cmd+Alt+k": "KILL start"
}
}
In the above example, assuming the start command's job is to spin up a server, then Control+Cmd+Alt+s would start the server if it wasn't on, Control+Cmd+Alt+r would restart it if it was running, and Control+Cmd+Alt+k would shut it down.
If you expect others to run NSG on a different platform than you are developing on, you will need to specify the platform to avoid conflicts.
For Mac, use: OSX or darwin
For Linux, use: linux
{
"hotkeys": {
"darwin": {
"Control+Cmd+Alt+s": "start",
"Control+Cmd+Alt+r": "RESTART start",
"Control+Cmd+Alt+k": "KILL start"
}
}
}
More hotkey examples are in the Configurations section.
NSG will automatically search for a .nsgrc in the same directory as the package.json. It should be in json format.
These are the available options:
package.json.nsgrc Example
{
"name": "Qualtrics to SFDC",
"primary": ["build", "run-production", "run-sandbox"],
"exclude": ["scripts-gui", "prebuild"],
"silent": ["lint", "test"]
"alwaysOnTop": true,
"theme": "dark",
"watch": {
"src/scripts/*.js": "RESTART production",
"src/styles": "RESTART stylus"
},
"hotkeys": {
"Control+Alt+b": "build",
"Shift+Command+1": "run-production",
"Shift+Command+2": "run-sandbox",
"Control+Cmd+Alt+r": "RESTART run-production",
"Control+Cmd+Alt+k": "KILL run-production"
}
}
Any script not specified in primary or exclude will show up as a normal button.
FAQs
GUI for npm scripts
The npm package npm-scripts-gui receives a total of 4 weekly downloads. As such, npm-scripts-gui popularity was classified as not popular.
We found that npm-scripts-gui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.