Skip to main content

♆ Rush: A Minimalistic Bash Utility

Project description

Rush 🏃

♆ Rush: A Minimalistic Bash Utility

img

Run all your task automation Bash commands from a single rushfile.yml file.

Features

  • Supports all bash commands
  • Option to ignore or run specific tasks
  • By default, runs commands in interactive mode
  • Option to catch or ignore command errors
  • Option to show or supress command outputs
  • Command chaining is supported (See the example rushfile.yml where task_2 is chained to task_1)

Installation

$ pip3 install rush-cli

Workflow

Rushfile

Here is an example rushfile.yml. It needs to reside in the root directory:

# rushfile.yml

task_1: |
    echo "task1 is running"

task_2: |
    # Task chaining [task_1 is a dependency of task_2]
    task_1
    echo "task2 is running"

task_3: |
    ls -a
    sudo apt-get install cowsay | head -n 0
    cowsay "Around the world in 80 days!"

//task_4: |
    # Ignoring a task [task_4 will be ignored while execution]
    ls | grep "ce"
    ls > he.txt1

task_5: |
    # Running a bash script from rush
    ./script.sh

Available Options

To see all the available options, run:

$ rush

or,

$ rush --help

This should show:

Usage: rush [OPTIONS] [FILTER_NAMES]...

  ♆ Rush: A Minimalistic Bash Utility

Options:
  -a, --all          Run all tasks
  --hide-outputs     Option to hide interactive output
  --ignore-errors    Option to ignore errors
  -p, --path         Show the absolute path of rushfile.yml
  --no-deps          Do not run dependent tasks
  --view-tasks       View task commands
  -ls, --list-tasks  List task commands with dependencies
  --no-warns         Do not show warnings
  -v, --version      Show rush version
  -h, --help         Show this message and exit.

Running Tasks

  • Run all the tasks

    $ rush --all
    
  • Run specific tasks

    $ rush task_1 task_4
    
  • Ignore specific tasks

    See the example rushfile.yml where the '//' before a task name means that the task will be ignored during execution

    # rushfile.yml
    
    //task_4: |
        echo "This task will be ignored during execution."
    

    This ignores the task named //task_4.

  • Run tasks non interactively (supress the outputs)

    $ rush --hide-outputs
    
  • Run tasks ignoring errors

    $ rush --ignore-errors
    
  • Do not run the dependent tasks

    $ rush task_2 --no-deps
    

Viewing Tasks

  • View absolute path of rushfile.yml

    $ rush --path
    

    output,

    /home/rednafi/code/rush/rushfile.yml
    
  • View task commands

    $ rush task_5 task_6 task_7 --view-tasks
    

    img

  • View task list with dependencies

    $ rush -ls
    

Quirks

  • Rush runs all the commands using /usr/bin/bash. So shell specific syntax with other shebangs might throw error.

  • If you are running Bash script from rush, use shebang (#!/usr/bin/env bash)

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

rush-cli-0.5.6.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

rush_cli-0.5.6-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file rush-cli-0.5.6.tar.gz.

File metadata

  • Download URL: rush-cli-0.5.6.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.2 CPython/3.8.1 Linux/5.0.0-1028-azure

File hashes

Hashes for rush-cli-0.5.6.tar.gz
Algorithm Hash digest
SHA256 11f340ccf1b5cc397b2d06aedd4becc2d82d3376b32b6a8c2233acb7ffab199c
MD5 fcbdd8ebe25ff255874d117be6b412e1
BLAKE2b-256 3dd42e5972642d703754d0cb98eed7cafc2984c0bfeb7e2ae6af8474c0a9fc3a

See more details on using hashes here.

File details

Details for the file rush_cli-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: rush_cli-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.2 CPython/3.8.1 Linux/5.0.0-1028-azure

File hashes

Hashes for rush_cli-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 672dfd51265e432ece71fd561a620b8dddacc04ae5fe5846e89d900cf9348913
MD5 cf9bf74c9c33aab62e78e17a3882c5a9
BLAKE2b-256 b0a16dc0af1bfded6c95586dbe96879147d454bf452f7235b22aa0b59a0ad970

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