Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AGENTS.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Then finish the step for your agent:
| **OpenCode** | Add `"plugin": ["@plannotator/opencode@latest"]` to `opencode.json`. Restart OpenCode. | [README](apps/opencode-plugin/README.md) |
| **Pi** | Skip the installer. Just `pi install npm:@plannotator/pi-extension`. Start Pi with `--plan`, or toggle with `/plannotator-plan-mode`. | [README](apps/pi-extension/README.md) |

**Updating:** run the installer again for the binary and slash commands. Claude Code plugin: `claude plugin marketplace update plannotator`, then `claude plugin update plannotator@plannotator`, then restart Claude Code (refreshing the marketplace alone does not update the plugin). Pi: `pi update --extensions` (a plain `pi update` updates only Pi).
**Updating:** run the installer again for the binary and slash commands. It also updates an installed Claude Code plugin when the `claude` command is on your PATH (opt out with `--skip-claude-plugin`); otherwise run `claude plugin marketplace update plannotator`, then `claude plugin update plannotator@plannotator`, then restart Claude Code (refreshing the marketplace alone does not update the plugin). Pi: `pi update --extensions` (a plain `pi update` updates only Pi).

On Claude Code 2.1.287 or newer, plan review, code review and annotate don't make Claude wait: Claude ends its turn and your decision arrives later as a message. Set `PLANNOTATOR_CLAUDE_MOD=0` to go back to the classic flow.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Same precedence: flag over environment variable over config file. The installer

To update, run the install command again. It installs the latest release over the old one, and a Plannotator session that is open while it runs keeps working. It also clears cached OpenCode plugin versions (OpenCode 1 and OpenCode 2), so OpenCode loads the latest `@plannotator/opencode` after a restart.

The install script does not update the Claude Code plugin. It updates the Pi extension only when the `pi` command is on your PATH while it runs. Otherwise update them in the agent:
The install script also updates the Claude Code plugin when it is already installed and the `claude` command is on your PATH: it runs `claude plugin marketplace update plannotator` and `claude plugin update plannotator@plannotator --scope user` for you, then tells you to restart Claude Code. It never installs the plugin, and a failure never fails the install (it prints the commands to run instead). A run pinned with `--version` leaves the plugin alone, because the plugin update always installs the newest plugin. Skip this with `--skip-claude-plugin` (PowerShell: `-SkipClaudePlugin`), `PLANNOTATOR_SKIP_CLAUDE_PLUGIN_UPDATE=1`, or `{ "skipInstall": { "claudePlugin": true } }` in `~/.plannotator/config.json`. It updates the Pi extension only when the `pi` command is on your PATH while it runs. Otherwise update them in the agent:

- **Claude Code:** refreshing the marketplace alone does not update an installed plugin. Run `claude plugin marketplace update plannotator`, then `claude plugin update plannotator@plannotator`, then restart Claude Code. Inside Claude Code you can run `/plugin marketplace update plannotator`, then open `/plugin`, go to **Installed**, select **plannotator** and choose **Update now**.
- **Pi:** run `pi update --extensions`. A plain `pi update` updates only Pi itself.
Expand All @@ -151,7 +151,7 @@ Plannotator can do this for you. Turn on **Settings → General → Keep Plannot

in `~/.plannotator/config.json`, or `PLANNOTATOR_AUTO_UPDATE=1` in your environment (the environment variable wins). It is off by default.

When it is on, the `plannotator` binary checks GitHub for a newer stable release at most once a day, after a review session has started. It never downgrades. If a newer release exists and no other Plannotator session is open, it runs the same install script shown above for that exact version, in the background, with your saved install choices: the `skipInstall` keys in `config.json`, the answers from your first install, and the install flags you last ran the script with. Each install records its flags (`--minimal`, `--no-minimal`, `--skip-codex`, `--skip-gemini`, `--skip-kiro`, `--skip-vibe`, `--skip-opencode`, `--skip-skills`, `--with-call-flow`, `--verify-attestation`, `--skip-attestation`, or the PowerShell equivalents such as `-SkipSkills`) in `~/.plannotator/install-flags.json`, and auto-update passes the same ones again. Running the install script by hand with none of those flags records an empty set, so later updates go back to the defaults. Nothing waits for it: the check adds no time to a review, and a failed check or install only writes a line to `~/.plannotator/update.log`. The next time Plannotator opens you see "Updated to vX", or "Auto-update failed" with the path to that log.
When it is on, the `plannotator` binary checks GitHub for a newer stable release at most once a day, after a review session has started. It never downgrades. If a newer release exists and no other Plannotator session is open, it runs the same install script shown above for that exact version, in the background, with your saved install choices: the `skipInstall` keys in `config.json`, the answers from your first install, and the install flags you last ran the script with. Each install records its flags (`--minimal`, `--no-minimal`, `--skip-codex`, `--skip-gemini`, `--skip-kiro`, `--skip-vibe`, `--skip-opencode`, `--skip-skills`, `--skip-claude-plugin`, `--with-call-flow`, `--verify-attestation`, `--skip-attestation`, or the PowerShell equivalents such as `-SkipSkills`) in `~/.plannotator/install-flags.json`, and auto-update passes the same ones again. Running the install script by hand with none of those flags records an empty set, so later updates go back to the defaults. Nothing waits for it: the check adds no time to a review, and a failed check or install only writes a line to `~/.plannotator/update.log`. The next time Plannotator opens you see "Updated to vX", or "Auto-update failed" with the path to that log.

Auto-update only applies to the binary the install script manages (`~/.local/bin/plannotator`, or `%LOCALAPPDATA%\plannotator\plannotator.exe` on Windows). A development build, a binary installed some other way, and the OpenCode and Pi plugins are never updated by it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ When running your own paste service binary, these variables configure it:
| `PLANNOTATOR_SKIP_VIBE_INSTALL` | off | Same opt-out for the Mistral Vibe integration (the managed `hooks.toml` block and skills under `$VIBE_HOME`, default `~/.vibe`). Config key `skipInstall.vibe`; flag `--skip-vibe`. Read by the install scripts only. |
| `PLANNOTATOR_SKIP_OPENCODE_INSTALL` | off | Do-not-write switch for the OpenCode integration (command stubs, plugin cache clear). Config key `skipInstall.opencode`; flag `--skip-opencode`. Read by the install scripts only. |
| `PLANNOTATOR_SKIP_SKILLS_INSTALL` | off | Set to `1` / `true` to skip the skills and slash-command checkout entirely: no `git clone` of the release tag, so nothing is written to `~/.claude/skills`, `~/.agents/skills`, the OpenCode or Gemini command directories, or `~/.kiro`, and the skill-scope cleanup sweeps stay suspended. The binary, hooks, and per-agent config still install, and git stops being a hard requirement. Unlike the per-agent opt-outs above, this covers every scope the checkout writes. Config key `skipInstall.skills`; flags `--skip-skills` (bash/cmd) and `-SkipSkills` (PowerShell). Read by the install scripts only. |
| `PLANNOTATOR_SKIP_CLAUDE_PLUGIN_UPDATE` | off | Set to `1` / `true` to stop the install script from updating an already-installed Claude Code plugin. By default, when the `claude` CLI is on PATH and `plannotator@plannotator` is installed, the installer runs `claude plugin marketplace update plannotator` and `claude plugin update plannotator@plannotator --scope user` (it never installs the plugin, and a `--version` pin skips it). Config key `skipInstall.claudePlugin`; flags `--skip-claude-plugin` (bash/cmd) and `-SkipClaudePlugin` (PowerShell). Read by the install scripts only. |
| `CLAUDE_CONFIG_DIR` | `~/.claude` | Custom Claude Code config directory. The install script places hooks here instead of the default location. |

## Remote mode behavior
Expand Down
11 changes: 11 additions & 0 deletions packages/server/auto-update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,17 @@ describe("remembered install flags", () => {
expect(parseInstallFlags({ flags: ["verify-attestation", "skip-attestation"] }).flags).toEqual([]);
});

test("skip-claude-plugin is replayed with each installer's spelling", () => {
// Recorded by install.sh / install.ps1 / install.cmd for --skip-claude-plugin
// (-SkipClaudePlugin), so an auto-update keeps a plugin opt-out. A binary
// that predates the id drops it as unrecognized (the test above).
const r = parseInstallFlags({ v: 1, flags: ["skip-claude-plugin", "skip-codex", "skip-future-thing"] });
expect(r.flags).toEqual(["skip-codex", "skip-claude-plugin"]);
expect(r.problem).toContain("dropped 1");
expect(installerFlagArgs(["skip-claude-plugin"], "linux")).toEqual(["--skip-claude-plugin"]);
expect(installerFlagArgs(["skip-claude-plugin"], "win32")).toEqual(["-SkipClaudePlugin"]);
});

test("flags are spelled for each installer", () => {
const flags = ["minimal", "with-call-flow", "skip-opencode"] as const;
expect(installerFlagArgs(flags, "linux")).toEqual(["--minimal", "--with-call-flow", "--skip-opencode"]);
Expand Down
1 change: 1 addition & 0 deletions packages/server/auto-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ export const INSTALL_FLAG_SPELLINGS = {
"skip-vibe": { posix: "--skip-vibe", powershell: "-SkipVibe" },
"skip-opencode": { posix: "--skip-opencode", powershell: "-SkipOpencode" },
"skip-skills": { posix: "--skip-skills", powershell: "-SkipSkills" },
"skip-claude-plugin": { posix: "--skip-claude-plugin", powershell: "-SkipClaudePlugin" },
} as const;

export type InstallFlagId = keyof typeof INSTALL_FLAG_SPELLINGS;
Expand Down
10 changes: 9 additions & 1 deletion packages/shared/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,22 @@ export interface PlannotatorConfig {
* PLANNOTATOR_SKIP_OPENCODE_INSTALL env vars, which are in turn overridden
* by the --skip-codex / --skip-gemini / --skip-kiro / --skip-vibe /
* --skip-opencode flags. OpenCode has no detection leg, so its entry is a
* plain do-not-write switch. Default: all off.
* plain do-not-write switch. `skills` skips the skills/slash-command
* checkout for every scope (PLANNOTATOR_SKIP_SKILLS_INSTALL / --skip-skills).
* `claudePlugin` stops the installers from updating an already-installed
* Claude Code plugin (`claude plugin marketplace update plannotator` +
* `claude plugin update plannotator@plannotator`);
* PLANNOTATOR_SKIP_CLAUDE_PLUGIN_UPDATE / --skip-claude-plugin
* (-SkipClaudePlugin). Default: all off.
*/
skipInstall?: {
codex?: boolean;
gemini?: boolean;
kiro?: boolean;
vibe?: boolean;
opencode?: boolean;
skills?: boolean;
claudePlugin?: boolean;
};
/**
* Enable Jina Reader for URL-to-markdown conversion during annotation.
Expand Down
Loading
Loading