{"id":13394695,"url":"https://github.com/dthree/cash","last_synced_at":"2025-05-13T19:03:08.287Z","repository":{"id":40591426,"uuid":"52287768","full_name":"dthree/cash","owner":"dthree","description":"Cross-platform Linux commands in ES6","archived":false,"fork":false,"pushed_at":"2020-01-14T08:48:46.000Z","size":368,"stargazers_count":7757,"open_issues_count":40,"forks_count":198,"subscribers_count":123,"default_branch":"master","last_synced_at":"2025-05-06T01:01:57.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dthree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-22T16:34:24.000Z","updated_at":"2025-04-29T15:29:37.000Z","dependencies_parsed_at":"2022-08-26T09:52:41.032Z","dependency_job_id":null,"html_url":"https://github.com/dthree/cash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthree%2Fcash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthree%2Fcash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthree%2Fcash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthree%2Fcash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dthree","download_url":"https://codeload.github.com/dthree/cash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010793,"owners_count":21998993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T17:01:28.505Z","updated_at":"2025-05-13T19:03:08.259Z","avatar_url":"https://github.com/dthree.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003e\n\t\u003cimg width=\"284\" src=\"http://i.imgur.com/tKrIdAI.jpg\" alt=\"Cash\"\u003e\n\t\u003c!--\u003cimg width=\"256\" src=\"http://i.imgur.com/oIN1WsM.jpg\" alt=\"Cash\"\u003e--\u003e\n\u003c/h1\u003e\n\n\n\u003e Cross-platform Linux commands in pure ES6\n\n[![Build Status](https://travis-ci.org/dthree/cash.svg)](https://travis-ci.org/dthree/cash/)\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/286om4y0wbxs69fy?svg=true)](https://ci.appveyor.com/project/dthree/cash)\n[![Coverage Status](https://coveralls.io/repos/dthree/cash/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/dthree/cash?branch=master)\n[![Gitter](https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg)](https://gitter.im/dthree/cash?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n\nCash is a cross-platform implementation of Unix shell commands written in straight ES6. No native compiling and no external dependencies.\n\nWhile young, Cash aims to offer an alternative Linux feel on Windows and to open the door to cross-platform bash scripting in a Javascript environment.\n\n```bash\n\u003e npm install cash -g\n\u003e cash\n$\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://i.giphy.com/xT0BKNwUPFhFj2glry.gif\" alt=\"Cash\" /\u003e\n\u003c/p\u003e\n\n\n### Woah.\n\nYeah. But it gets better. \n\nLet's mix some Windows \u0026 Unix commands together:\n\n```bash\n$ ipconfig | grep IPv4 | sort\nIPv4 Address. . . . . . . . . . . : 10.10.40.50\nIPv4 Address. . . . . . . . . . . : 192.168.100.11\n$\n```\n\n[Learn more](https://github.com/dthree/cash/wiki/Usage-|-Interactive)\n\n\n### But I don't want to type \"cash\"\n\nNo problem. Let's make all commands global on your system:\n\n```bash\n\u003e npm install cash-global -g\n\u003e ls -lah\n```\n\n[Learn more](https://github.com/dthree/cash/wiki/Usage-|-Global)\n\n\n### Nice, but I only want certain commands\n\nYou're covered!\n\n```bash\n\u003e npm install cash-ls -g\n\u003e npm install cash-grep -g\n```\n\n[Learn more](https://github.com/dthree/cash/wiki/Usage-|-Global#installing-individual-commands)\n\n\n### Wow. But I want this programmatically!\n\nAgain, you're in business:\n\n```js\nconst $ = require('cash');\nconst out = $.ls('.', {l: true});\n```\n\nNot terse enough? How about this:\n\n```js\nconst out = $('ls -lah');\n```\n\nNot :sunglasses: enough? Try this:\n\n```js\nrequire('cash') `\n  cp -R ./src ./dest\n  ls | grep *-spec.js | cat\n  rm ./specResults.html \n`;\n```\n\n*For even better programmatic Unix commands, check out [ShellJS](https://github.com/shelljs/shelljs).*\n\n[Learn more](https://github.com/dthree/cash/wiki/Usage-|-Programmatic)\n\n\n### Isn't this impossible to do in Node?\n\nIt was, before [Vorpal](https://github.com/dthree/vorpal).\n\nMade with ❤ by [dthree](https://github.com/dthree).\n\nLove it? Give it a :star: or a tweet to help spread the word!\n\n\n## Notice\n\nThis is now an [OPEN Open Source](http://openopensource.org/) project. I am not able to invest a significant amount of time into maintaining Cash and so am looking for volunteers who would like to be active maintainers of the project. If you are interested, shoot me a note.\n\n## Contents\n\n- [Introduction](#introduction)\n- [Supported commands](#supported-commands)\n- [Configuration (.cashrc)](#configuration)\n- [Contributing](#contributing)\n- [FAQ](#faq)\n- [Team](#team)\n- [License](#license)\n- [Wiki](https://github.com/dthree/cash/wiki)\n\n## Introduction\n\nCash is a project working on a cross-platform implementation of the most used Unix-based commands in pure JavaScript and with no external dependencies.\n\nThe 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.\n\nCash was built with strict attention to nearly exact implementations and excellent test coverage of over 200 unit tests.\n\n\n## Supported commands\n\nThe following commands are currently implemented:\n\n- alias\n- cat\n- clear\n- cd\n- cp\n- echo\n- export\n- false\n- grep\n- head\n- kill\n- less\n- ls\n- mkdir\n- mv\n- pwd\n- rm\n- sort\n- source\n- tail\n- touch\n- true\n- unalias\n\nWant more commands?\n\n- [Vote on the next commands](https://github.com/dthree/cash/wiki/Roadmap)\n- [Help spread the word:](http://bit.ly/1LBEJ5s) More knowledge of Cash equals more contributors\n- [Contribute](#contributing)\n\n\n## Configuration\n\nWant to configure things to your heart's content? Just add your configurations in a `.cashrc` file (`_cashrc` also works, for Windows folk) and put that in your home directory. This supports anything you can do inside a cash command prompt (`export`ing environmental variables, aliases, etc.).\n\n## Contributing\n\n- [Editing commands](https://github.com/dthree/cash/wiki/Contributing#editing-existing-commands)\n- [Adding new commands](https://github.com/dthree/cash/wiki/Contributing)\n\nWe are currently looking for Core Team members who can push forward Cash at a rapid rate. Are you an awesome developer up to the challenge? Send me a ping.\n\n### Awesome contributors\n\n- [@nfischer](https://github.com/nfischer): Added `source`, `export`, `true` and `false` commands, among several other contributions.\n- [@safinn](https://github.com/safinn): Added `clear` and `tail` commands.\n- [@legien](https://github.com/legien): Added `head` command.\n- [@cspotcode](https://github.com/cspotcode): Implemented template literal execution.\n\n## FAQ\n\n\n#### Why Cash?\n\nIn its very essence, Cash replaces the Windows CLI prompt (`\u003e`) with the Unix one (`$`), the dollar symbol. \n\nCash was most fitting in this sense: \n\n\u003e Ask and ye shall receive\n\n```\n\u003e cash\n$\n````\n\nCash is also a play on the word `bash`, and is actually[\\[1\\]](https://xkcd.com/906) a recursive acronym for Cash Shell.\n\nShout out to [@aseemk](https://github.com/aseemk) for donating the name.\n\n\n#### Doesn't ShellJS do this?\n\nNo.\n \nFor those who don't know, [ShellJS](https://github.com/shelljs/shelljs) is an awesome Node package that implements UNIX shell commands programatically in JavaScript. Check it out - really. While ShellJS was tremendously helpful in figuring out how to accomplish Cash, the two do not really conflict.\n\nShellJS gives the feel of UNIX commands in a code environment, but aims to implement the commands in a way that makes sense for a JavaScript library. This means that many commands return JavaScript objects, and some of the rougher and more dangerous edges of bash have been softened a bit.\n\nFor example, with cash:\n```javascript\n$('ls'); // 'node_modules\\n'\n\n$('echo foo \u003e foo.txt');\n```\n\nWith ShellJS:\n```javascript\nls(); // ['node_modules'];\n\necho('foo').to('foo.txt');\n```\n\n\n## Team\n\n| [![David Caccavella](https://avatars.githubusercontent.com/u/10319897?s=130)](https://github.com/dthree) | [![Nate Fischer](https://avatars.githubusercontent.com/u/5801521?s=130)](https://github.com/nfischer) |\n|:---:|:---:|\n| [David Caccavella](https://github.com/dthree) | [Nate Fischer](https://github.com/nfischer) |\n\nWant to join the team? [Let us know](mailto:threedeecee@gmail.com).\n\n## License\n\nMIT © [David Caccavella](https://github.com/dthree)\n","funding_links":[],"categories":["JavaScript","Packages","包","Uncategorized","Command-line apps","目录","terminal","Tools","CLI","Projects"],"sub_categories":["Command-line apps","命令行程序","Uncategorized","命令行应用","Node"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdthree%2Fcash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdthree%2Fcash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdthree%2Fcash/lists"}