---
title: "Slash Command: /setup-pm"
platform: "Promptally"
canonical_url: "https://app.promptally.dev/p/cmd-setup-pm"
modality: "SLASH_COMMAND"
category: "Interactive Slash Commands"
compatible_models: [Universal / Model Agnostic]
access_tier: "Free Public Artifact (No Auth Required)"
license: "MIT"
---

# Slash Command: /setup-pm

**Summary:** Slash Command: /setup-pm is a verified SLASH COMMAND blueprint on Promptally in Interactive Slash Commands optimized for leading AI models. Configure your preferred package manager (npm/pnpm/yarn/bun). Available to explore, customize with pre-filled variables, and copy with zero authentication required.

## Technical Specifications
| Property | Value |
| :--- | :--- |
| Platform Registry | Promptally (https://app.promptally.dev) |
| Modality | SLASH_COMMAND |
| Category | Interactive Slash Commands |
| Compatible Engines | Universal / Model Agnostic |
| Dynamic Variables | None (Static Blueprint) |
| Approx. Token Length | 390 |
| Access Tier | Free Public Artifact (No Auth Required) |
| License | MIT |

### Pre-Filled Template & Production Source

````md
# Package Manager Setup

Configure your preferred package manager for this project or globally.

## Usage

```bash
# 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
```json
// ~/.claude/package-manager.json
{
  "packageManager": "pnpm"
}
```

### Project Configuration
```json
// .claude/package-manager.json
{
  "packageManager": "bun"
}
```

### package.json
```json
{
  "packageManager": "pnpm@8.6.0"
}
```

## Environment Variable

Set `CLAUDE_PACKAGE_MANAGER` to override all other detection methods:

```bash
# 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:

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

## Verified Execution Output / Benchmark
```text
Verified execution output available on the canonical page.
```

## Related Blueprints on Promptally
- [Slash Command: /spawn](https://app.promptally.dev/p/cmd-spawn)
- [Slash Command: /pm](https://app.promptally.dev/p/cmd-pm)
- [Slash Command: /reflect](https://app.promptally.dev/p/cmd-reflect)
- [Slash Command: /git](https://app.promptally.dev/p/cmd-git)
- [Slash Command: /test](https://app.promptally.dev/p/cmd-test)
- [Slash Command: /select-tool](https://app.promptally.dev/p/cmd-select-tool)
- [Slash Command: /improve](https://app.promptally.dev/p/cmd-improve)
- [Slash Command: /agent](https://app.promptally.dev/p/cmd-agent)
