Skip to content

Prompt to install the Allium CLI when it's missing#51

Merged
yavorpanayotov merged 1 commit into
mainfrom
cli-install-notice
Jun 22, 2026
Merged

Prompt to install the Allium CLI when it's missing#51
yavorpanayotov merged 1 commit into
mainfrom
cli-install-notice

Conversation

@yavorpanayotov

Copy link
Copy Markdown
Collaborator

What

When the allium binary isn't on PATH, the post-write hook used to exit silently — so a user could edit specs indefinitely with no formal checking and no hint the CLI existed. This makes the CLI discoverable without forcing it.

On the first .allium edit with no CLI present, the hook now surfaces a one-time notice explaining what the CLI adds (structural verification the model can't do reliably alone) and instructs the model to offer to install it — with the platform-appropriate command and a single confirmation. Nothing is installed without the user's go-ahead.

"Shown once" marker

A marker suppresses repeats, tried in order:

  1. Per-machine — cache dir ($XDG_CACHE_HOME/~/.cache/allium/…).
  2. Project fallback.allium-cli-notice-shown in the project root, when the cache dir isn't writable (worth .gitignore-ing; the notice says so).
  3. Neither writable — the notice recurs, but tells the user it couldn't be saved and hands off to manual installation, asking them to confirm they'll install it themselves before continuing.

The notice never fires for non-.allium or out-of-root edits, and self-disables once the binary is on PATH.

Tests

hooks/allium-check.test.mjs extended from 74 → 95 assertions, covering: first-edit notice, once-only suppression, fresh-cache re-show, scope (no notice on non-spec / out-of-root edits), the project fallback (marker created, re-firing suppressed), and the both-unwritable handoff (skipped under root, which bypasses dir permissions).

🤖 Generated with Claude Code

The post-write hook previously exited silently when the `allium` binary
wasn't on PATH, so a user could edit specs indefinitely with no formal
checking and no hint the CLI existed. On the first .allium edit with no
CLI present, the hook now surfaces a one-time notice explaining what the
CLI adds and instructing the model to offer to install it (with the
platform-appropriate command and a single confirmation).

A "shown once" marker suppresses repeats: the per-machine cache dir
first, falling back to a `.allium-cli-notice-shown` file in the project
root when the cache isn't writable. Only when neither is writable does
the notice recur, in which case it says so and hands off to manual
installation. The notice never fires for non-spec or out-of-root edits,
and self-disables once the binary is on PATH.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yavorpanayotov yavorpanayotov merged commit 05296f4 into main Jun 22, 2026
1 check passed
@yavorpanayotov yavorpanayotov deleted the cli-install-notice branch June 22, 2026 09:37
yavorpanayotov added a commit that referenced this pull request Jun 22, 2026
Minor bump for the CLI install notice added in #51: new backward-compatible
behaviour (first-run install prompt, install offer, marker files), no breaking
changes.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yavorpanayotov added a commit to juxt/claude-plugins that referenced this pull request Jun 22, 2026
Pin scripts/allium-ref.txt to v3.5.0 and re-vendor plugins/allium via
scripts/sync-allium.sh. Ships the CLI install notice (juxt/allium#51) and
the accompanying version bump (juxt/allium#52) to the marketplace.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant