Skip to main content

A simple utility to run user defined commands

Project description


PyPI - Python Version PyPI PyPI - Wheel Build Status

A simple utility to run user defined commands.

Inspired by scripts in package.json of npm based projects.

Install package

pip install pearun


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:with_arg": "./ some_arg",
    "boolean": "echo \"TRUE/FALSE\"",
    "pyth": "python -c \"print(1 + 1)\""

See examples/ folder to try this Pearunfile.

Project details

Download files

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

Source Distribution

pearun-1.0.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

pearun-1.0.0-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page