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

# poly review

> Reference for the `poly review` command.

Create a GitHub Gist of Agent Studio project changes to share for review. `poly review` requires a subcommand.

Examples:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
poly review create
poly review create --before main --after feature-branch
poly review list
poly review delete
```

## `poly review create`

Create a review gist comparing project versions. With no arguments, it compares your local project against the remote version (local vs remote). Pass a positional version hash to compare that version against the current remote. Pass `--before` and `--after` to compare two branches or versions directly — the syntax matches the [`poly diff` command](https://docs.poly.ai/adk/reference/cli/diff).

Examples:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
poly review create
poly review create version-hash-1
poly review create --before main --after feature-branch
poly review create --before sandbox --after live
poly review create --before version-hash-1 --after version-hash-2
```

The gist is created privately on GitHub, with one `.diff` file per changed resource file.

| Argument | Description |
| - | - |
| `hash` | Version hash to compare against the current remote. Omit to use `--before`/`--after` instead. |

| Flag | Description |
| - | - |
| `--before` | Name of the original branch or version to compare from. |
| `--after` | Name of the branch or version to compare to. |
| `--files` | List of specific files to show changes for. If omitted, shows all changed files. |

`--json` output shape:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "success": true, "link": "https://gist.github.com/..." }
```

With no changes to review, it prints `{ "success": true, "message": "No changes to review." }`.

On a GitHub API/network error, the command exits non-zero:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "success": false, "message": "..." }
```

## `poly review list`

Interactively select a review gist and open it in the browser.

Examples:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
poly review list
```

> [!NOTE]
>
> **`--json` skips the browser prompt**
>
> With `--json`, the gist list is printed instead of opening the interactive picker.

`--json` output shape is a JSON array (not an object) of gist entries:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
[
  {
    "id": "...",
    "description": "Poly ADK: account/project: local → remote",
    "created_at": "2024-01-01T00:00:00Z",
    "html_url": "https://gist.github.com/..."
  }
]
```

On a GitHub API/network error, it falls back to the standard `{ "success": false, "message": "..." }` object.

## `poly review delete`

Interactively select and delete one or more review gists. Use `--id` to delete a specific gist directly without an interactive prompt.

Examples:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
poly review delete
poly review delete --id GIST_ID
poly review delete --json
```

| Flag | Description |
| - | - |
| `--id` | Gist ID (or its first 7 characters) to delete directly, skipping the interactive prompt. |

Without `--id`, an interactive checkbox prompt runs to select gists.

`--json` output shape:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "success": true }
```
