/breakit

⏲ Flexible mechanism to execute commands for a limited time.

Primary LanguageShellMIT LicenseMIT

⏲ breakit

Flexible mechanism to execute commands for a limited time.

Build Documentation Quality Template Coverage Mirror

💡 Idea

$ date
# Thu Jan  7 21:02:21
$ breakit after 10m -- server run --port=8080
$ breakit ps
# +--------------------------+----------------------------+----------+----------+
# | Process                  | Status                     | Since    | Until    |
# +--------------------------+----------------------------+----------+----------+
# | server run --port=8080   | exit 1; panic: database... | 21:02:36 | -        |
# +--------------------------+----------------------------+----------+----------+
# |                          |                            |    Total |        1 |
# +--------------------------+----------------------------+----------+----------+
$ breakit after 10m -- database run --port=5432
$ breakit after 10m delay 5s -- server run --port=8080
$ breakit ps
# +--------------------------+----------------------------+----------+----------+
# | Process                  | Status                     | Since    | Until    |
# +--------------------------+----------------------------+----------+----------+
# | database run --port=5432 | running                    | 21:04:09 | 21:14:09 |
# | server run --port=8080   | delayed                    | 21:04:30 | 21:14:25 |
# +--------------------------+----------------------------+----------+----------+
# |                          |                            |    Total |        2 |
# +--------------------------+----------------------------+----------+----------+

A full description of the idea is available here.

🏆 Motivation

...

🤼‍♂️ How to

...

🧩 Installation

Homebrew

$ brew install octolab/tap/breakit

Binary

$ curl -sSfL https://raw.githubusercontent.com/octolab/breakit/master/bin/install | sh
# or
$ wget -qO-  https://raw.githubusercontent.com/octolab/breakit/master/bin/install | sh

Don't forget about security.

Source

# use standard go tools
$ go get go.octolab.org/toolset/breakit@latest
# or use egg tool
$ egg tools add go.octolab.org/toolset/breakit@latest

egg is an extended go get.

Shell completions

$ breakit completion > /path/to/completions/...
# or
$ source <(breakit completion)

made with ❤️ for everyone