Skip to content

pirj/toreman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toreman

Toreman is a one’ish-line shell script foreman clone that is running processes in separate tmux panes.

With tmux, interleaved output, and interactive debugging are not a problem anymore.

It’s also possible to selectively stop/restart processes.

tiled

Usage

In a running tmux session, from a directory containing Procfile, run toreman. It will parse your Procfile and run each entry in a separate split.

Use C-b h/j to navigate between panes, and C-b z to toggle full-screen zoom.

It’s possible to specify a layout as a first argument to toreman, e.g.

toreman even-vertical
even vertical

Available layouts are: even-horizontal, even-vertical, main-horizontal, main-vertical, tiled (default).

Installation

If you’re on macOS and are using Homebrew, it’s as easy as:

brew install pirj/homebrew-toreman/toreman

Otherwise, drop the toreman binary somewhere on your $PATH, or add an alias in your rc file:

alias toreman="grep --invert-match '#' < Procfile | sed -e 's/^[^:]*: //' | xargs -I {} tmux split-window -v \; send-keys '[ -s .env ] && source .env; {}' 'C-m' && tmux select-pane -t 1 \; send-keys 'C-d' \; select-layout ${1:-tiled}"

Alternatives

Check out overmind if you prefer 1600 lines of Go over one line of shell script, or other Foreman ports.

Resources

Author

Phil Pirozhkov, software developer in law.

License

Toreman is licensed under MIT License.