A simple utility to run user defined commands
Project description
Pearun
A simple utility to run user defined commands.
Inspired by scripts in package.json of npm based projects.
Install package
pip install pearun
Usage
User commands are parsed from Pearunfile which contains simple json dictionary.
It is possible to run inline shell commands or execute whole script files.
With your Pearunfile ready, you can list your commands by:
pearun -l or pearun --list
Or with -f/--file argument when your Pearunfile is not in your CWD:
pearun -f <path_to_Pearunfile> or pearun --file <path_to_Pearunfile>
To execute your command, simply type its name as an argument:
pearun hello_world
You can also append custom command line arguments after the command name:
pearun script:default my_custom_args
Pearunfile example
{
"hello_world": "echo \"Hello World!\"",
"script:default": "./script.sh",
"script:with_arg": "./script.sh some_arg",
"boolean": "echo \"TRUE/FALSE\"",
"pyth": "python -c \"print(1 + 1)\""
}
See examples/ folder to try this Pearunfile.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pearun-1.0.0.tar.gz.
File metadata
- Download URL: pearun-1.0.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfc51a90f91336f633f81588b65d8389e2781f2e5e5ddbb6ed1a3836d72cf2cf
|
|
| MD5 |
af82f33c21a6245cbb775429f5eebaee
|
|
| BLAKE2b-256 |
78cb5c741a8b3452d17485465c4554439143513c9148ce71edb220f8e4efb774
|
File details
Details for the file pearun-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pearun-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b4d99df8305baecbde6c97de3df68fd90a40dc6f6f3f196f89531edbb1db4ab
|
|
| MD5 |
f7ba03f84a644054e7140ffdc0159f9d
|
|
| BLAKE2b-256 |
539eff4b765655eb569367d1b1871809fb65a5cef15c4c37fe5204682fe8ca8b
|