Skip to content

stash CLI help banners and "Next steps" panel hard-code npx regardless of runner #385

@coderdan

Description

@coderdan

Symptom

Running the CLI via any non-npx runner shows examples and suggested commands using npx @cipherstash/cli regardless of how the user invoked it:

$ bunx @cipherstash/cli --help
Usage: npx @cipherstash/cli <command> [options]   ← should be `bunx`
Examples:
  npx @cipherstash/cli init                       ← copy-pasting these fails
  npx @cipherstash/cli auth login                  if the user doesn't have npm
  ...
$ pnpm dlx @cipherstash/cli auth --help
Usage: npx @cipherstash/cli auth <command> [options]   ← should be `pnpm dlx`
$ bunx @cipherstash/cli db install
... installation succeeds ...
┌  What next
│
│  1. Wire up encrypt/decrypt with the wizard (AI-guided, automated):
│       npx @cipherstash/wizard                   ← should be `bunx @cipherstash/wizard`
│
│  2. Or use the client directly from @cipherstash/stack:
│       import { Encryption } from '@cipherstash/stack'

The requireStack hint shown when @cipherstash/stack isn't installed (e.g. running db push on a fresh project) similarly suggests npm install and npx @cipherstash/cli init regardless of runner.

Affected versions

@cipherstash/cli 0.10.x and earlier. The DB-command intros and warnings were addressed in a separate PR; the help banners and the wizard "Next steps" reference remain.

Fix

#379 already shipped runnerCommand(pm, ref) and detectPackageManager(). Sweep the remaining places (top-level HELP, auth HELP, printNextSteps in db install, the requireStack hint) to use them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions