Skip to main content

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 or pearun --help

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

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pearun, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pearun-0.1.1-py3-none-any.whl (4.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pearun-0.1.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page