Skip to content

A CLI tool that lets you browse and run npm, pnpm, yarn, or bun scripts from a local project.

Notifications You must be signed in to change notification settings

mohammedyh/np-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

np-run

A CLI tool that lets you browse and execute npm, pnpm, yarn, or bun scripts from a local project.

np-run-cli.mp4

Installation

To install the compiled version of the package run:

go install github.com/mohammedyh/np-run@latest
# or
go install github.com/mohammedyh/np-run@v0.1.0

Important

go/bin needs to be in your PATH to be able to run the command.

Add the following to your shell config file: export PATH="$PATH:$HOME/go/bin"

Once installed, simply run np-run

Build From Source

Clone the repo:

git clone https://github.com/mohammedyh/np-run

cd into the directory

cd ~/Dev/np-run

Build and output executable

go build

After compiling into an executable, you could move the executable file to somewhere suitable in your filesystem and create an alias in your shell to reference it.

For example - if you moved the executable to the .config folder:

alias np-run="~/.config/np-run"

Features

  • Display scripts in an interactive list which can be navigated through using vim motions or arrow keys
  • Auto-detect package manager from npm, pnpm, yarn and bun
  • Scripts are sorted in alphabetical order
  • Auto-install dependencies if package.json is found but node_modules isn't

Todo

  • Look at how to properly structure a Go program

About

A CLI tool that lets you browse and run npm, pnpm, yarn, or bun scripts from a local project.

Topics

Resources

Stars

Watchers

Forks

Languages