Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/melbahja/ron

Ron: A simple bash task runner to run any executable file inside a .ron directory or `ron.yaml` file!
https://github.com/melbahja/ron

bash bash-scripting build-automation cli command-line-tool deployment-automation go golang golang-tools makefile ron task-runner test-runner

Last synced: 2 months ago
JSON representation

Ron: A simple bash task runner to run any executable file inside a .ron directory or `ron.yaml` file!

Awesome Lists containing this project

README

        


Ron



The simple command line task runner.



Installation
Usage
Bash Autocomplete
License

## Installation

Start by download latest version for your OS:
```bash
# Linux
curl -fSL https://github.com/melbahja/ron/releases/latest/download/ron_linux -o ron

# MacOS
curl -fSL https://github.com/melbahja/ron/releases/latest/download/ron_macos -o ron

# Windows
curl -fSL https://github.com/melbahja/ron/releases/latest/download/ron_windows.exe -o ron.exe
```

Then make the binary executable and move it to bin path:
```bash
chmod +x ron
sudo mv ron /usr/bin/ron
```

for Gophers you can `go get github.com/melbahja/ron`.

## Usage

Ron is a very simple task runner that execute any executable file inside a `.ron` directory for example if you have this tree in your project:

```
.ron/
├── foo/
│   ├── .default
│   ├── bar
│   └── baz
├── .default
└── serve
```

`.default` file is the default executable for directories.

To execute `.ron/.default` run:
```bash
ron
```

To execute `.ron/serve` file run:
```bash
ron serve
```

To execute `.ron/foo/.default` run:
```bash
ron foo
```

To execute `.ron/foo/bar` run:
```bash
ron foo bar
```

Note: also you can use binary files inside `.ron` directory.

See Ron's [.ron](https://github.com/melbahja/ron/tree/master/.ron) directory.

## Bash Autocomplete

Add this to your bash profile (`.bashrc`):

```bash
_ron_bash_autocomplete() {
if [[ "${COMP_WORDS[0]}" != "source" ]]; then
local cur opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == "-"* ]]; then
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} ${cur} --generate-bash-completion )
else
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
fi
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
}

complete -F _ron_bash_autocomplete ron
```

## License

Ron is provided under the [MIT License](https://github.com/melbahja/ron/blob/master/LICENSE).