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
- wit determines the current branch
- Gets the remote repository info from
origin - Creates a PR targeting the specified base branch (default:
main) - Returns the PR number and URL
Example Output
Options
Listing Pull Requests
Example Output
- 🟢
●Green = Open - 🟣
●Purple = Merged - 🔴
●Red = Closed
Viewing Pull Request Details
Example Output
Checking Out a PR Locally
Review a PR by checking it out:- Fetches the PR’s commits
- Creates a local branch
pr-42 - Switches to that branch
Example Output
- 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