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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pjclient

v1.1.7

Published

The Project Client is a command-line tool that you use to initialize, update and run any project.

Downloads

20

Readme

pjclient

The Project Client is a command-line tool that is used to initialize, update and run any project.

HOW TO CONFIGURE pjconfig.json

In pjconfig.json you can create more commands and for every of it you can define different options. For all commands and options you can add sub options.

  • commands: array of commands
  • options: array of options

Each of it can have this attributes:

  • name: used to match command or options, if it isn't present the command is every runned
  • cmd: contains the command executed
  • description: used to describe command or option

Which command can execute?

All terminal commands can executed directly:

  • start a server,
    • for example standalone.bat or standalone.sh for wildfly
  • download project from repository
    • for example git clone or svn co
  • update project
    • git pull or svn update
  • push docker image
    • docker push <user>/<image>:<version>
  • etc..

In addition you can run javascript with prefix : and create a custom module with a plugin.

INSTALLATION & USAGE

    npm install -g pjclient

Create project configuration

To create a configuration file you can use default command init

  pjclient init

at console you see

2019-06-06T16:21:12.532Z   pjclient running ...  
2019-06-06T16:21:12.534Z   ERROR: No configuration found pjconfig.json ( use init command to create template)!!! 
2019-06-06T16:21:12.534Z >>> init
The file was saved!

configuration file created by init command:

(pjconfig.json)

  {"commands":[{"name":"hello","cmd":"echo hello"}]}

If you run pjclient with "hello" command

   pjclient hello

you will see

  luca@enoz:~/provapjclient$ pjclient hello
  2019-06-06T16:25:57.690Z   pjclient running ...  
  2019-06-06T16:25:57.692Z >>> hello
  hello

  2019-06-06T16:25:57.698Z >>> fine comando!!

Define and use an environment variable

You can create an environment variable with nodejs process.env in this way

  {"cmd":":process.env.rootPath='/path/example'"},
  {"cmd":"echo $rootPat"}

NOTE: in this example you create a rootPath environment-variable with /path/example value.

DEFAULT COMMANDS

  init - init config file pjconfig.json
  help - show help
  commands
   list - lista all commands
  • init: create default pjconfig.json file
  • commands list: show the list of commands

EXTRA COMMANDS

In addiction to default command the pjclient provides any javascript function to manage files:

  • Replace text in a file
  ....
  "cmd":":fsTools.replaceText(inputFile,stringInFile,stringToReplace);"
  ....
  • Replace text for all files in a directory that match regex
  ...
  "cmd":":fsTools.replaceFiles(inputDir,regex,stringInFile,stringToReplace)"
  ...

CREATE A PLUGIN

If you want extends pjclient with new features, you would follow this step:

1. implement a javascript module

(pluginExample.js)

// plugin example
module.exports = {
    sum: function(a, b) { console.log(a + b); },
    subtract: function(a,b) { console.log(a-b); },
    multiply: function(a,b) { console.log(a*b); },
    divide: function(a,b) { console.log(a/b); }
};

2. define it on configuration file

(pjconfig.json)

{
    // here place commands ...
    "plugins":[
        {"name":"mioplugin","module":"<path>/pluginExample"}
    ]
}

NOTE: <path> is the place where module is saved.

3. use it in a command

(pjconfig.json)

    "commands":[
        {"name":"sum","cmd":":myPlugin.sum(1,2);"}
    ],
    "plugins":[
        {"name":"myPlugin","module":"pluginExample"}
    ]

NOTE: To use your plugin you must reference it with the attribute name {"name":"myPlugin","module":"pluginExample"}
on "cmd" {"name":"sum","cmd":":myPlugin.sum(1,2);"}

License

MIT

Collaborators