Skip to content

jacobaclarke/doit-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages