Usage

Run PairPilot with the source code files you want to edit. These files will be “added to the chat session”, so that PairPilot can see their contents and edit them for you. They can be existing files or the name of files you want PairPilot to create for you.

PairPilot <file1> <file2> ...

At the PairPilot > prompt, ask for code changes and PairPilot will edit those files to accomplish your request.

$ PairPilot factorial.py

PairPilot v0.37.1-dev
Models: gpt-4o with diff edit format, weak model gpt-3.5-turbo
Git repo: .git with 258 files
Repo-map: using 1024 tokens
Use /help to see in-chat commands, run with --help to see cmd line args
───────────────────────────────────────────────────────────────────────
> Make a program that asks for a number and prints its factorial

...

Use /help <question> to ask for help about using PairPilot, customizing settings, troubleshooting, using LLMs, etc.

Adding files

To edit files, you need to “add them to the chat”. Do this by naming them on the PairPilot command line. Or, you can use the in-chat /add command to add files.

Only add the files that need to be edited for your task. Don’t add a bunch of extra files. If you add too many files, the LLM can get overwhelmed and confused (and it costs more tokens). PairPilot will automatically pull in content from related files so that it can understand the rest of your code base.

You can use PairPilot without adding any files, and it will try to figure out which files need to be edited based on your requests.

You’ll get the best results if you think about which files need to be edited. Add just those files to the chat. PairPilot will include relevant context from the rest of your repo.

LLMs

PairPilot works best with Claude 3.5 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini & GPT-4o. PairPilot can connect to almost any LLM, including local models.

# o3-mini
$ PairPilot --model o3-mini --api-key openai=<key>

# Claude 3.5 Sonnet
$ PairPilot --model sonnet --api-key anthropic=<key>

Or you can run PairPilot --model XXX to launch PairPilot with another model. During your chat you can switch models with the in-chat /model command.

Making changes

Ask PairPilot to make changes to your code. It will show you some diffs of the changes it is making to complete you request. PairPilot will git commit all of its changes, so they are easy to track and undo.

You can always use the /undo command to undo AI changes that you don’t like.


Table of contents