Crates.io | braise |
lib.rs | braise |
version | |
source | src |
created_at | 2024-07-01 11:34:16.390254+00 |
updated_at | 2025-01-26 14:17:41.278069+00 |
description | Run your tasks like a chef ! |
homepage | https://github.com/cestef/braise |
repository | https://github.com/cestef/braise |
max_upload_size | |
id | 1288668 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Run your tasks like a chef !
brew install cestef/tap/braise
cargo install braise
or with cargo-binstall
cargo binstall braise
All the configuration is done in a braise.toml
file at the root of your project.
[!NOTE] Valid file names are defined here
[NAME]
command = "echo Hello, World!"
Then you can run your task with:
braise NAME
The following options are available:
# Global configuration
shell = "sh -c" # The shell to use (default: $SHELL or "sh -c")
quiet = false # Do not print the command output (default: false)
default = "NAME" # The default task to run (optional)
dotenv = ".env" # The path to the .env file (optional)
# Task configuration
[NAME]
command = "echo Hello, World!" # The command to run
description = "A simple task" # The description of the task (optional)
dependencies = ["OTHER_TASK"] # The list of tasks to run before this one (optional)
runs-on = ["linux", "macos"] # The platforms on which the task can run (optional)
The shell
and quiet
fields are global and can be overridden for each task.
[!NOTE] If you are a busy person, you can use the
br
alias instead ofbraise
By default braisé
will look for a .env
file at the root of your project and load the environment variables from it.
# .env
HELLO=WORLD
[NAME]
command = "echo $HELLO" # This will let the shell grab the environment variable
# or
command = "echo {env(HELLO)}" # This will expand to "echo WORLD"
Default values for environment variables can also be set:
[NAME]
command = "echo {env(MISSING:default)}" # This will expand to "echo default"
You can specify platform specific commands by using the runs-on
field:
[[NAME]]
command = "echo Hello, World!"
runs-on = ["windows"]
[[NAME]]
command = "echo Bonjour, Monde!"
runs-on = ["linux", "macos"]
Notice the double brackets [[NAME]]
to define multiple tasks with the same name.
A JSON schema is available here to help you write your braise.toml
file.
#:schema https://raw.githubusercontent.com/cestef/braise/main/schema/braise.schema.json
[echo]
command = "echo Hello, World!"
You can use the #:schema
directive to specify the path to the schema file.
This project is licensed under the MIT license (You can basically do whatever you want with this code)