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

shell-factory-cocos

v1.0.5

Published

Common commands collection for shell-factory

Downloads

17

Readme

Shell-factory-cocos

Shell-factory-cocos (shell-factory common commands) extends the functionality of shell-factory by a set of commands generally used in shell scripts. This collection is by no means complete and should be extended by anyone who thinks something is missing :) At this point, this is a simple wrapper over shell-factory's Command-class. It does not apply any checks on the provided commands.

npm install shell-factory-cocos

Usage

Each of the supported commands can easily by called as a function. Additionally, the commands can be executed as root using the asRoot-, respectively notAsRoot-getter.

import { Script } from 'shell-factory';
import {
    echo,
    grep,
    sed,
} from 'shell-factory-cocos';

const script = new Script([
    echo('Hello World'),

    echo('Lets try to grep this command')
        .pipe(grep('-e', 'this'))
        .pipe(sed('-e', 's/this/that/g'))
        .asRoot,
]);

console.log(script.dump());
#!/bin/sh

echo "Hello World"
sudo echo "Lets try to grep this command" | grep -e this | sed -e s/this/that/g

Currently supported

At the moment the following commands are supported. Many of them were taken from the list of Unix commands on Wikipedia.

  • admin
  • alias
  • ar
  • asa
  • at
  • awk
  • basename
  • batch
  • bc
  • bg
  • cc
  • cal
  • cat
  • cd
  • cflow
  • chgrp
  • chmod
  • chown
  • cksum
  • cmp
  • comm
  • command
  • compress
  • cp
  • crontab
  • csplit
  • ctags
  • cut
  • cxref
  • date
  • dd
  • delta
  • df
  • diff
  • dirname
  • du
  • echo
  • ed
  • env
  • ex
  • expand
  • expr
  • fc
  • fg
  • file
  • find
  • fold
  • fort77
  • fuser
  • gencat
  • get
  • getconf
  • getopts
  • grep
  • hash
  • head
  • iconv
  • id
  • ipcrm
  • ipcs
  • jobs
  • join
  • kill
  • lex
  • link
  • ln
  • locale
  • localedef
  • logger
  • logname
  • lp
  • ls
  • m4
  • mailx
  • make
  • man
  • mesg
  • mkdir
  • mkfifo
  • more
  • mv
  • newgrp
  • nice
  • nl
  • nm
  • nohup
  • od
  • paste
  • patch
  • pathchk
  • pax
  • pr
  • printf
  • prs
  • ps
  • pwd
  • qalter
  • qdel
  • qhold
  • qmove
  • qmsg
  • qrerun
  • qrls
  • qselect
  • qsig
  • qstat
  • qsub
  • read
  • readlink
  • renice
  • rm
  • rmdel
  • rmdir
  • sact
  • sccs
  • sed
  • sh
  • sleep
  • sort
  • split
  • strings
  • strip
  • stty
  • tabs
  • tail
  • talk
  • tee
  • test
  • time
  • touch
  • tput
  • tr
  • tsort
  • tty
  • type
  • ulimit
  • umask
  • unalias
  • uname
  • uncompress
  • unexpand
  • unget
  • uniq
  • unlink
  • uucp
  • uudecode
  • uuencode
  • uustat
  • uux
  • val
  • vi
  • wait
  • wc
  • what
  • who
  • write
  • xargs
  • yacc
  • zcat
  • less
  • pushd
  • popd
  • chroot
  • mount
  • umount
  • history
  • bash
  • ssh
  • scp
  • passwd
  • set