Git Product home page Git Product logo

shellrb's Introduction

ShellRB - Unix shell commands using Ruby

Join the chat at https://gitter.im/shellrb/Lobby

master Build Status dev Build Status

ShellRB is a portable (Windows/Linux/OS X) implementation of Unix shell commands on top of the Ruby's modules. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands.

Inspired from ShellJS/Shx

Example

Here's a sneak peek at how it feels to use ShellRB.

SRB /> ls
bin
dev
initrd.img
lib64
mnt
root
snap
tmp
vmlinuz
...

SRB /> cd home
SRB /home>

Why ShellRB

I've been using Linux for my development environment ever since I jumped onto the open-source bandwagon. Often, I've wondered, what would people do if they really wanted to use a bash-like shell on Windows without the hassle of firing-up a Linux-based OS VM.

Enter ShellRB. The goal is to build a bash-like shell in Ruby that runs cross-platform, is easy to maintain (has tests for every feature), and is friendly to new contributors.

Installation

Make sure you have Ruby and git installed (pretty obvious, right?) and do not forget the Bundler gem.

On Linux/Mac OS

Clone the repository using git and cd into it.

git clone https://github.com/faraazahmad/shellrb.git
cd shellrb/

Install the required gems using bundler

bundle install

ShellRB is now installed. You can now run it using

ruby lib/app.rb

Contributing

The commands in ShellRB are made available using packages containing a class of their name. The packages can be found in "lib/packages/" directory. The packages in the directory are automatically requireed in the app. When adding a package, make sure to also add tests for it, with the maximum code coverage. We believe in Behaviour Driven Development.

Cheat Sheet

Currently, commands like cd, ls etc. are packages built using classes, whose objects return a Ruby Set, which is then printed to the console. The following commands have a working class right now:

  • cd
  • ls
  • sys
  • core

shellrb's People

Contributors

faheel avatar faraazahmad avatar gitter-badger avatar

Watchers

 avatar  avatar

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.