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

# Plannotator CLI reference

> Commands and flags for reviewing changes, annotating files and URLs, reopening sessions, and reading saved plan decisions.

The `plannotator` command opens a local review session in your browser. Run `plannotator <command> --help` for the help text shipped with your installed version.

## Review code changes

```bash theme={null}
plannotator review [--git | --gitbutler] [--local | --no-local] [PR_URL]
```

With no URL, Plannotator reviews changes in the current repository. It detects Git, GitButler, Jujutsu, or Perforce. Use `--git` or `--gitbutler` to override detection. GitButler support requires `but` 0.21.0 or later; see the [GitButler workflow guide](/open-source/workflows/gitbutler) for detection, views, and limits. Jujutsu is detected through the installed `jj` command and does not have a separate flag.

Pass a GitHub pull request or GitLab merge request URL to review it. Plannotator prepares a local checkout by default so it can show complete files. Use `--no-local` for a diff-only review.

```bash theme={null}
plannotator review
plannotator review --git
plannotator review --gitbutler
plannotator review https://github.com/owner/repo/pull/123
plannotator review --no-local https://gitlab.com/group/project/-/merge_requests/42
```

## Annotate a file, URL, or folder

```bash theme={null}
plannotator annotate <file.md | file.txt | file.html | https://... | folder/> \
  [--markdown] [--no-jina] [--gate] [--json] [--hook] \
  [--require-approval] [--result-file <path>]
```

Markdown and supported plain-text files open as documents. Local HTML renders as HTML by default; `--markdown` converts it to Markdown. A folder opens the supported document files it contains. Local files are limited to 2 MiB.

URLs use Jina Reader by default. `--no-jina` uses a direct fetch followed by local HTML-to-Markdown conversion.

`--gate` adds an Approve action. `--json` writes a machine-readable decision to standard output. `--hook` implies `--gate` and writes the hook-native block/pass contract described in [Hooks](/open-source/reference/hooks).

`--require-approval` and `--result-file <path>` are strict automation options. They work only with direct `annotate --gate --json` calls and cannot be combined with `--hook`.

* `--require-approval` exits `0` only for approval. Annotations or dismissal exit `1`.
* `--result-file <path>` publishes the same newline-terminated JSON record written to stdout.
* Invalid flags, startup failures, and result-publication failures exit `2`.
* The result path is resolved from the current working directory. Its parent must already exist, and the destination must not exist, including as a dangling symlink.

The strict result is one of `{"decision":"approved"}`, `{"decision":"approved","feedback":"<notes>"}`, `{"decision":"annotated","feedback":"<feedback>"}`, or `{"decision":"dismissed"}`.

Plannotator writes the decision to stdout before publishing the result file. Result publication uses a same-directory temporary file with `0600` permissions where supported and an atomic no-overwrite link. This prevents replacement of an existing destination, but it does not guarantee persistence after a system crash.

## Annotate the last agent message

```bash theme={null}
plannotator annotate-last [--stdin] [--gate] [--json] [--hook]
plannotator last [--stdin] [--gate] [--json] [--hook]
```

The command reads the last assistant message from a supported agent session. Use `--stdin` to supply the text yourself:

```bash theme={null}
printf '%s' "$message" | plannotator annotate-last --stdin
```

`last` is an alias for `annotate-last`.

## Reopen a running session

```bash theme={null}
plannotator sessions
plannotator sessions --open
plannotator sessions --open 2
plannotator sessions --clean
```

`sessions` lists live local servers. `--open [N]` opens the numbered session, with session 1 as the default. `--clean` removes stale session records.

## Read saved plan decisions

```bash theme={null}
plannotator archive
```

This opens the read-only archive for decisions saved under `<data-directory>/plans/`. The default is `~/.plannotator/plans/`; see [Configuration](/open-source/reference/configuration#where-settings-live) for data-directory resolution.

## Goal setup commands

```bash theme={null}
plannotator setup-goal <interview|facts> <bundle.json | -> [--json]
```

This command belongs to the installed `/goal` workflow. `interview` opens goal questions; `facts` opens the facts acceptance view. Pass `-` to read the bundle JSON from standard input.

## Global options and hook-only commands

* `--browser <name>` selects a browser, application, or executable for this run. It can appear with any command.
* `--version` and `-v` print the installed version.
* `plannotator improve-context` is called by an installed agent hook. It reads a hook event from standard input and is not intended for direct use.

Running `plannotator` without arguments also belongs to hook integration and expects JSON on standard input. For an interactive session, choose `review`, `annotate`, `last`, `archive`, or `sessions` explicitly.

## Installation lifecycle

Use the operating-system installer to install or update Plannotator.

```bash theme={null}
plannotator uninstall [--dry-run] [--purge]
```

`plannotator uninstall` removes the installed executable and Plannotator-managed integrations. Use `--dry-run` to inspect the removal plan without changing files. Use `--purge` to include local data. Read [Remove Plannotator](/open-source/start/installation#remove-plannotator) before you use `--purge`. That procedure explains safeguards, retained files, and residual state.

Agent Skills and host plugins have separate lifecycles. See [Install and Manage Plannotator Skills](/open-source/start/skills) before removing a `/plannotator-*` entry, because the same visible command can be backed by a skill, a native command file, or a plugin.

Last verified against Plannotator OSS v0.25.1 on July 31, 2026. Maintained by the Plannotator project.


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