npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rs-runner

v1.2.1

Published

RS is a CLI tool for quickly detecting package.json scripts, and running them.

Downloads

479

Readme

RS - Run Scripts CLI

Why RS?

I'm sure there are other tools that do this, but I wanted to make one that is bare bones and easy to use.

RS was created to address my frustration with working in multiple projects that use different package managers and have various scripts defined, and to provide a simple and intuitive way to list and execute npm scripts without having to remember the exact syntax or navigate through your project's configuration.

  1. Package Manager Agnostic: RS automatically detects whether your project uses npm, yarn, pnpm, or bun, eliminating the need to remember or switch between different commands.

  2. Quick Script Discovery: Use rs or rs -l to instantly view all scripts, eliminating the need to search through package.json.

  3. Simplified Execution: Run any script with a simple rs <script-name> command, without needing to prefix it with npm run, yarn, or other package manager-specific commands.

  4. Global Scripts: RS allows you to define and run global scripts that are not defined in your project's package.json, making it easy to reuse common scripts across multiple projects.

Features

  • Automatically detects the package manager used in your project (npm, yarn, pnpm, or bun)
  • Lists all available scripts from your package.json
  • Runs scripts with a simple command

Installation

You can use RS in two ways: by installing it globally or by using it with npx.

Global Installation

To install RS globally, use the following command:

npm install -g rs-runner

Using npx

You can also use RS without installing it globally by using npx:

npx rs-runner <script>

Replace <script> with the name of the script you want to run.

Usage

Listing Scripts

To list all available scripts in your project, use the following command:

rs
rs -l

This will display a list of all scripts defined in your package.json file.

Running a Script

To run a specific script, use the following command:

rs <script>

Replace <script> with the name of the script you want to run.

Add Global Scripts

RS also supports running global scripts that are not defined in your local package.json. This is particularly useful for running scripts that you use across multiple projects.

To run a global script, use the following command:

`rs -a <key> <value>`

For example:

`rs -a hello "echo hello world"`

Delete Global Scripts

To delete a global script, use the following command:

`rs -d <key>`

For example:

`rs -d hello`

This will add a global script named "hello" that echoes "hello world" when run.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

Support

If you need help or have questions, please open an issue on the GitHub repository.