Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-script-selector

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-script-selector

The NPM Script Selector is a CLI tool for discovering and running project scripts within package.json files.

  • 1.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44
increased by175%
Maintainers
1
Weekly downloads
 
Created
Source

License npm npm Donate to this project using Buy Me A Coffee wakatime

░█▀█░█▀█░█▄█░░░░░█▀▀░█▀▀░█▀▄░▀█▀░█▀█░▀█▀░░░░░█▀▀░█▀▀░█░░░█▀▀░█▀▀░▀█▀░█▀█░█▀▄
░█░█░█▀▀░█░█░▄▄▄░▀▀█░█░░░█▀▄░░█░░█▀▀░░█░░▄▄▄░▀▀█░█▀▀░█░░░█▀▀░█░░░░█░░█░█░█▀▄
░▀░▀░▀░░░▀░▀░░░░░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░░░░▀░░░░░░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░░▀░░▀▀▀░▀░▀

By: Justin Sunday
GitHub: sundayj/npm-script-selector
Website: JLSunday.com
NPM: npm-script-selector


NPM Script Selector

The NPM Script Selector is a CLI tool for discovering and running project scripts within package.json files. Have you ever worked on a project that contains so many scripts that you can't always remember the available options? That's what happened to me. I currently contribute to a project with 30+ scripts. I became tired of having to open the package file and/or IDE in order to find and run the needed scripts, so I created this small CLI.

Currently, you provide the path to the package.json file, the NPM Script Selector will then list the available scripts for you, where you can interactively select the one you want. It will then run the script for you within the selected project's directory. I plan to add more functionality in the near future.

Uses figlet, commander, and inquirer.


Sponsoring

If you like this package, please consider sponsoring:

Buy Me A Coffee

Feature Requests or Bugs

For feature requests, or bugs, please create an issue here


Features

  • Can be used as entry to other scripts.
  • Accepts path to a package.json as an input.
  • Lists scripts contained within that package.json.
  • Allows interactive selection of script.
  • Prints output from selected script.
  • Asks if you would like to run another script when the current one is finished.
  • App's title banner is customizable. Customize the font printed to the console when the CLI runs:
    • Change the words.
    • Change the font style. Font choices can be found here.

Future Features

  • Allow subcommands/options to be passed to selected scripts.
  • Option to search for package.json files within a directory.
  • Option to store the paths of frequently used files.
  • Option to run the selected scripts in a new window.
  • React GUI

Installation and Usage

Install NPM Script Selector with npm:

  npm i -g npm-script-selector

To run:

> npmss -f path/to/desired/package.json

For Help:

> npmss -h

Usage: npmss [options]

The NPM Script Selector is a CLI tool for discovering and running project scripts within package.json files.

Options:
  -V, --version               output the version number
  -f, --file <value>          Path to the package.json.
  -b, --banner <value>        Value for the title to be displayed to the user. (Replaces the NPM-Script-Selector banner.)
  -hb, --hide-banner          Use this flag if you'd like to not display a banner at all.
  -bf, --banner-font <value>  Pass the name of a font listed here to print the banner in the desired font. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/53d91777b0daa1b5b6b0beac63ab0b25126b7b13/types/figlet/index.d.ts#L2
  -h, --help                  display help for command

Path can be relative to current directory, or absolute.

NPM Script Selector Screenshot 20231025


Contributing

Bug reports and pull requests are welcome on GitHub at sundayj/npm-script-selector. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.


License

The package is available as open source under the terms of the MIT License.

Keywords

FAQs

Package last updated on 19 Feb 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc