🖥️CLI Basics

Command summary

Plz has 3 basic commands to help manage your reviews.

  • plz review - Our “push” operation. Examines your local branch of commits and creates or updates the corresponding PRs in GitHub.

  • plz sync - Our “pull” operation. Updates your local branch with the state of any of the reviews in that stack from GitHub.

  • plz status - Show local state for each review in the stack.

There's also a plz auth command that you'll need to run initially in order to use the CLI. Follow the instructions provided to authorize usage of the plz CLI on your behalf.

Working with reviews

Create a new review

On a working branch, first create a commit with your code changes, then run plz review:

$ git commit -a -m 'Skip rebase when the old and new bases are the same'
  [work 0a2ea7b] Skip rebase when the old and new bases are the same
  2 files changed, 2 insertions(+)
$ plz review
  0babae5b Skip rebase when the old and new bases are the ... created https://plz.review/review/55

Examine a review’s local state

Show the local revision and other state:

Pull the latest revision

When your PR changes, e.g. due to a base branch change, pull the changes:

Amend an existing review

Amend your commit, then run plz review:

Working with stacks

Add a review to the stack

On a working branch with an existing unmerged commit, create a second commit and run plz review:

Examine the stack

Show local state for each review in the stack:

Sync your local state with your origin

In case you’ve merged or revised an upstream review, synchronize your local state with your origin (GitHub, in our case):

Modifying a review that's part of a stack

Now update the rebase commands to edit the appropriate commit, e.g.:

Make any desired code changes, and then run:

The final plz review command will update the PR branch and any subsequent PRs in your stack.

More CLI details: Refer to the full CLI User Guide for much more detail on using plz commands.

Last updated