5 releases

0.1.7 May 13, 2024
0.1.6 Mar 25, 2024
0.1.5 Jan 3, 2024

#1655 in Command line utilities

Download history 1/week @ 2024-06-07 2/week @ 2024-06-14 1/week @ 2024-06-28 23/week @ 2024-07-05 42/week @ 2024-07-26 5/week @ 2024-08-02

537 downloads per month

MIT license

23KB
569 lines

DOIT

A simple task runners for the lazy.

Installation

cargo install --git https://github.com/jacobaclarke/doit-cli.git
cargo install doit-cli

Usage

Getting Started

# do.yaml
env:
  NAME: world
tasks:
  hello:
    cmd: echo $GREETING $NAME
    env:
      GREETING: Hello
$ doit hello
Hello world

Parallel Execution

# do.yaml
tasks:
  hello:
    cmd:
      - echo "hello"
      - echo "world"
$ doit hello
hello
world

Environment Variables

Global Environment Variables

# do.yaml
env:
  NAME: world
tasks:
  hello:
    cmd: Hello $NAME
$ doit hello
Hello world

Overriding Environment Variables from Shell

# do.yaml
env:
  NAME: jimmy
tasks:
  hello:
    cmd: Hello $NAME
$ NAME=world doit hello
Hello world

Overriding Environment Variables from Task

# do.yaml
env:
  NAME: jimmy
tasks:
  hello:
    cmd: Hello $NAME
    env:
      NAME: world
$ doit hello
Hello world

Subdirectories

├── parent
│   ├── child
├── do.yaml
# /parent/do.yaml
task:
  pwd:
    cmd: pwd
$ cd child
$ doit pwd
/parent

Subdirectories Local

├── parent
│   ├── child
├── do.yaml
# /parent/do.yaml
task:
  pwd:
    cmd: pwd
    local: true
$ cd child
$ doit pwd
/parent/child

Nested do.yaml files

# /parent/do.yaml
task:
  hello:
    cmd: echo hello world
# /parent/child/do.yaml
task:
  greet:
    cmd: doit hello
$ cd child
$ doit greet
hello world

Dependencies

~6–18MB
~220K SLoC