Skip to main content

A simple CLI tool to run commands from a YAML file.

Project description

UnRun

PyPI downloads per month PyPI version GitHub last commit GitHub issues

🚀 A simple CLI tool to run commands from a YAML file.

Installation

pip install unrun

Usage & Features

Create an unrun.yaml file in your project root:

hello: echo "Hello, world!"
foo:
    bar: echo "This is foo bar"
baz: !and
    - echo "This is baz item 1"
    - echo "This is baz item 2"

Single Command

You can run a single command by specifying its key:

unrun hello

Run the command:

echo "Hello, world!"

Nested Command

You can run nested commands by specifying the full path:

unrun foo.bar

Run the command:

echo "This is foo bar"

List Command

To run all commands under a key that contains a list, you can simply specify the key:

unrun baz

Run the commands:

echo "This is baz item 1" && echo "This is baz item 2"

Supports !and, !or and !; YAML tags to combine commands.

Configuration

Configure Priority

  1. CLI arguments
  2. Environment variables: UNRUN_{key}
  3. local unrun.config.yaml
  4. global ~/unrun.config.yaml

Available keys

  • --file: Specify a custom YAML file (default is unrun.yaml).
  • --include: Include specified keys from the YAML file.
  • --exclude: Exclude specified keys from the YAML file.

License

MIT License

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

unrun-0.3.4.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unrun-0.3.4-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file unrun-0.3.4.tar.gz.

File metadata

  • Download URL: unrun-0.3.4.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for unrun-0.3.4.tar.gz
Algorithm Hash digest
SHA256 99fdc98b4500c9555a07ff36922c1de8115fa0135f45f630bdb368d87510ae9e
MD5 f58eae688d0a3012d5209a874dd12e83
BLAKE2b-256 2ca9e6524e4e8fc93ada209a6e4cceb00810898b9d85bf3db3a04c126ae6545e

See more details on using hashes here.

File details

Details for the file unrun-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: unrun-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for unrun-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8b432fd8932aee820644da53892160c17aabf12dfd35caf8c43e80e9e582147
MD5 caa3281f52905fa0f6f534401791408f
BLAKE2b-256 8b3b1ba82b9c61d99c35c88528cec04eba0e64abac5a15fddd65d8f20b83825d

See more details on using hashes here.

Supported by

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