Skip to content

Use detected package manager in CLI messages and docs #487

Closed

Description

@admarble

Problem

All CLI user-facing messages and documentation hardcode npm commands for installing/updating/removing sequant. Users with pnpm, yarn, or bun projects get confusing errors (e.g., npm update sequant in a pnpm project gives Cannot read properties of null (reading 'matches')).

Sequant already detects the project's package manager from lockfiles via detectPackageManager() — but the detection isn't used in CLI output messages or docs.

Changes needed

CLI code

  • Add addPkg, removePkg, updatePkg fields to PackageManagerConfig / PM_CONFIG in src/lib/stacks.ts
  • Add sync detectPackageManagerSync() for use in synchronous startup code
  • src/lib/version-check.ts:225 — npm update sequant → use detected PM
  • bin/cli.ts:80 — npm uninstall sequant → use detected PM
  • bin/cli.ts:307 — npm install @modelcontextprotocol/sdk → use detected PM

Documentation (show all PMs)

  • README.md — lines 37, 44
  • docs/getting-started/installation.md — lines 71, 79
  • docs/reference/cheat-sheet.md — line 12
  • docs/concepts/what-is-sequant.md — line 325
  • docs/troubleshooting.md — lines 163, 177

Context

Discovered when running npm update sequant in a pnpm monorepo — npm crashes trying to parse pnpm's lockfile. This is a user-side mistake but our docs and CLI messages push users toward it.

Activity

  1. admarble commented on Apr 5, 2026

    @admarble
    ContributorAuthor

    Documentation Generated

    File: docs/features/package-manager-detection.md (updated existing doc)

    Changes:

    • Added CLI message adaptation to "Where Commands Are Used" section
    • Expanded command mapping table with Add/Remove/Update Package columns
    • Added "Installing Sequant" section with all 4 package managers (npx, local, global)
    • Added troubleshooting entry for the "Cannot read properties of null" npm/pnpm mismatch error

    Also updated in this issue:

    • README.md — install section shows all PMs
    • docs/getting-started/installation.md — global + local install sections show all PMs
    • docs/reference/cheat-sheet.md — install section shows all PMs
    • docs/concepts/what-is-sequant.md — simplified to npx-only quick start
    • docs/troubleshooting.md — install/update suggestions show all PMs

    Next Steps:

    1. Review generated documentation for accuracy
    2. Merge PR to deploy documentation

    Ready to merge!

  2. added a commit that references this issue on Apr 5, 2026
  3. admarble commented on Apr 6, 2026

    @admarble
    ContributorAuthor

    Completed in f76e116 (merged to main).

  4. added a commit that references this issue on Jul 30, 2026
  5. added a commit that references this issue on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions