> ## Documentation Index
> Fetch the complete documentation index at: https://docs.matterai.so/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Code Review CLI

> Installation Guide for AI Code Review CLI

## Installation

> [!NOTE]
>
> The MatterAI CLI is a command line tool that allows you to locally generate PR Description and Checklist. Official Link: [https://www.npmjs.com/package/matter-ai-cli](https://www.npmjs.com/package/matter-ai-cli)

**1. Install the MatterAI CLI from NPM**

```bash theme={null}
npm install -g matter-ai
```

**2. Generate a new Github Personal Access Token (Classic)**

Generate a new Github Personal Access Token here [https://github.com/settings/tokens](https://github.com/settings/tokens) with the following permissions:

![MatterAI Github Connect](https://mintcdn.com/gravitycloud-9ebb5c50/-boUb8mu3Ny1_cmb/images/cli/matter-cli-github-token.png?fit=max\&auto=format\&n=-boUb8mu3Ny1_cmb\&q=85\&s=2dad66af1d2248e77cf512004ded09f2)

**3. Run the CLI**

1. Go to the directory of the repository you want to analyze.
2. Run the CLI with the following command:

```bash theme={null}
matter
```

3. Enter the Github Personal Access Token when prompted.

**4. Select the Pull Request**

Select the Pull Request you want to analyze from the list of Pull Requests.

![MatterAI Github Connect](https://mintcdn.com/gravitycloud-9ebb5c50/-boUb8mu3Ny1_cmb/images/cli/matter-cli-pr-select.png?fit=max\&auto=format\&n=-boUb8mu3Ny1_cmb\&q=85\&s=41b827b0a767091698ced8bbf747cf41)

**5. Select the AI Summary Generation**

Select the AI Summary option from the list of options.

![MatterAI Github Connect](https://mintcdn.com/gravitycloud-9ebb5c50/-boUb8mu3Ny1_cmb/images/cli/matter-cli-pr-generate-summary.png?fit=max\&auto=format\&n=-boUb8mu3Ny1_cmb\&q=85\&s=f40b7135fad61b9a27f6d83ef04a581b)

**6. Enter OpenAI API Key**

Enter the OpenAI API Key when prompted. Or you can set the `OPENAI_API_KEY` environment variable.

![MatterAI Github Connect](https://mintcdn.com/gravitycloud-9ebb5c50/-boUb8mu3Ny1_cmb/images/cli/matter-cli-open-ai.png?fit=max\&auto=format\&n=-boUb8mu3Ny1_cmb\&q=85\&s=47faa7828ddfa142f3f2bfc125b795f5)

**7. Your AI Generated Summary is Ready**

Your AI Generated Summary is ready in markdown format!

![MatterAI Github Connect](https://mintcdn.com/gravitycloud-9ebb5c50/-boUb8mu3Ny1_cmb/images/cli/matter-cli-pr-summary.png?fit=max\&auto=format\&n=-boUb8mu3Ny1_cmb\&q=85\&s=64ab92a777ad4044ce2134abd6b08ff5)

### Pro Features

The CLI is free to use, but you can upgrade to the Pro version to get more features:

1. Automatic AI Summary Generation on every PR and commits
2. AI Code Review on every PR and commits
3. AI Explanation on every PR and commits
4. Team-level analytics and insights

> You can get started by visiting [https://matterai.so](https://matterai.so)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.