https://github.com/j03-dev/dothelix
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.
https://github.com/j03-dev/dothelix
cli dofile helix rust task-manager
Last synced: 10 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/j03-dev/dothelix
- Owner: j03-dev
- Created: 2024-06-14T10:42:01.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-14T11:23:48.000Z (about 2 years ago)
- Last Synced: 2025-03-16T01:41:52.415Z (over 1 year ago)
- Topics: cli, dofile, helix, rust, task-manager
- Language: Rust
- Homepage:
- Size: 126 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dothelix
`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.
## Features
- 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.


## Installation
1. **Clone the repository**:
```sh
git clone https://github.com/j03-dev/dothelix.git
cd dothelix
```
2. **Build the project**:
```sh
cargo build --release
```
3. **Install the executable**:
```sh
cp target/release/dothelix /usr/local/bin/
```
Alternatively, you can run the executable directly from the `target/release` directory:
```sh
./target/release/dothelix
```
## Usage
1. **Create a `.helix/helix.json` file** in your project root with the task definitions. Example:
```json
{
"run": {
"command": "cargo",
"args": ["run"],
"env": {
"RUST_LOG": "info"
}
},
"build": {
"command": "cargo",
"args": ["build", "--release"]
}
}
```
2. **Run a task** by specifying its name:
```sh
dothelix run
```
or
```sh
dothelix build
```
3. **Open helix config file** at `~/.config/helix/config.toml` and add this:
```toml
[keys.normal]
F5 = [":run-shell-command dothelix run"]
F9 = [":run-shell-command dothelix build"]
```
## Configuration
The `.helix/helix.json` file should be located in the `.helix` directory in your project root. The structure is as follows:
- `run` and `build` are task names. You can define more if needed.
- `command` is the base command to execute.
- `args` is an optional array of command-line arguments.
- `env` is an optional object of environment variables.
### Example
```json
{
"run": {
"command": "node",
"args": ["index.js"],
"env": {
"NODE_ENV": "development"
}
},
"build": {
"command": "cargo",
"args": ["build"],
"env": {
"RUST_LOG": "debug"
}
}
}
```