Skip to content

fix(cli): skip editors the skills installer rejects instead of failing init - #259

Merged
designcode merged 1 commit into
mainfrom
fix/cli/init-graceful-editor-skip
Aug 21, 2026
Merged

fix(cli): skip editors the skills installer rejects instead of failing init#259
designcode merged 1 commit into
mainfrom
fix/cli/init-graceful-editor-skip

Conversation

@designcode

@designcode designcode commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

What went wrong

A single npx tigris@latest init run hit two separate problems:

◇  Installing 14 Tigris skill(s) (project) — failed
   Invalid agents: zed

Skills installed for nobody. init passes every selected editor to the upstream skills installer in one call, and that tool validates all of its -a names before doing any work — so one name it doesn't know fails the step for every editor. A user with Zed selected got no skills, in any editor.

The names aren't wrong: all 10 agents we map (including zed and antigravity-cli) are valid in skills 1.5.23, verified against the real installer. The failing run had a stale skills in its npx cache that predated Zed support — npx skills reuses a cached release without consulting the registry.

The banner printed twice, the second time painted over the wizard's own prompts. postinstall.cjs writes it straight to /dev/tty, so it escapes the captured stdio of the npm install -g that init (via tigris update) runs.

Changes

  • Pin the installer to skills@latest so npx resolves the current release instead of a cached one — this removes the root cause.
  • Skip, don't fail. When the installer does reject an editor, init warns Skills: installer has no support for Zed — skipped. and retries with the remaining editors. If none are left, it reports a skip. Failures with another cause (offline, clone refused) are reported as before and drop nobody, so we never silently install less than asked.
  • Suppress the postinstall banner in children the CLI spawns to install or update itself, via TIGRIS_NO_BANNER=1 (same idiom as the existing TIGRIS_NO_UPDATE_CHECK). A first-time install still gets its banner.

New rejectedAgents / splitRejectedEditors in init/shared.ts read the rejected names off the installer's failure output — matched against the names we passed rather than by parsing its valid-agents list, and ANSI-stripped so colour codes can't run into a name.

Testing

  • 20 new unit tests, with fixtures taken verbatim from a real skills add -a bogus-editor run.
  • pnpm lint, tsc --noEmit, CLI build, and 916 unit tests pass.
  • Banner guard exercised directly against postinstall.cjs: block reached with no env var, skipped at TIGRIS_NO_BANNER=1, still reached at =0, exit code 0 throughout.
  • test/cli.test.ts (credential-gated integration) is untouched; it hits a vitest worker-timeout locally without Tigris creds.

Note: the banner fix only takes effect once the version being installed is one carrying the guarded postinstall.cjs.

🤖 Generated with Claude Code


Note

Low Risk
CLI onboarding UX only: skills retry logic and a postinstall env flag. No auth, data, or API surface changes.

Overview
tigris init no longer aborts the entire skills step when the upstream installer rejects one editor (e.g. a stale npx cache that doesn't know zed). It also stops the package postinstall banner from painting over the wizard.

Skills install now uses skills@latest so npx doesn't reuse an old cached release. If the installer still reports Invalid agents: …, installSkills warns, drops those editors, and retries the rest. Unrelated failures (network, clone, permissions) are still shown as errors and do not drop editors.

tigris init and tigris update set TIGRIS_NO_BANNER=1 so postinstall skips writing to /dev/tty. A first-time install still shows the banner.

Reviewed by Cursor Bugbot for commit a0b275b. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown

Greptile Summary

The PR makes tigris init invoke the latest skills installer, classify unsupported editor names, retry installation for supported editors, and suppress the postinstall banner during self-installation and updates.

  • Adds unsupported-editor parsing and retry behavior to interactive initialization.
  • Propagates TIGRIS_NO_BANNER=1 through CLI-managed installation and update processes.
  • Adds unit coverage for installer arguments, ANSI-tolerant rejection parsing, and editor splitting.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking testing gap around the newly added command-level retry flow.

The parsing inputs are fixed and escaped, banner suppression is narrowly scoped, and no current runtime defect was established; however, the branch that retries the external installer and reports its outcome lacks direct behavioral coverage.

Files Needing Attention: packages/cli/src/lib/init/interactive.ts, packages/cli/test/lib/init/shared.test.ts

Important Files Changed

Filename Overview
packages/cli/src/lib/init/interactive.ts Adds the skills-install retry and reporting flow; its orchestration is not directly exercised by tests.
packages/cli/src/lib/init/shared.ts Pins the installer and adds bounded, escaped parsing of rejected editor identifiers with comprehensive helper tests.
packages/cli/src/lib/init/index.ts Sets the banner-suppression environment variable before interactive and agent initialization paths spawn children.
packages/cli/src/lib/update.ts Passes a copied environment with banner suppression to the self-update command.
packages/cli/postinstall.cjs Skips only banner rendering when explicitly suppressed, while preserving the preceding skill-copy setup.
packages/cli/test/lib/init/shared.test.ts Thoroughly covers parsing and splitting helpers but omits command-level retry behavior.

Reviews (1): Last reviewed commit: "fix(cli): skip editors the skills instal..." | Re-trigger Greptile

Comment thread packages/cli/src/lib/init/interactive.ts
…g init

`init` hands every selected editor to the upstream `skills` installer in one
call, and that tool validates all `-a` names before doing any work — so one
name it doesn't know fails the step for every editor. Selecting Zed against a
cached older installer produced `Invalid agents: zed` and no skills anywhere.

- Pin the installer to `skills@latest`; npx otherwise reuses a cached release
  that predates newer agent names.
- When it does reject an editor, warn about that one and retry with the rest.
- Suppress the postinstall banner in children spawned to install or update the
  CLI (TIGRIS_NO_BANNER). It writes straight to /dev/tty, escaping captured
  stdio, and was painting a second banner over the init wizard.

Assisted-by: Claude Opus 5 (1M context) via Claude Code
@designcode
designcode force-pushed the fix/cli/init-graceful-editor-skip branch from c06ab8f to a0b275b Compare August 21, 2026 10:10
@designcode
designcode merged commit 45e8661 into main Aug 21, 2026
2 checks passed
@designcode
designcode deleted the fix/cli/init-graceful-editor-skip branch August 21, 2026 12:05
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.

2 participants