Skip to main content
Manage pull requests directly from your terminal with wit pr. Create, review, merge, and close PRs without leaving your workflow.
Pull request commands require a wit server. Start one with wit serve or connect to an existing wit platform.

Quick Start

Command Reference

Creating Pull Requests

Basic Usage

What Happens

  1. wit determines the current branch
  2. Gets the remote repository info from origin
  3. Creates a PR targeting the specified base branch (default: main)
  4. Returns the PR number and URL

Example Output

Options

Listing Pull Requests

Example Output

The status indicator shows:
  • 🟢 Green = Open
  • 🟣 Purple = Merged
  • 🔴 Red = Closed

Viewing Pull Request Details

Example Output

Checking Out a PR Locally

Review a PR by checking it out:
This:
  1. Fetches the PR’s commits
  2. Creates a local branch pr-42
  3. Switches to that branch

Example Output

Now you can:
  • Run tests locally
  • Review the code
  • Make additional changes

Merging Pull Requests

Merge Methods

Example Output

Closing and Reopening

Complete Workflow Example

Error Handling

Not on a Branch

Creating PR from main

No Remote Origin

Server Not Running

API Usage

Use PRs programmatically via the tRPC API:

Environment Variables

Next Steps

Issues

Track issues from CLI

Git Server

Set up your own server