12 releases (5 breaking)
0.5.0 | Aug 10, 2023 |
---|---|
0.4.2 | Jun 5, 2023 |
0.4.1 | Apr 21, 2023 |
0.3.2 | Feb 15, 2023 |
0.0.1 | Jun 25, 2022 |
#4 in #reloading
51 downloads per month
360KB
2K
SLoC
Whiz
Whiz (/wɪz/) is a modern DAG/tasks runner for multi-platform monorepos. It provides convenient live reloading, env management, pipes, and more in a tabbed view.
Whiz is part of the Metatype ecosystem. Consider checking out how this component integrates with the whole ecosystem and browse the documentation to see more examples.
Getting started
You can download the binary executable from
releases page on GitHub, make it
executable and add it to your $PATH
or use the method below to automate those
steps.
curl -fsSL https://raw.githubusercontent.com/zifeo/whiz/main/installer.sh | bash
# via cargo
cargo install whiz --locked
cargo install --git https://github.com/zifeo/whiz --locked
# create your tasks file, see https://github.com/zifeo/whiz/blob/main/whiz.yaml for an example
touch whiz.yaml
# run
whiz
# upgrade
whiz upgrade
Usage
Configuration file
Environment variables for all tasks can be defined in the env
section at root
level. You can use Lade loaders when loading
secrets (e.g. infisical://DOMAIN/PROJECT_NAME/ENV_NAME/SECRET_NAME
).
env:
[key]: [value]
All other root level keys are considered as tasks. Each time a dependency is load, the dependent task is also reloaded.
[task]:
workdir: [working directory, by default .]
command: [command]
watch: [file or list of files]
env:
[key]: [value]
env_file: [file or list of env files]
depends_on: [task or list of task names for dependencies]
pipes: # see https://github.com/zifeo/whiz/blob/main/whiz.yaml
[regex]: [destination]
See this file for a complete example.
CLI options
See whiz --help
for more information.
Flags | Description |
---|---|
-f, --file <FILE> | specify the config file |
-h, --help | print help information |
--list-jobs | list all the available jobs |
-r, --run <JOB> | run specific jobs |
-t, --timestamp | enable timestamps in logging |
-v, --verbose | enable verbose mode |
-V, --version | print whiz version |
Key bindings
Keys | Action |
---|---|
l, RighArrow | go to next tab |
h, LeftArrow | go to previous tab |
k, Ctl + p | scroll up one line |
j, Ctl + n | scroll down one line |
Ctl + u | scroll up half page |
Ctl + d | scroll down half page |
Ctl + b | scroll up full page |
Ctl + f | scroll down full page |
0 | go to last tab |
1-9 | go to the tab at the given position |
q, Ctl + c | exit the program |
r | rerun the job in the current tab |
Development
cargo run --
Dependencies
~35–55MB
~1M SLoC