---
title: "overlane repo pr diff"
description: "Show a pull request's full diff"
---

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

# overlane repo pr diff

{/* Generated by apps/docs/scripts/generate.mjs (CLI pages from the command registry in packages/cli). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

Shows every file the pull request changes against the point where its branch split from the base, as unified text (default), counts only (--stat) or the structured diff (--json).

## Usage

```sh
overlane repo pr diff repo number [--stat]
```

## Arguments

| Argument | Required | Description |
| --- | --- | --- |
| `repo` | yes | The repository name or ID |
| `number` | yes | The pull request number |

## Flags

| Flag | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--stat` | boolean | no |  | Counts per file only, no hunks |

## Examples

```sh
overlane repo pr diff app 7
overlane repo pr diff app 7 --stat
```

## Behavior

- Effect: `read` (changes nothing).
- Needs credentials: yes. Uses the network: yes.
- Supports `--dry-run`: no. Accepts `--force`: no.
- Machine-readable description: `overlane schema repo pr diff`.

## Result

With `--json` (the default when stdout is not a terminal) the command prints this JSON Schema's shape on stdout.

```json
{
  "type": "object",
  "properties": {
    "tenantId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$",
      "description": "tenant identifier"
    },
    "repoId": {
      "type": "string",
      "pattern": "^repo_[A-Za-z0-9]{6,40}$"
    },
    "number": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "diff": {
      "type": "object",
      "properties": {
        "base": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
            },
            {
              "type": "null"
            }
          ]
        },
        "head": {
          "type": "string",
          "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$"
        },
        "files": {
          "maxItems": 3000,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "previousPath": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "added",
                  "modified",
                  "deleted",
                  "renamed",
                  "binary"
                ]
              },
              "additions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "deletions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "truncated": {
                "type": "boolean"
              },
              "hunks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "oldStart": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "oldLines": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "newStart": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "newLines": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "context",
                              "add",
                              "delete"
                            ]
                          },
                          "oldLine": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "newLine": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "text": {
                            "type": "string"
                          },
                          "noNewline": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "type",
                          "oldLine",
                          "newLine",
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "oldStart",
                    "oldLines",
                    "newStart",
                    "newLines",
                    "lines"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "path",
              "previousPath",
              "status",
              "additions",
              "deletions",
              "truncated",
              "hunks"
            ],
            "additionalProperties": false
          }
        },
        "totals": {
          "type": "object",
          "properties": {
            "files": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "additions": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "deletions": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "files",
            "additions",
            "deletions"
          ],
          "additionalProperties": false
        },
        "truncated": {
          "type": "boolean"
        },
        "truncatedReason": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "base",
        "head",
        "files",
        "totals",
        "truncated",
        "truncatedReason"
      ],
      "additionalProperties": false
    },
    "view": {
      "type": "string",
      "enum": [
        "stat"
      ]
    }
  },
  "required": [
    "tenantId",
    "repoId",
    "number",
    "diff"
  ],
  "additionalProperties": false
}
```

See [exit codes](/cli/#exit-codes) for the status the process returns.

Source: https://docs.overlane.app/cli/repo-pr-diff/index.mdx
