https://github.com/abiosoft/runcmd
Wrapper for cli apps. Write less commands.
https://github.com/abiosoft/runcmd
Last synced: 11 months ago
JSON representation
Wrapper for cli apps. Write less commands.
- Host: GitHub
- URL: https://github.com/abiosoft/runcmd
- Owner: abiosoft
- License: apache-2.0
- Created: 2016-02-07T01:34:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-08T08:08:59.000Z (over 10 years ago)
- Last Synced: 2025-03-18T06:51:35.876Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 43
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# runcmd
Wrapper for cli apps.
Write less commands for your frequent apps. Simple but useful.
### Install
```shell
$ go get github.com/abiosoft/runcmd
```
### Usage
This wraps `docker`, no need to type `docker`, just the commands.
```shell
$ runcmd docker
docker> -v
Docker version 1.10.0, build 590d5108
docker> run -it alpine sh
#/ |
```
This wraps `go`.
```shell
$ runcmd go
go> build -o outfile
go> test
...
```
You can include args or subcommands.
```shell
$ runcmd docker -H 127.0.0.1:8333 run
docker -H 127.0.0.1:8333 run> -it alpine sh
#/ |
```
Multiline
```shell
$ runcmd echo
echo> Hi \
... there
Hi
there
echo> << EOF
... Hi
... there
... EOF
Hi
there
```
Custom Environment Variables
```shell
runcmd go
go> .env GOOS linux
go> build
```
Inbuilt commands starts with `.` to avoid collision with the wrapped cli app.
```
.env list/add environment variable
.switch switch to another command
.clear clear screen
.help show this help
```
### Demo