4 releases

0.1.6 Mar 25, 2024
0.1.5 Jan 3, 2024

#2030 in Command line utilities

Download history 11/week @ 2024-01-01 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

199 downloads per month

MIT license

20KB
509 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

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

~5–15MB
~191K SLoC