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

@nexssp/command

v1.0.18

Published

Commands for not only Nexss Programmer

Downloads

31

Readme

@nexssp/command

15.01.2022 Upgrade - Now works also with import as module.

Easy repetable shell commands... just to save time.. for mulitpleOSes See examples below..

Note

This Nexss Programmer's plugin is the effect of the refactoring the Nexss Programmer @nexssp/cli which development has been started in 2018. Now this module can be also used as separate program without the Nexss Programmer.

You can do very easy backup of your commands and share as files are *.yml format.

Example

# adds command to the current folder config file
nexssp-command add npmup "npm version patch && git push && npm publish"

# adds to the global commands
nexssp-command add npmup "npm version patch && git push && npm publish" -g

# adds to the global commands for platform linux
nexssp-command add npmup "npm version patch && git push && npm publish" --plaform=linux -g

# it automatically recognizes platforms
nexssp-command npmup # runs command
nexssp-command npmup -g # runs global command

nexssp-command list # list commands
nexssp-command list # list global commands

nexssp-command delete npmup # delete command
nexssp-command delete npmup -g # delete global command

Install

npm i -g @nexssp/command

Now you can use nexssp-command.

Usage

Let say you wrote some big command and you do it everyday,.. just very often

echo 'myexample command which is long and repeatable' && ls && mkdir abc && cd abc && ls && echo 'this can be loooooong..'

Add Commands

# Below is the same as nexss programmer's `nexss cmd add nameOfCommand "echo ....`
nexssp-command add nameOfCommand "echo 'myexample command which is long and repeatable' && ls && mkdir abc && cd abc && ls && echo 'this can be loooooong..'"

Run Command

nexssp-command nameOfCommand
nexss cmd nameOfCommand # in the Nexss Programmer

List Commands

This is OS dependent. Please see advanced example below. You can specify different commands for different OSes. @nexssp/commands also recognize the different distros..

nexssp-command list # this will display list of available commands
nexss cmd list # in the Nexss Programmer

Delete commands

nexssp-command delete # this will display list of available commands
nexss cmd delete # in the Nexss Programmer

There is much more..

More advanced example

As you can see below you can specify different commands OS and even distro name and version dependent,

name: Advanced Example of @nexssp/commands
commands:
  win32:
    - name: init
      command: scoop install xpdf-tools
  linux:
    - name: init
      command-ALPINE3: apt-get -y install poppler-utils # specific distro (Alpine 3) more here: https://www.npmjs.com/package/@nexssp/os#distros-list
      command-ARCH: pacman -S --noconfirm xpdf # Like for every version of Arch
      command-UBUNTU: apt install xpdf # specific like below are always first, then global ones.
      command-UBUNTU18: apt install xpdfA
      command-UBUNTU20: apt install xpdfB
      command: apt-get -y install xpdf # this will be correct for distro with xpdf package. For eg. arch will be like above.
  darwin:
    - name: init
      command: brew install xpdf

Where commands are stored?

There are 2 kinds of commands. Global and local.

Global commands

Global commands are stored in your home directory. ~/.nexss/_nexss_global.yml on Linux and C:\Users\USER\.nexss\_nexss_global.yml.

Local commands

Local are stored in the current folder or the first parent folder which contains _nexss.yml file

You can specify custom global file by --global=myfilename