dela 0.0.1

A task runner that delegates to others, discovering tasks from Makefiles, package.json, and more
dela-0.0.1 is not a library.
Visit the last successful build: dela-0.0.6

Dela!

A task runner that delegates the work to others. For your current working directory, it will scan the task definition files for tasks and allow you to invoke them directly from your shell. Dela simplifies discovery and execution of tasks in projects.

Installation

You can install dela from crates.io. The dela init command will add itself to your shell and create a .dela directory in your home directory.

cargo install dela
dela init

Usage

The dela command will list all the tasks defined.

dela list

You can invoke a task just by its name. For example here build task is defined in Makefile and is invoked.

build

If you are running dela in a directory for the first time, it will ask you to put the task or the task definition file or the directory itself on the allowed list. This is because you might want to run dela in non fully trusted directories and cause inadvertent execution.

build
Running build from ~/Projects/dela/Makefile for the first time. Allow?
0) Allow one time
1) Allow build from ~/Projects/dela/Makefile
2) Allow any command from ~/Projects/dela/Makefile
3) Allow any command from ~/Projects/dela
4) Deny

You can also call dela run directly with the task name, in which case it will execute the task directly, unless it is specified in multiple files.

dela run build

Frequently Asked Questions

How does dela work?

dela uses your shell's command_not_found_handler to detect when you are trying to run a command that doesn't exist. It then scans the current working directory for task definition files and executes the appropriate task runner.

What happens if a task shares the same name with a command?

Then the bare command will be executed instead of the task. To execute the task, you can use dela run <task_name>.

How do I add a new task?

You can add a new task by adding a new task definition file. The task definition file can be a Makefile, a pyproject.toml, a package.json, or a shell script.

What shell environment are tasks executed in?

Tasks are executed in the same shell environment as the command you are running.

Development

To use a dev version of the rust binary locally, build and install it with the following command.

cargo install --path .

You can also source the shell integration directly from the resources directory.

source resources/zsh.sh