cargo-run
A CLI tool to run custom scripts in Rust, defined in Scripts.toml.
Features
- Run scripts defined in
Scripts.toml. - Specify interpreters for scripts (e.g., bash, zsh, PowerShell).
- Initialize a
Scripts.tomlfile with default content. - Chain multiple scripts together using the
includefeature.
Installation
To install cargo-run, use the following command:
Usage
To run a script, use the following command:
Or
Complete script:
Scripts Examples
The Scripts.toml file is used to define scripts. The file is located in the root of the project directory. The following is an example of a Scripts.toml file:
[]
# run a shell script
= "./.scripts/i_am_shell.sh"
# run a shell script with interpreter, also add script info
= { = "bash", = "echo 'test'", = "Script to test" }
# run inline script
= "echo 'build'"
# run chain of scripts
= { = ["i_am_shell", "build"] }