Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dizoftteam/dron
Small shell command executor
https://github.com/dizoftteam/dron
bash cmd go
Last synced: 3 days ago
JSON representation
Small shell command executor
- Host: GitHub
- URL: https://github.com/dizoftteam/dron
- Owner: DizoftTeam
- License: mit
- Created: 2020-11-03T09:43:09.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T05:51:48.000Z (almost 4 years ago)
- Last Synced: 2023-03-10T14:04:51.398Z (over 1 year ago)
- Topics: bash, cmd, go
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dron
Small shell command executor
No more raw `bash` scripts!
## How to use
Create config in `dron.yaml` and run!
Example of config see below```bash
dron
```> Development only!
> `dron -debug `### List of available commands
* `dron ` - Run specified command
* `dron -debug ` - Run specified command with debug info
* `dron -list` - Print list of commands name
* `dron -version` - Print application version## Installation
### ArchLinux
You can install it from [AUR](https://aur.archlinux.org/packages/dron/)
### Manual (Debian like. Redhat)
Requirements:
* [Go](https://golang.org/)
```bash
git clone https://github.com/DizoftTeam/dron.git
cd dron
go build -o dron main.go
# For all users
sudo ln -s /home//path/to/dron /usr/local/bin/dron
```## Example of config
File name `dron.yaml` or `dron.yml`
> All configs below is actual and work
> Do not use example file in a repository - this is only for development### v1.2.0 [05.11.2020]
```yaml
commands:
- name: up_www
args:
arg0: World
arg1: $env(APP_ENV)
arg2: $input
commands:
- echo Hello $arg0
- echo env_param_APP_ENV $arg1
- echo "arg0 $arg0 with quotes on end $arg1"
- echo "user input is $arg2"
```* Add support for `$input` command
* Getting user input like `[]>`### v1.1.0 [01.11.2020]
```yaml
commands:
- name: up_www
args:
arg0: World
arg1: $env(APP_ENV)
commands:
- echo Hello $arg0
- echo env_param_APP_ENV $arg1
- echo "arg0 $arg0 with quotes on end $arg1"
```* Add support for `$env` command
* If env param not find in system - error will be provided
* Bug fix — double quotes not removing after argument name
* If `.env` exist — it will be load automatically### v1.0.0 [31.10.2020]
```yaml
commands:
- name: up_www
args:
arg0: World
commands:
- echo Hello $arg0
```## Known troubles
* Each command will be executing from the current folder. Means that if you are using command like `cd` - the next
command will be running not from changed directory. To solve this problem you can
use `&&` (`cd /tmp && touch main.go`)## Contributing
If you found some issue - please welcome to [issue create page](https://github.com/DizoftTeam/dron/issues/new)