An experiment in extending the command-line interface.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
book
docs
examples
packages/core
scripts
.gitignore
.travis.yml
CNAME
CONDUCT.md
Dockerfile
Gemfile
LICENSE
Makefile
README.md
TODO.md
_config.yml
book.json
package.json

README.md

bashlets

Build Status Read the Docs

/'baʃlɪt/

noun: A tiny piece of shell code.

Introduction

Bashlets is a new modular extensible toolbox for Bash, written in Bash.

The project is still in its early days, yet it is quite usable and the core features are already there: smart loading of modules, integration with git, partial OO support, and more.

The project has a threefold aim:

  • bringing together the largest possible corpus of useful pieces of reusable Bash code, with everything organized in as neat a fashion as we can think of
  • shielding the user from some of the Bash technicalities and idiosyncrasies
  • writing a consistent and portable API (well, kind of) towards the operating system

I want to stress the fact that this is not a generically-compliant POSIX shell project; on the contrary, the aim of the project is to write code that will run on (and require) Bash. As to the rest of the environment, however, the long-term goal is to get rid of dependencies on external tools as far as it is possible (or reasonable) to do so, even though at present the code does assume a reasonably standard GNU/Linux system.

Rationale

TODO

Contributing

Of course there is so much work to do, and I'd be delighted if somebody is willing to step in with code, enhancements, suggestions, and of course test cases and bug reports!

Requirements

A reasonably sane GNU environment is assumed to be at hand. More specifically, you need:

  • Bash
  • Git
  • GNU Coreutils
  • GNU grep, sed, awk
  • curl
  • the jq command-line JSON processor
  • Make

To run the test suite, you need Sam Stephenson's Bash Automated Testing System.

To check for proper programming, you need ShellCheck.

Extension packages may have additional requirements.

Installing

$ git clone https://github.com/reale/bashlets.git
$ cd bashlets
$ make install

That's all!

To run the test suite:

    $ make test

If you want to check for proper programming:

    $ make lint

Extensions

There is a growing corpus of additional packages available at Bashlet Packages. To install package package just do

    $ bashlets install -D package

Examples

See the Wiki.

Design Notes

TODO

Style Guide

TODO

Community

Bibliography

Reference Works

Bash Hacking

Bash Criticism

Special Topics

Tools

Collections of scripts

Frameworks

Special-purpose libraries