Getting Started
Installation
Running this command will install plz to ~/.local/bin:
curl --proto '=https' --tlsv1.2 -LsSf https://plzplz.org/install.sh | shYou can also install with cargo:
cargo install plzplzor uv:
uv tool install plzplzGitHub Actions
Use the setup action to install and cache plz in your workflows:
- uses: k88hudson/setup-plz@v1Pin to a specific version:
- uses: k88hudson/setup-plz@v1
with:
version: "0.0.17"Then use plz normally in subsequent steps:
- run: plz check
- run: plz testInitialize a project
In your project directory, run:
plz initThis auto-detects your environment (Rust, pnpm, npm, uv) and generates a plz.toml from a template of your choice. Configure your own templates by running plz plz.
Run a task
plz build
plz test
plz checkIf you run plz without arguments, an interactive prompt lets you choose a task.
Add tasks
Add a task from built-in snippets:
plz addThis shows an interactive list of available tasks for your detected environment. You can also add a specific task:
plz add lintOr define tasks directly in plz.toml:
[tasks.build]
run = "cargo build"
[tasks.test]
run = "cargo test"Set up defaults
plz plzThis creates files in ~/.plz/ where you can customize default templates, snippets, and environments. These are used by plz init and plz add across all your projects.
Git hooks
Configure git hooks directly in your task definitions:
[tasks.check]
run_parallel = ["plz format", "plz lint"]
git_hook = "pre-commit"
[tasks.test]
run = "cargo test"
git_hook = "pre-push"Then install them:
plz hooks installVariables
Use [vars] to avoid repeating values across tasks:
[vars]
app = "myapp"
[tasks.build]
run = "docker build -t {{app}} ."
[tasks.run]
run = "docker run {{app}}"See the reference for taskgroup overrides and more details.
Passing arguments
Extra arguments after the task name are forwarded to the command:
plz test -- --nocapture