All Projects → kjkuan → taskit

kjkuan / taskit

Licence: GPL-3.0 license
A Task Runner in Bash

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to taskit

Maid
Markdown driven task runner.
Stars: ✭ 1,999 (+5611.43%)
Mutual labels:  gulp, task, runner
lets
CLI task runner for developers - a better alternative to make
Stars: ✭ 50 (+42.86%)
Mutual labels:  task, runner, make
broom
A disk cleaning utility for developers.
Stars: ✭ 38 (+8.57%)
Mutual labels:  ant, rake, make
up
UP - Ultimate Provisioner CLI
Stars: ✭ 43 (+22.86%)
Mutual labels:  task, ant, make
Bake
Bake is a bash task runner
Stars: ✭ 27 (-22.86%)
Mutual labels:  task, runner
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+2457.14%)
Mutual labels:  task, make
Runner
Simple, lightweight task runner for Bash.
Stars: ✭ 133 (+280%)
Mutual labels:  task, runner
Task Easy
A simple, customizable, and lightweight priority queue for promises.
Stars: ✭ 244 (+597.14%)
Mutual labels:  task, runner
Drome
JavaScript task runner
Stars: ✭ 135 (+285.71%)
Mutual labels:  task, runner
Phulp
The task manager for php
Stars: ✭ 294 (+740%)
Mutual labels:  gulp, task
nano-staged
Tiny tool to run commands for modified, staged, and committed files in a GIT repository.
Stars: ✭ 347 (+891.43%)
Mutual labels:  task, runner
EasyJob
🔨 EasyJob - keep and execute your PowerShell and BAT scripts from one interface
Stars: ✭ 228 (+551.43%)
Mutual labels:  task, runner
Mask
🎭 A CLI task runner defined by a simple markdown file
Stars: ✭ 495 (+1314.29%)
Mutual labels:  task, make
Task
A task runner / simpler Make alternative written in Go
Stars: ✭ 4,282 (+12134.29%)
Mutual labels:  task, make
Flowa
🔥Service level control flow for Node.js
Stars: ✭ 66 (+88.57%)
Mutual labels:  task, runner
tasuku
✅ タスク — The minimal task runner for Node.js
Stars: ✭ 1,488 (+4151.43%)
Mutual labels:  task, runner
Nake
Magic script-based C# task runner for .NET Core
Stars: ✭ 183 (+422.86%)
Mutual labels:  task, runner
Asynctasks.vim
🚀 Modern Task System for Project Building, Testing and Deploying !!
Stars: ✭ 495 (+1314.29%)
Mutual labels:  ant, make
Phing
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.
Stars: ✭ 1,085 (+3000%)
Mutual labels:  ant, make
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (-25.71%)
Mutual labels:  gulp, make

Taskit

Taskit is a task runner written in Bash that is similar, in spirit, to other tools such as rake, fabric, or gulp. It lets you define tasks as functions, with declared parameters and other attributes, in a Taskfile, and run them. Task dependencies can be declared, and it dumps a stack trace on execution errors. The goal is to provide a uniform interface for discovering and running tasks defined in Bash.

NOTE: Taskit shares many ideas described in this well explained blog post, and takes a step further with its implementation to provide a better experience out of box.

Installation

Taskit depends on Bash >= 4.3 and GNU Coreutils to function correctly; otherwise it's just a single script, so you only need to copy it to your PATH and chmod it. E.g.:

curl https://raw.githubusercontent.com/kjkuan/taskit/1.0.0/taskit > /usr/local/bin/taskit
chmod +x /usr/local/bin/taskit

There's also a Homebrew Tap for it, so if you use Homebrew, you can track and install it on OS X with:

brew tap kjkuan/taskit
brew install taskit

Taskfile

With the example Taskfile, running taskit from the same directory, we can:

See what options are available:

$ taskit -h
Usage: taskit [options] [task1 [name1=value1 ...] task2 ...]
options:
  -h [TASK]    Show this help or a task specific help if a task is specified.
  -t           List all available tasks.
  -D           Skip task dependencies.
  -d           Dry run; show but don't really run any tasks.
  -x PATTERNS  Don't run any tasks matching the list of space-separated PATTERNS.
  -v LEVEL     Set the log verbosity level to LEVEL(error|warning|fatal|silence|info|debug).
  -f FILE      Use FILE as the Taskfile.

Show available tasks:

$ taskit -t
Available tasks:

  mytask            -    A simple task
  count-from-one    -    Prints whole numbers, one per line, from 1 up to 'to', inclusive.

Note: Taskit will list the tasks in the order they are defined in the Taskfile. This also takes into account tasks sourced from other files.

See more detailed doc on a task:

$ taskit -h mytask
TASK
        mytask -- A simple task.

DESCRIPTION
        Comments right before the task will be parsed as the task's
        help doc.


PARAMETERS
        name!       Your name.
        greeting    Words to greet with.
        rest%       Rest of named arguments collected in an array.

Run one or more tasks from CLI:

$ taskit hello mytask name=Jack a=1 b=2
71421115 SABERTOOTH|2017-03-04T15:20:25-0500|user=jkuan|pid=4150|INFO|Task::hello --
hello world
71421115 SABERTOOTH|2017-03-04T15:20:25-0500|user=jkuan|pid=4150|INFO|Task::count-from-one --
1
2
3
71421115 SABERTOOTH|2017-03-04T15:20:25-0500|user=jkuan|pid=4150|INFO|Task::count-from-one --
1
2
3
4
5
71421115 SABERTOOTH|2017-03-04T15:20:25-0500|user=jkuan|pid=4150|INFO|Task::mytask -- A simple task
Hello, Jack
I'm in /tmp

The rest of named arguments are:
a=1
b=2
71421115 SABERTOOTH|2017-03-04T15:20:26-0500|user=jkuan|pid=4150|INFO|Duration: 00:00:01

Roadmap

Taskit is still a work in progress; things might change or get added, bugs are inevitable. In particular, some areas still need to be improved:

  • current log/output format

    • the current format is not ideal, if you have any suggestions on how to best present task execution info/logs, please let me know.
    • we should also think about how to display info for remote tasks
  • properly document the public interface(i.e., global vars and functions, e.g., taskit_run) made available by taskit for use in a Taskfile.

Planned features:

  • remote tasks via ssh (WIP)
  • ability to run ansible modules

Bug report and suggestions via github issues, and PRs are welcomed!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].