groom
is a yet another os-agnostic task runner.
- 🔥 Task runner with a simple yet powerful toml syntax
- 🧹 Single static binary without dependencies
- 💻 Neovim plugin for integration with
neovim
.
- Requires a simple
groom.toml
file in the project root. groom
automatically recurses to the project root to find agroom.toml
file.- A global
[variables]
section for user variables. - They support inline variable substition.
name = "example-project"
[variables]
version = "0.0.1"
# Tasks start with '[task.<task-name>]'
# They should contain, 'command' property.
# Other fields are optional.
[task.build]
description = "Build the project."
command = "go build ."
# Tasks can contain 'commands' as a list of commands.
[task.run]
commands = [
"go run main.go",
"python -m exaple-project",
]
# Tasks can contain
# - dependencies
# - custom directory to run
# - environment variables to setup
[task.test]
environment = [ "TESTS=1" ]
directory = "test"
command = "python -m unittest"
depends = [
"format",
"tags"
]
[task.format]
command = "go fmt ./..."
# You can make `groom` execute your command in a shell
# As opposed to executed directly
# Useful for shell features like globbing
[task.tags]
shell = "bash"
command = "ctags *.go"
# This becomes "bash -c 'ctags *.go'"
You can run
groom --example-config
to get a working example config.
A task
in groom
needs a name and atleast a single command.
This can be a task.
[task.some-name]
command = "echo 'Sample Task'"
It can contain
- Environment variables
- List of environment variables with it's values as string.
- Task dependencies
- List of dependencies which should be valid groom tasks.
- Multiple commands
- List of commands to execute
sequentially
. - When
command
andcommands
both exist.commands
takes precedence.
- List of commands to execute
- Description
- A single line describing the purpose of the task.
- Directory
- A absolute path to change the working directory before executing the commands.
- Shell
- A specific shell (for now only
bash
is supported) to be used for execution.
- A specific shell (for now only
[task.build]
depends = [
"format"
]
description = "Build the project"
directory = "src"
environment = ["DEBUG_BUILD=0"]
commands = [
"gcc -c main.o main.c",
"gcc -c game.o game.c",
"gcc -o $name game.o main.o",
]
Everything except
name
andcommand
are optional
Run groom
without any arguments to list all configured tasks.
Use
--simple
to list all tasks without any fancy printing. Useful with scripts.
Provide a list of tasks to execute and watch groom
execute them!
Use the
--dry-run
argument to show the log without actually running anything.
A neovim
plugin is in the works for integrating groom
with Neovim.
It allows you to run tasks without leaving your editor.
Find it here
⭐ Star the project if you like it!
Feel free to contribute to the project, by either raising a issue or opening a PR.