Remembers those project specific long commands for you. Let the butler do it.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
shunit
tests
LICENSE
README.md
butler
butler-base.sh
butlerfile
complete.bash
complete.zsh
init.sh
test.sh

README.md

#Butler Turn:

bundle exec rails server foreman run python app.py db upgrade ...

into:

butler run or butler build or butler test.

Basically anything you do every day, let the Butler do it.

##Installation

Butler is easiest installed via homebrew:

> brew install michaeldfallen/formula/butler

Then run butler --init to create a sample butlerfile and get started.

###Bash and Zsh completion

To enable completion add the following to your ~/.bashrc or ~/.zshrc:

source "$(butler --init-completion)"

That will load the correct completion files for your shell.

##Usage

Create a butlerfile to define your commands

[command]: [shell command to run]

then tell butler to do it

> butler [command]
Executing [command]

The first time you ask butler to run a command it will confirm with you that the command is safe:

> butler [command]
First time executing [command]: [shell command to run]
Execute [command]? (y)es, (n)o, just this (o)nce

This way you can happily use other peoples butlerfile commands without worrying about them sneaking an rm -rf ~ in to the script.

###Setting the shell

By default butler will look at $SHELL, which is set by most shells including ZSH. This should mean that butler will automatically use your default shell to execute commands.

If $SHELL is not set it will fall back on Bash.

If you want to set a specific shell for butler to use just export $BUTLER_SHELL:

> echo 'BUTLER_SHELL="/bin/dash"' >> ~/.zshrc

###Longer scripts - coming soon

For longer scripts just drop them in a bin folder

project/
  bin/
    complexbuild
  ..

Butler will know what to do

> butler complexbuild
Aye, sir...

##License

Butler is licensed under the MIT license.

See LICENSE for the full license text.

##Credits

Inspired by Foreman by David Dollar @ddollar and Shoreman by Chris Mytton @chrismytton