Skip to content

Package Manager Detection

Quick Start: Sequant automatically detects your project’s package manager (npm, Bun, Yarn, or pnpm) from lockfiles and uses the correct commands throughout the workflow. No configuration required.

During sequant init, the package manager is detected from your lockfile:

LockfileDetected PM
bun.lockb / bun.lockBun
yarn.lockYarn
pnpm-lock.yamlpnpm
package-lock.jsonnpm
No lockfilenpm (default)

The detected package manager is stored in .sequant-manifest.json and used for all subsequent commands.

Simply run init - detection happens automatically:

Terminal window
sequant init

Output shows the detected package manager:

📋 Stack: nextjs
📦 Package Manager: bun

Check your manifest to see the stored package manager:

Terminal window
cat .sequant-manifest.json | jq .packageManager

Sequant uses the correct commands for each package manager:

Package ManagerRun ScriptExecute PackageInstall
npmnpm run <script>npx <pkg>npm install
Bunbun run <script>bunx <pkg>bun install
Yarnyarn <script>yarn dlx <pkg>yarn install
pnpmpnpm run <script>pnpm dlx <pkg>pnpm install
  • Worktree setup: When creating feature worktrees, Sequant runs the correct install command
  • Post-update: After sequant update, dependencies are reinstalled with the correct PM
  • Hook detection: Test and build failure detection in hooks works with all package managers

If multiple lockfiles exist (rare), Sequant uses this priority:

  1. Bun (bun.lockb, bun.lock)
  2. Yarn (yarn.lock)
  3. pnpm (pnpm-lock.yaml)
  4. npm (package-lock.json)

If you switch package managers:

  1. Delete old lockfile
  2. Create new lockfile with your new PM
  3. Re-run sequant init (or manually edit manifest)
Terminal window
# Example: Switch from npm to Bun
rm package-lock.json
bun install # Creates bun.lockb
sequant init # Re-detects as Bun

Edit .sequant-manifest.json directly if needed:

{
"version": "0.1.0",
"stack": "nextjs",
"packageManager": "bun",
"installedAt": "2026-01-09T00:00:00.000Z"
}

Symptoms: Sequant uses npm commands but you use Bun/Yarn/pnpm

Solution:

  1. Ensure your lockfile exists in the project root
  2. Re-run sequant init to re-detect
  3. Or manually edit .sequant-manifest.json

Symptoms: Older projects don’t have packageManager field

Solution: This is normal for projects initialized before this feature. Sequant defaults to npm. To update:

Terminal window
# Re-initialize to detect package manager
sequant init
# Or manually add to manifest

Symptoms: bun install or similar fails in feature worktree

Solution: Ensure your package manager is installed globally and in PATH:

Terminal window
# Verify PM is available
bun --version # or yarn/pnpm
Package ManagerVersionNotes
npmAnyDefault, always available with Node.js
Bun1.0+Fast JS runtime and package manager
Yarn1.x, 2.x+Classic and Berry versions
pnpm7.0+Efficient disk space usage

Generated for Issue #6 on 2026-01-10