Pair AI is a CLI tool that helps you in your routine tasks.
Before running the CLI, you need to have the following dependencies installed:
- Bun: See bun.sh for installation instructions.
- Git: Normally installed by default on macOS and Linux.
- OpenRouter API Key: You can get it here.
Now just export your OpenRouter API Key as an environment variable:
echo "export OPENROUTER_API_KEY=your-api-key" >> ~/.bashrc
To install dependencies for pair-ai
, run:
bun install
To run the CLI during development, use:
bun run dev
To compile the CLI into an executable:
bun run compile
After compiling, the executable will be available at dist/pair
and automatically copied to ~/.local/bin
. You should then be able to run it directly from your terminal:
pair commit
pair commit
: Commits changes using the Conventional Commits standard.pair code-review {branch}
: Analyzes the code in the specified branch and suggests improvements.pair pull-request {branch}
: Creates a pull request description based on the changes in the specified branch.
dev
: Runs the CLI in development mode with live reloading usingbun run --watch src/pair.ts
.compile
: Compiles the TypeScript code into a standalone executable usingbun build
.test
: Runs tests usingbun test
.test:watch
: Runs tests in watch mode usingbun test --watch
.