Fix first-run CLI command setup - #611
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9d373e4. Configure here.
| '', | ||
| 'To install the shorter "pascal" command:', | ||
| ' npm install --global @pascal-app/cli', | ||
| ]), |
There was a problem hiding this comment.
Wrong short command for transient runners
Medium Severity
useShortCommand treats every non-npx launch as if pascal is already installed. Documented transient runners like pnpm dlx and bunx never match isNpxInvocation and never run the global install, so the ready output still directs users to bare pascal commands that are not on PATH, and it omits the manual install hint.
Reviewed by Cursor Bugbot for commit 9d373e4. Configure here.
| environment.npm_lifecycle_event === 'npx' || | ||
| (environment.npm_command === 'exec' && | ||
| (environment.PATH ?? '').split(':').some((entry) => entry.includes('/_npx/'))) | ||
| ) |
There was a problem hiding this comment.
Windows npx detection uses Unix PATH
Low Severity
The npm exec branch of isNpxInvocation splits PATH on : and looks for /_npx/. On Windows, PATH is ;-separated and the npx cache uses backslashes, so real npx/npm exec runs can be missed. That skips global install and falls through to bare pascal guidance.
Reviewed by Cursor Bugbot for commit 9d373e4. Configure here.


Summary
npx ... editorstart becomes healthypascal statusavailable immediately in the unchanged shellnpxguidance when setup is non-interactive or global installation failsVerification
bunx biome check ...bun run --cwd packages/cli check-typesbun test packages/cli/src(26 passed)bun run --cwd packages/cli prepublishOnly/opt/homebrew/bin/pascal,pascal statusagainst port 57659Note
Medium Risk
Runs
npm install -gon user machines during first run (permissions/timeouts); editor startup is unaffected on failure but global npm state can change on success.Overview
Interactive
npx @pascal-app/cli editorruns now trigger a post-health-checknpm install --global --ignore-scripts @pascal-app/cli@<version>, sopascal status,logs, andstopwork in the same shell without a separate setup step.New
command-installlogic detects npx/npm-exec invocations and runs the global install with a timeout; failures are non-fatal and the success message falls back tonpxguidance plus manual install instructions. Non-interactive (--json, non-TTY) paths skip auto-install. README and smoke tests reflect the updated first-run contract.Reviewed by Cursor Bugbot for commit 9d373e4. Bugbot is set up for automated code reviews on this repo. Configure here.