fix(cli): skip editors the skills installer rejects instead of failing init - #259
Conversation
Greptile SummaryThe PR makes
Confidence Score: 4/5The 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
Reviews (1): Last reviewed commit: "fix(cli): skip editors the skills instal..." | Re-trigger Greptile |
…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
c06ab8f to
a0b275b
Compare
What went wrong
A single
npx tigris@latest initrun hit two separate problems:Skills installed for nobody.
initpasses every selected editor to the upstreamskillsinstaller in one call, and that tool validates all of its-anames 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
zedandantigravity-cli) are valid inskills1.5.23, verified against the real installer. The failing run had a staleskillsin its npx cache that predated Zed support —npx skillsreuses a cached release without consulting the registry.The banner printed twice, the second time painted over the wizard's own prompts.
postinstall.cjswrites it straight to/dev/tty, so it escapes the captured stdio of thenpm install -gthatinit(viatigris update) runs.Changes
skills@latestso npx resolves the current release instead of a cached one — this removes the root cause.initwarnsSkills: 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.TIGRIS_NO_BANNER=1(same idiom as the existingTIGRIS_NO_UPDATE_CHECK). A first-time install still gets its banner.New
rejectedAgents/splitRejectedEditorsininit/shared.tsread 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
skills add -a bogus-editorrun.pnpm lint,tsc --noEmit, CLI build, and 916 unit tests pass.postinstall.cjs: block reached with no env var, skipped atTIGRIS_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 initno longer aborts the entire skills step when the upstream installer rejects one editor (e.g. a stale npx cache that doesn't knowzed). It also stops the package postinstall banner from painting over the wizard.Skills install now uses
skills@latestso npx doesn't reuse an old cached release. If the installer still reportsInvalid agents: …,installSkillswarns, drops those editors, and retries the rest. Unrelated failures (network, clone, permissions) are still shown as errors and do not drop editors.tigris initandtigris updatesetTIGRIS_NO_BANNER=1so 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.