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

manager-cli

v1.0.3

Published

Manager-cli is a custom manager command based in NodeJs. It can be configured with a single JSON and from it, generates all possible commands. It's installed as a global module.

Downloads

1

Readme

manager-cli

Manager-cli is a custom manager command based in NodeJs. It can be configured with a single JSON and from it, generates all possible commands. It's installed as a global module.

Contents

1 Download from Github

git clone https://github.com/jserra91/manager-cli.git
cd manager-cli
npm i && npm run build

2 Install from npm

npm i -g manager-cli

3 JSON

In the user folder create a manager-cli.json with this strcture:

{
  "actions": [
    {
      "id": 1, <- Unique ID
      "name": "generate", <- Command
      "shortcut": "g", <- Shortcut
      "execute": "", <- Internal execute command
      "parent": 0, <- Parent
      "childs": false, <- have childs?
      "helper": "This is a simple test helper1" <- Helped
    },
  ]
}

For example:

{
  "actions": [
    {
      "id": 1,
      "name": "generate",
      "shortcut": "g",
      "execute": "",
      "parent": 0,
      "childs": true,
      "helper": "This is a simple test helper1"
    },
    {
      "id": 2,
      "name": "create",
      "shortcut": "c",
      "execute": "",
      "parent": 1,
      "childs": true,
      "helper": "This is a simple test helper2"
    },
    {
      "id": 3,
      "name": "prepare",
      "shortcut": "p",
      "execute": "mkdir C:\\Serra\\prepare",
      "parent": 1,
      "childs": false,
      "helper": "This is a simple test helper3"
    },
    {
      "id": 4,
      "name": "now",
      "shortcut": "n",
      "execute": "mkdir C:\\Serra\\now",
      "parent": 2,
      "childs": false,
      "helper": "This is a simple test helper4"
    }
  ]
}

With this example you can execute this commands:

manager-cli generate create now
manager-cli generate prepare

With first command create a folder now in C:\Serra\ . With second command create folder prepare

Or with shortcuts:

manager-cli g c n
manager-cli g p

4 Other examples

4.1 For developers

{
  "actions": [
    {
      "id": 1,
      "name": "create",
      "shortcut": "c",
      "execute": "",
      "parent": 0,
      "childs": true,
      "helper": "This is a simple test helper2"
    },
	{
      "id": 2,
      "name": "vuejs",
      "shortcut": "v",
      "execute": "",
      "parent": 1,
      "childs": true,
      "helper": "This is a simple test helper2"
    },
	{
      "id": 5,
      "name": "application",
      "shortcut": "a",
      "execute": "cd C:\\vuejs && vue create application-example -d",
      "parent": 2,
      "childs": false,
      "helper": "test helper"
    },
	{
      "id": 9,
      "name": "angular",
      "shortcut": "a",
      "execute": "",
      "parent": 1,
      "childs": true,
      "helper": "T"
    },
    {
      "id": 10,
      "name": "project",
      "shortcut": "p",
      "execute": "cd C:\\angular && ng new project angular-test",
      "parent": 2,
      "childs": false,
      "helper": ""
    },
	{
      "id": 11,
      "name": "install",
      "shortcut": "a",
      "execute": "npm i -g @angular/cli && npm i -g vue-cli",
      "parent": 1,
      "childs": false,
      "helper": "T"
    }
  ]
}

Commands:

manager-cli c v a    <- Create Vuejs project
manager-cli create vuejs application    <- Create Vuejs project
manager-cli c a p    <- Create Angular project
manager-cli create angular project    <- Create Angular project
manager-cli install    <- Install @angular/cli and vue-cli (global)

4.2 For your company

Download from Git and modify "bin" in package.json

  ...
  "bin": {
    "my-company": "./bin/global.js"
  },
  ...

and upload in your repo

  npm login && npm publish
{
  "actions": [
    {
      "id": 1,
      "name": "create",
      "shortcut": "c",
      "execute": "",
      "parent": 0,
      "childs": true,
      "helper": "This is a simple test helper2"
    },
	{
      "id": 2,
      "name": "vuejs",
      "shortcut": "v",
      "execute": "",
      "parent": 1,
      "childs": true,
      "helper": "This is a simple test helper2"
    },
	{
      "id": 5,
      "name": "application",
      "shortcut": "a",
      "execute": "cd C:\\vuejs && vue create application-example -d",
      "parent": 2,
      "childs": false,
      "helper": "test helper"
    },
	{
      "id": 9,
      "name": "angular",
      "shortcut": "a",
      "execute": "",
      "parent": 1,
      "childs": true,
      "helper": "T"
    },
    {
      "id": 10,
      "name": "project",
      "shortcut": "p",
      "execute": "cd C:\\angular && ng new project angular-test",
      "parent": 2,
      "childs": false,
      "helper": ""
    },
	{
      "id": 11,
      "name": "install",
      "shortcut": "a",
      "execute": "npm i -g @angular/cli && npm i -g vue-cli",
      "parent": 1,
      "childs": false,
      "helper": "T"
    }
  ]
}

Commands:

my-company c v a    <- Create Vuejs project
my-company create vuejs application    <- Create Vuejs project
my-company c a p    <- Create Angular project
my-company create angular project    <- Create Angular project
my-company install    <- Install @angular/cli and vue-cli (global)

5. Thanks to...

  • Martin (stackoverflow) https://stackoverflow.com/questions/53322117/nodejs-javascript-readfilesync