| name | setup-pm |
| description | Imported from everything-codex command setup-pm |
| version | 0.1.0 |
| source | fork |
| checksum | 4fe6d5dc78ca286e9766448c5b48e5f23b67eb6770e4703ab44987791425d2e7 |
| updated_at | "2026-02-11T01:29:16.000Z" |
| layer | utility |
description: Configure your preferred package manager (npm/pnpm/yarn/bun)
disable-model-invocation: true
Package Manager Setup
Native Subagent Protocol (Codex)
Codex supports native subagents. Delegate with spawn_agent, coordinate with send_input, collect via wait_agent, and clean up with close_agent.
Execution preference:
- Use native subagents first for independent workstreams (parallel when possible).
- Merge results in main thread and run final verification.
- Fallback only when delegation is blocked: use the
[ANALYST]/[ARCHITECT]/[EXECUTOR]/[REVIEWER] structure in a single response.
Minimal orchestration pattern:
spawn_agent -> send_input (optional) -> wait_agent -> close_agent
Configure your preferred package manager for this project or globally.
Usage
If scripts/setup-package-manager.js exists in the repo, use it. Otherwise, configure manually via the files below.
node scripts/setup-package-manager.js --detect
node scripts/setup-package-manager.js --global pnpm
node scripts/setup-package-manager.js --project bun
node scripts/setup-package-manager.js --list
Detection Priority
When determining which package manager to use, the following order is checked:
- Environment variable:
CODEX_PACKAGE_MANAGER
- Project config:
.codex/package-manager.json
- package.json:
packageManager field
- Lock file: Presence of package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb
- Global config:
~/.codex/package-manager.json
- Fallback: First available package manager (pnpm > bun > yarn > npm)
Configuration Files
Global Configuration
{
"packageManager": "pnpm"
}
Project Configuration
{
"packageManager": "bun"
}
package.json
{
"packageManager": "pnpm@8.6.0"
}
Environment Variable
Set CODEX_PACKAGE_MANAGER to override all other detection methods:
$env:CODEX_PACKAGE_MANAGER = "pnpm"
export CODEX_PACKAGE_MANAGER=pnpm
Run the Detection
To see current package manager detection results, run:
node scripts/setup-package-manager.js --detect