https://github.com/pirj/toreman
Manage Procfile-based applications
https://github.com/pirj/toreman
foreman process-manager procfile
Last synced: 4 months ago
JSON representation
Manage Procfile-based applications
- Host: GitHub
- URL: https://github.com/pirj/toreman
- Owner: pirj
- License: mit
- Created: 2019-05-16T23:11:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T00:26:43.000Z (over 5 years ago)
- Last Synced: 2025-04-16T02:53:46.544Z (6 months ago)
- Topics: foreman, process-manager, procfile
- Language: Shell
- Homepage: https://github.com/pirj/toreman
- Size: 170 KB
- Stars: 19
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= Toreman
Toreman is a one'ish-line shell script https://github.com/ddollar/foreman[foreman] clone that is running processes in separate https://github.com/tmux/tmux[tmux] panes.
With tmux, interleaved output, and interactive debugging are not a problem anymore.
It's also possible to selectively stop/restart processes.
image::tiled.png[]
== 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.
[source,shell]
----
toreman even-vertical
----image::even-vertical.png[]
Available layouts are: `even-horizontal`, `even-vertical`, `main-horizontal`, `main-vertical`, `tiled` (default).
== Installation
If you're on macOS and are using https://brew.sh/[Homebrew], it's as easy as:
[source,shell]
----
brew install pirj/homebrew-toreman/toreman
----Otherwise, drop the `toreman` binary somewhere on your `$PATH`, or add an alias in your `rc` file:
[source,shell]
----
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 https://github.com/DarthSim/overmind[overmind] if you prefer 1600 lines of Go over one line of shell script, or other https://github.com/ddollar/foreman#ports[Foreman ports].
== Resources
https://fili.pp.ru/oneline-procfile-manager.html[Blog post].
https://www.reddit.com/r/ruby/comments/bpka4m/toreman_a_oneline_foreman_port_for_use_with_tmux/[Reddit thread].
== Author
https://fili.pp.ru[Phil Pirozhkov], software developer in law.
== License
Toreman is licensed under MIT License.