dothelix is a command-line tool for executing predefined tasks from a JSON configuration file. It reads tasks from .helix/helix.json and runs commands based on user input.
- Execute tasks defined in a JSON configuration file.
- Supports optional arguments and environment variables for each task.
- Simple and flexible way to automate common tasks like build and run.
-
Clone the repository:
git clone https://github.com/j03-dev/dothelix.git cd dothelix -
Build the project:
cargo build --release
-
Install the executable:
cp target/release/dothelix /usr/local/bin/
Alternatively, you can run the executable directly from the
target/releasedirectory:./target/release/dothelix
-
Create a
.helix/helix.jsonfile in your project root with the task definitions. Example:{ "run": { "command": "cargo", "args": ["run"], "env": { "RUST_LOG": "info" } }, "build": { "command": "cargo", "args": ["build", "--release"] } } -
Run a task by specifying its name:
dothelix run
or
dothelix build
-
Open helix config file at
~/.config/helix/config.tomland add this:
[keys.normal]
F5 = [":run-shell-command dothelix run"]
F9 = [":run-shell-command dothelix build"]The .helix/helix.json file should be located in the .helix directory in your project root. The structure is as follows:
runandbuildare task names. You can define more if needed.commandis the base command to execute.argsis an optional array of command-line arguments.envis an optional object of environment variables.
{
"run": {
"command": "node",
"args": ["index.js"],
"env": {
"NODE_ENV": "development"
}
},
"build": {
"command": "cargo",
"args": ["build"],
"env": {
"RUST_LOG": "debug"
}
}
}
