Skip to content

feat(install): add --minimal binary-only install mode#989

Open
Staninna wants to merge 3 commits into
backnotprop:mainfrom
Staninna:fix/minimal-installer-977
Open

feat(install): add --minimal binary-only install mode#989
Staninna wants to merge 3 commits into
backnotprop:mainfrom
Staninna:fix/minimal-installer-977

Conversation

@Staninna

@Staninna Staninna commented Jul 2, 2026

Copy link
Copy Markdown

Summary

Closes #977.

scripts/install.sh installs the plannotator binary and then writes a large amount of extra state: the sem semantic-diff sidecar, the agent-terminal runtime, and per-agent skills, hooks, slash commands, and config for Claude, Codex, OpenCode, Gemini, and Kiro. As the reporter notes, there's no way to get just the binary — even --no-extras still writes ~/.claude skills and OpenCode command stubs.

This adds a binary-only mode across all three installers:

  • --minimal flag (aliased --binary-only) and --no-minimal to force a full install
  • PLANNOTATOR_MINIMAL=1 env var, so curl … | bash runs can opt in without a flag — matching the existing PLANNOTATOR_SKIP_SEM_INSTALL idiom
  • Precedence: flag (--minimal/--no-minimal) > env var > default (off)

Minimal mode installs only the binary, prints PATH advice, and exits before any sidecar download, agent integration, skill checkout, config write, cache clear, or cleanup migration. No persistent state is written outside the install dir, and because it skips the sparse checkout, it does not require git.

Changes

  • install.sh: --minimal/--binary-only/--no-minimal + PLANNOTATOR_MINIMAL; PATH advice extracted into print_path_advice(); early-exit gate after the binary install.
  • install.ps1: -Minimal (alias BinaryOnly)/-NoMinimal + PLANNOTATOR_MINIMAL; PATH logic extracted into Show-PathAdvice; early exit 0.
  • install.cmd: --minimal/--binary-only/--no-minimal + PLANNOTATOR_MINIMAL; PATH advice extracted into a :PrintPathAdvice subroutine; early exit /b 0; usage string updated.
  • install.test.ts: minimal-mode assertions in the install.sh, install.ps1, and install.cmd describe blocks, plus an "all three installers support minimal mode" shared-behavior test.
  • Docs: a binary-only section in the installation guide, and PLANNOTATOR_MINIMAL (+ backfilled PLANNOTATOR_SKIP_SEM_INSTALL) added to the env-var registries (environment-variables.md, AGENTS.md/CLAUDE.md).

Usage

curl -fsSL https://plannotator.ai/install.sh | bash -s -- --minimal
# or
PLANNOTATOR_MINIMAL=1 curl -fsSL https://plannotator.ai/install.sh | bash
& ([scriptblock]::Create((irm https://plannotator.ai/install.ps1))) -Minimal
curl -fsSL https://plannotator.ai/install.cmd -o install.cmd && install.cmd --minimal && del install.cmd

Testing

  • bash -n scripts/install.sh clean.
  • Sandbox (stubbed network) verified for install.sh: --minimal and PLANNOTATOR_MINIMAL=1 each create only the binary (exit 0); --minimal --no-minimal errors; PLANNOTATOR_MINIMAL=1 --no-minimal runs the full install.
  • bun/pwsh aren't available in my local env, so the full bun test suite and the ps1/cmd runtime behavior are validated by CI (bun test + the install-ps1-windows / install-cmd-windows integration jobs). Every new test assertion string was checked against the actual scripts.

Addressed all three Copilot review comments (the MINIMAL_FLAG state comment → real --no-minimal; documented the --binary-only alias; softened the "nothing written outside" wording to "no persistent state").

install.sh installs the plannotator binary and then writes a large amount
of extra state: the sem sidecar, the agent-terminal runtime, and per-agent
skills, hooks, slash commands, and config for Claude, Codex, OpenCode,
Gemini, and Kiro. There is no way to get just the binary — even the
--no-extras path still writes ~/.claude skills and OpenCode commands.

Add a --minimal flag (aliased --binary-only) plus a PLANNOTATOR_MINIMAL
env var for `curl | bash` runs. Minimal mode installs only the binary to
~/.local/bin, prints PATH advice, and exits before any sidecar download,
agent integration, skill checkout, config write, cache clear, or cleanup
migration. Precedence: flag > env var > default (off).

The PATH-advice block is extracted into print_path_advice() so both the
minimal early exit and the normal flow reuse it.

Closes backnotprop#977
Copilot AI review requested due to automatic review settings July 2, 2026 17:39
@Staninna Staninna marked this pull request as draft July 2, 2026 17:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a binary-only installation path to the Unix installer so users can install plannotator without any agent integrations or extra runtime/sidecar downloads, addressing the “installer writes trash” complaint in #977.

Changes:

  • Introduces --minimal (alias --binary-only) plus PLANNOTATOR_MINIMAL=1 to enable binary-only installs.
  • Extracts PATH guidance into print_path_advice() and reuses it in both minimal and normal flows.
  • Adds tests validating documentation, precedence resolution, early-exit ordering, and PATH advice reuse; updates README install docs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
scripts/install.sh Adds minimal/binary-only mode gating and extracts reusable PATH advice.
scripts/install.test.ts Adds assertions for minimal mode documentation, precedence, early exit ordering, and PATH advice reuse.
README.md Documents --minimal / PLANNOTATOR_MINIMAL=1 as a binary-only install option.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/install.sh
Comment on lines +43 to +48
# Binary-only mode. Installs just the plannotator binary (to $INSTALL_DIR) and
# nothing else — no sem sidecar, no agent-terminal runtime, no skills, hooks,
# slash commands, or per-agent config (Claude, Codex, OpenCode, Gemini, Kiro).
# -1 = flag not set (fall through to env var); 0 = off; 1 = on. Resolved after
# arg parsing so PLANNOTATOR_MINIMAL can enable it for `curl | bash` runs.
MINIMAL_FLAG=-1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c112e39. Added an explicit --no-minimal (sets MINIMAL_FLAG=0), so a CLI flag can now override PLANNOTATOR_MINIMAL=1 in either direction and the -1/0/1 states in the comment are all reachable. --minimal/--no-minimal are mutually exclusive, mirroring --extras/--no-extras. Same flag added to install.ps1 (-NoMinimal) and install.cmd for parity.

Comment thread scripts/install.sh Outdated
Comment on lines +72 to +78
--minimal Install only the plannotator binary. Skips the sem
semantic-diff sidecar, the agent-terminal runtime, and
every per-agent integration (skills, hooks, slash
commands, and config for Claude, Codex, OpenCode,
Gemini, and Kiro). Nothing is written outside
$HOME/.local/bin. Also enabled by exporting
PLANNOTATOR_MINIMAL=1.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c112e39. The usage text now documents the --binary-only alias and the new --no-minimal, and the wording is softened to "No persistent state is written outside $HOME/.local/bin (a temp download file is still used and removed)" to avoid overpromising about mktemp/curl temp files and the config-dir read.

Comment thread scripts/install.sh Outdated
Comment on lines +429 to +432
# Binary-only mode stops here: the binary is installed, so print PATH advice and
# exit before any sidecar download, agent integration, skill checkout, config
# write, cache clear, or cleanup migration runs. Nothing outside $INSTALL_DIR is
# touched. See the MINIMAL_FLAG / PLANNOTATOR_MINIMAL resolution near the top.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c112e39. Reworded to "No persistent state is written outside $INSTALL_DIR (the temp download file was already cleaned up above; the config dir may have been read, never written)."

Extend the binary-only install mode to full cross-installer parity and
address the Copilot review on backnotprop#989.

install.sh:
- Add --no-minimal (MINIMAL_FLAG=0) so a CLI flag can override
  PLANNOTATOR_MINIMAL=1 in both directions; the -1/0/1 comment is now
  accurate. --minimal/--no-minimal are mutually exclusive.
- Document the --binary-only alias and soften the absolute "nothing
  written outside ..." wording to "no persistent state" (minimal mode
  still uses a temp download file and may read the config dir).

install.ps1 / install.cmd:
- Add -Minimal (alias BinaryOnly)/-NoMinimal and --minimal/--binary-only/
  --no-minimal with PLANNOTATOR_MINIMAL resolution, mirroring install.sh.
- Extract PATH advice into Show-PathAdvice / :PrintPathAdvice and reuse it
  in both the minimal early exit and the normal flow.
- Early-exit after the binary is placed, before the sidecar/agent/skill/
  config work.

Tests: add minimal-mode assertions to the install.ps1 and install.cmd
describe blocks plus a shared-behavior test asserting all three installers
support it; extend the sh tests for --no-minimal.

Docs: document --minimal / PLANNOTATOR_MINIMAL in the installation guide
(noting minimal mode needs no git) and add PLANNOTATOR_MINIMAL (and backfill
PLANNOTATOR_SKIP_SEM_INSTALL) to the env-var registries.
@Staninna Staninna requested a review from Copilot July 2, 2026 17:56
@Staninna Staninna marked this pull request as ready for review July 2, 2026 17:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread scripts/install.ps1 Outdated
Comment on lines +365 to +368
# Binary-only mode stops here (see the $minimal resolution near the top): the
# binary is installed, so add it to PATH and exit before any sidecar download,
# agent integration, skill checkout, config write, or cleanup runs. No
# persistent state is written outside $installDir.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 7634fc5. You're right that the PowerShell path calls Show-PathAdvice, which persistently writes the user PATH (unlike install.sh / install.cmd, which only print PATH advice). Reworded the comment to drop the "no persistent state" claim and instead describe what minimal mode skips (sidecar, agent-terminal runtime, per-agent skills/hooks/config), noting the binary and its PATH entry are still added.

<details>
<summary><strong>Binary-only install (nothing but the CLI)</strong></summary>

Pass `--minimal` (aliased `--binary-only`) to install **only** the `plannotator` binary — no sem semantic-diff sidecar, no agent-terminal runtime, and none of the per-agent skills, hooks, slash commands, or config for Claude, Codex, OpenCode, Gemini, or Kiro. No persistent state is written outside the install directory, and because it skips the sparse checkout, **minimal mode does not require `git`**.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7634fc5. Reworded the docs to: "The only thing installed is the binary (the Windows PowerShell installer also adds the install directory to your user PATH) …" so it no longer claims nothing persistent is written outside the install dir.

The PowerShell installer's minimal path calls Show-PathAdvice, which
persistently writes the user PATH — so "no persistent state is written
outside $installDir" overpromised. Reword the install.ps1 comment and the
installation docs to describe what minimal mode skips (sidecar, agent
runtime, per-agent integrations) and note the binary + PATH entry are still
added on Windows. Addresses the second Copilot review on backnotprop#989.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installer script write trash I don't want to

2 participants