pj
is a tool for quickly exploring JavaScript applications or libraries.
I created this tool because I found myself switching between lots of JS repos and figuring out what each of them is can be time consuming. My previous strategy was to cat package.json
. While cat
acomplished what I wanted, there was lots of noise, package.json
files often contain a lot of information that isn't necessary for my purpose, along with being organised in different ways in every project.
My goals are:
- See the scripts/commands available
- See the dependencies
Seeing those pieces of information at a glance quickly gives me an idea of what the project is and how to use it.
If you have Rust installed you can run the below instructions to have pj
installed to your path.
git clone https://www.github.com/tbillington/pj
cargo install --path pj
If you don't have rust, you can get the Rust installer here.
pj 0.2.0
Utility for quickly displaying package.json information
USAGE:
pj [FLAGS] [PATH]
FLAGS:
-d, --dependencies List dependencies instead of scripts
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<PATH> The project to examine. Current directory will be used by default
There are two main functions currently supported by pj
. The first and default option is to display the npm scripts available, and the second to display the dependencies.
Run pj
in the root directory containing package.json
.
Run pj -d
in the root directory containing package.json
.