doit-cli

Crates.iodoit-cli
lib.rsdoit-cli
version0.1.7
sourcesrc
created_at2024-01-02 23:55:18.715901
updated_at2024-05-13 02:50:59.609629
descriptionA CLI tool for managing your simple scripts.
homepage
repositoryhttps://github.com/jacobaclarke/doit-cli
max_upload_size
id1086815
size39,822
Jacob Clarke (jacobaclarke)

documentation

https://docs.rs/doit-cli

README

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
Commit count: 26

cargo fmt