5 releases

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

#2226 in Command line utilities

Download history 4/week @ 2024-02-19 5/week @ 2024-02-26 1/week @ 2024-03-11 147/week @ 2024-03-25 51/week @ 2024-04-01

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–16MB
~215K SLoC