Skip to content

Getting Started ​

Installation ​

Running this command will install plz to ~/.local/bin:

bash
curl --proto '=https' --tlsv1.2 -LsSf https://plzplz.org/install.sh | sh

You can also install with cargo:

bash
cargo install --locked plzplz

or uv:

bash
uv tool install plzplz

GitHub Actions ​

Use the setup action to install and cache plz in your workflows:

yaml
- uses: k88hudson/setup-plz@v1

Pin to a specific version:

yaml
- uses: k88hudson/setup-plz@v1
  with:
    version: "0.0.17"

Then use plz normally in subsequent steps:

yaml
- run: plz check
- run: plz test

Initialize a project ​

In your project directory, run:

bash
plz init

This 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 ​

bash
plz build
plz test
plz check

If you run plz without arguments, an interactive prompt lets you choose a task.

Add tasks ​

Add a task from built-in snippets:

bash
plz add

This shows an interactive list of available tasks for your detected environment. You can also add a specific task:

bash
plz add lint

Or define tasks directly in plz.toml:

toml
[tasks.build]
run = "cargo build"

[tasks.test]
run = "cargo test"

Set up defaults ​

bash
plz plz

This 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:

toml
[tasks.check]
run_parallel = ["plz format", "plz lint"]
git_hook = "pre-commit"

[tasks.test]
run = "cargo test"
git_hook = "pre-push"

Then install them:

bash
plz hooks install

Variables ​

Use [vars] to avoid repeating values across tasks:

toml
[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:

bash
plz test -- --nocapture