Skip to content
Development
Command

/setup-pm

Configure your preferred package manager (npm/pnpm/yarn/bun)

From plugin
awesome-claude-notes
26460 skills29 agents60 commands7 hooks
Install
> /plugin marketplace add loulanyue/awesome-claude-notes
> /plugin install awesome-claude-notes@awesome-claude-notes

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/setup-pm

Context preview

What this command does when you run it.

Configure your preferred package manager (npm/pnpm/yarn/bun)

Command definition

setup-pm.md
description: Configure your preferred package manager (npm/pnpm/yarn/bun)
disable-model-invocation: true

Package Manager Setup

Configure your preferred package manager for this project or globally.

Usage

# Detect current package manager
node scripts/setup-package-manager.js --detect

# Set global preference
node scripts/setup-package-manager.js --global pnpm

# Set project preference
node scripts/setup-package-manager.js --project bun

# List available package managers
node scripts/setup-package-manager.js --list

Detection Priority

When determining which package manager to use, the following order is checked:

1. **Environment variable**: `CLAUDE_PACKAGE_MANAGER` 2. **Project config**: `.claude/package-manager.json` 3. **package.json**: `packageManager` field 4. **Lock file**: Presence of package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb 5. **Global config**: `~/.claude/package-manager.json` 6. **Fallback**: First available package manager (pnpm > bun > yarn > npm)

Configuration Files

Global Configuration

// ~/.claude/package-manager.json
{
  "packageManager": "pnpm"
}

Project Configuration

// .claude/package-manager.json
{
  "packageManager": "bun"
}

package.json

{
  "packageManager": "pnpm@8.6.0"
}

Environment Variable

Set `CLAUDE_PACKAGE_MANAGER` to override all other detection methods:

# Windows (PowerShell)
$env:CLAUDE_PACKAGE_MANAGER = "pnpm"

# macOS/Linux
export CLAUDE_PACKAGE_MANAGER=pnpm

Run the Detection

To see current package manager detection results, run:

node scripts/setup-package-manager.js --detect

Navigation

  • [Command → Agent / Skill Map](../docs/COMMAND-AGENT-MAP.md)
  • [Agents index](../AGENTS.md)
  • [Contexts directory](../contexts)
  • [Contributing guide](../CONTRIBUTING.md)
Read more
Ships withawesome-claude-notes

Community-maintained distribution of reusable AI coding agents, commands, skills, hooks, and cross-harness workflows.

Get the whole plugin