Code Monkey home page Code Monkey logo

cash's Introduction

Cash

Cross-platform Linux commands in pure ES6

Build Status Windows Build Status Coverage Status Gitter XO code style

Cash is a cross-platform implementation of Unix shell commands written in pure ES6.

Huh? Okay - think Cygwin, except:

  • No native compiling
  • No ugly DLLs
  • Works in any terminal
  • 1/15th of the size
  • Just:
> npm install cash -g
> cash
$

Cash

Woah.

Yeah. But it gets better.

Let's mix some Windows & Unix commands together:

$ ipconfig | grep IPv4 | sort
IPv4 Address. . . . . . . . . . . : 10.10.40.50
IPv4 Address. . . . . . . . . . . : 192.168.100.11
$

Learn more

But I don't want to type "cash"

No problem. Let's make all commands global on your system:

> npm install cash-global -g
> ls -lah

Learn more

Nice, but I only want certain commands

You're covered!

> npm install cash-ls -g
> npm install cash-grep -g

Learn more

Wow. But I want this programmatically!

Again, you're in business:

const $ = require('cash');
const out = $.ls('.', {l: true});

Not terse enough? How about this:

const out = $('ls -lah');

Learn more

Isn't this impossible to do in Node?

It was, before Vorpal.

Made with ❤ by dthree.

Love it? Cash is brand new! Give it a ⭐ or a tweet to help spread the word!

Contents

Introduction

Cash is a project working on a cross-platform implementation of the most used Unix-based commands in pure Javascript and with no external dependencies.

The goal of Cash is to open up these commands to the massive Javascript community for the first time, and to provide a cleaner, simpler and flexible alternative to applications like Cygwin for those wanting the Linux feel on Windows.

Cash was built with strict attention to nearly exact implementations and excellent test coverage of over 200 unit tests.

Supported commands

The following commands are currently implemented:

  • alias
  • cat
  • cd
  • cp
  • echo
  • grep
  • kill
  • less
  • ls
  • mkdir
  • mv
  • pwd
  • rm
  • sort
  • touch
  • unalias

Want more commands?

Contributing

I am currently looking for someone with experience in building Windows installers (.msi) to bundle Cash and its individual components into a self-contained wrapper. I you would like to help with this, send me a ping.

FAQ

Why Cash?

In its very essence, Cash replaces the Windows CLI prompt (>) with the Unix one ($), the dollar symbol.

Cash was most fitting in this sense:

Ask and ye shall receive

> cash
$

Cash is also a play on the word bash, and is actually[1] a recursive acronym for Cash Shell.

Shout out to @aseemk for donating the name.

Doesn't Shell.js do this?

No.

For those who don't know, Shell.js is an awesome Node app that implements Unix shell commands programatically in Javascript. Check it out - really. While Shell.js was tremendously helpful in figuring out how to accomplish Cash, the two do not really conflict.

Shell.js gives the feel of and approximates Unix commands in a code environment, but does not aim to precisely implement it. By example, Shell.js' ls command supports two arguments and returns an array. Cash supports seventeen arguments and strives to mirror the exact funcionality and output of the POSIX-compliant ls command.

License

MIT © David Caccavella

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.