Hurry! helps you run your routine commands and scripts faster. It transforms commands like
docker-compose -f docker-compose.dev.yml up --build -d
into hurry up
.
Current version works with Python 3.4+ only.
pip3 install hurry
In the folder, where you want to use Hurry!, create hurry.json file with shortcuts:
$ cat ./hurry.json
{ "hello": "echo Hello, World!" }
Now you can use created shortcuts:
$ hurry --help
Usage:
hurry hello
$ hurry hello
Execute: echo Hello, World!
Hello, World!
Hurry! supports simple templating inside shortcuts with <template>
syntax:
$ cat ./hurry.json
{ "hello <name>": "echo Hello, <name>!" }
$ hurry --help
Usage:
hurry hello <name>
Quotes are unnecessarily, when you use one-word argument:
$ hurry hello OneWord
Execute: echo Hello, OneWord!
Hello, OneWord!
Quotes are mandatory, when you use many-words argument or argument that starts with dash(-es):
$ hurry hello "Many Words"
Execute: echo Hello, Many Words!
Hello, Many Words!
$ hurry hello "-words-starts-with-dash"
Execute: echo Hello, -words-starts-with-dash!
Hello, -words-starts-with-dash!
It's possible to use already created commands inside Hurry!:
$ cat ./hurry.json
{
"up": "docker-compose -f path/to/docker-compose.yml up -d",
"down": "docker-compose -f path/to/docker-compose.yml down",
"restart": "hurry down && hurry up"
}