groom

🧹 groom

groom is a yet another os-agnostic task runner.

✨ Features

  • 🔥 Task runner with a simple yet powerful toml syntax
  • 🧹 Single static binary without dependencies
  • 💻 Neovim plugin for integration with neovim.

Functionality

Config file

  • Requires a simple groom.toml file in the project root.
  • groom automatically recurses to the project root to find a groom.toml file.
  • A global [variables] section for user variables.
  • They support inline variable substition.
 1name = "example-project"
 2
 3[variables]
 4version = "0.0.1"
 5
 6# Tasks start with '[task.<task-name>]'
 7# They should contain, 'command' property.
 8# Other fields are optional.
 9[task.build]
10description = "Build the project."
11command = "go build ."
12
13# Tasks can contain 'commands' as a list of commands.
14[task.run]
15commands = [
16    "go run main.go",
17    "python -m exaple-project",
18]
19
20# Tasks can contain dependencies, and environment variables defined
21[task.test]
22environment = [ "TESTS=1" ]
23directory = "test"
24command = "python -m unittest"
25depends = [
26    "format"
27]
28
29[task.format]
30command = "go fmt ./..."

You can run groom --example-config to get a working example config.

help

Task

A task in groom needs a name and atleast a single command.

This can be a task.

1[task.some-name]
2command = "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 and commands both exist. commands takes precedence.
  • Description
    • A single line describing the purpose of the task.
  • Directory
    • A absolute path to change the working directory before executing the commands.
 1[task.build]
 2depends = [
 3    "format"
 4]
 5description = "Build the project"
 6directory = "src"
 7environment = ["DEBUG_BUILD=0"]
 8commands = [
 9    "gcc -c main.o main.c",
10    "gcc -c game.o game.c",
11    "gcc -o $name game.o main.o"
12]

Everything except name and command are optional

List

Run groom without any arguments to list all configured tasks.

Use --simple to list all tasks without any fancy printing. Useful with scripts.

list

Executing tasks

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.

build

Neovim Plugin

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

plugin

Contributing

⭐ Star the project if you like it!

Feel free to contribute to the project, by either raising a issue or opening a PR.