fix(cli): fix zsh completions and eliminate Node.js/npm startup bottleneck - #596
Conversation
Replace `_atomic "$@"` with `compdef _atomic atomic` for correct zsh completion registration and skip the heavy auto-sync path when running the `completions` subcommand. Remove the entire Node.js/npm bootstrap chain (fnm, ensureNpmInstalled, upgradeNpm) from spawn.ts and flatten auto-sync into a single parallel phase using bun for global package installs, cutting ~48 s off first-run startup. Switch skills.ts from npx to bunx. Assistant-model: Claude Code
…l installs Remove the `ghcr.io/devcontainers/features/node:1` dependency from all three devcontainer features (claude, copilot, opencode) and the root devcontainer.json. Global CLI tool installs now use `bun install -g` instead of npm, matching the runtime already in use. Bump feature versions to 1.0.11. Assistant-model: Claude Code
Code ReviewSolid hotfix — the gains here are real: cutting the ~48 s fnm/Node bootstrap, removing ~225 lines of platform-specific shell-out code, fixing a broken zsh completion, and skipping A few things worth tightening before merge: 🐛 Bugs1. Windows-broken const isBunx = runner.endsWith(\"bunx\");
const bunxPath = Bun.which(\"bunx\");
const npxPath = bunxPath ? null : Bun.which(\"npx\");
const runner = bunxPath ?? npxPath;
if (!runner) return { ok: false, details: \"neither bunx nor npx found on PATH\" };
const cmd = bunxPath
? [runner, \"skills\", ...args]
: [runner, \"--yes\", \"skills\", ...args];2. This works for the canonical
|
Summary
Fixes broken zsh shell completions and removes the ~48s Node.js/npm installation bottleneck from the startup auto-sync flow by migrating all global package management from npm to bun.
Key Changes
Bug Fixes
_atomic "$@"withcompdef _atomic atomicin the generated completion script for correct zsh completion registrationatomic completionsinvocations so tab-completion does not trigger the setup flowPerformance
@playwright/cli,@llamaindex/liteparse, andskillsinstalls now run concurrently on startup with no blocking Node.js downloadRefactor
src/lib/spawn.ts: DeleteensureNpmInstalled,upgradeNpm, andinstallNodeViaFnm(~210 lines removed);upgradeGlobalPackagenow usesbun install -g --trustsrc/services/system/skills.ts: Usebunx(falling back tonpx) for running theskillsCLI toolghcr.io/devcontainers/features/node:1dependency; replace NVM/npm global install script withbun install -g --trust.devcontainer/devcontainer.json: Remove Node.js devcontainer feature