A cross-platform Python CLI to shortcut tp command-line commands. Inspired by Makefiles and npm scripts.
Project description
rav
A cross-platform Python CLI to shortcut tp command-line commands. Inspired by Makefiles and npm scripts.
Create a rav.yaml
file
rav.yaml
scripts:
echo: echo "this is awesome"
server: venv/bin/python -m http.server
Or if on windows:
rav.yaml
scripts:
echo: echo this is awesome
win-server: venv\Scripts\python -m http.server
Or if you need a custom yaml file:
rav:
echo: echo "this is awesome"
server: venv/bin/python -m http.server
Basic Syntax
rav run <command>
rav.yaml
:
scripts:
<command>: echo "this is a command"
Basic Example
rav.yaml
:
scripts:
hello: echo hello world!
rav run hello
By default, rav run
will look for a rav.yaml
file in the current directory. You can customize it, with -f
as explained below.
Try the built-in Sample
rav sample create
This will output rav.sample.yaml
in the current directory.
rav run -f rav.sample.yaml echo
-f
is used to specify a custom rav file as documented below.
Run a command
rav run echo
Or
rav run server
Or (if windows):
rav run win-server 8080
Custom Rav File
Rav supports custom yaml files by default. The yaml declaration needs to be any of the following:
rav
scripts
commands
project.yaml
rav:
sweet: echo "this is working"
echo: echo "so is this"
rav.basic.yaml
scripts:
sweet: echo "this is working"
echo: echo "so is this"
rav run -f project.yaml sweet
or
rav run --file rav.other.yaml echo
Here's a few rules for custom files:
-f
or--file
is used to specify a custom rav file-f
or--file
must be used prior to the command shortcut name (e.g.rav run -f <your-new-file> <your-command>
)
Multiple Commands at Once
rav.yaml
scripts:
multi:
- echo this is
- echo awesome
- echo simple
- echo and
- echo easy
Run with:
rav run multi
This is the same as running:
echo this is && echo awesome && echo simple && echo and && echo easy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rav-0.0.2.tar.gz
.
File metadata
- Download URL: rav-0.0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a22ec778f8737ce85f7a8527149ea9fbede0c6f8a3722809384de41c9ae869b0 |
|
MD5 | cb7f3570182948770cbd6f5ea7d4ae8b |
|
BLAKE2b-256 | d26d6191633ee13cc438df689499557b973715b2090163be29417911a6f9b333 |
File details
Details for the file rav-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: rav-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11365830d7583e9d57867dc672e1c453ab5c8a3006f40149a278b69c504d6613 |
|
MD5 | 391c6ff3b490642c648d19f6a38be09e |
|
BLAKE2b-256 | 6659f5b98f3e5a06f3129a0b0e9b8bc9f794efa5d7b150cdf2f9e86235ccef15 |