pmpx
v2.1.2
Published
Smart package manager proxy CLI
Maintainers
Readme
pmpx
pmpx stands for "Package Manager Proxy" and is a versatile CLI tool designed to streamline your workflow by automatically detecting your project's package manager (pnpm, yarn, npm) and forwarding commands to it. With pmpx, you no longer need to remember or specify which package manager your project uses. It intelligently identifies the correct one based on your lockfile and seamlessly proxies all package manager commands. Just run your commands, and pmpx takes care of the rest.
Install
npm install -g pmpxUsage
pmpx add react # Equivalent to npm/yarn/pnpm add react
pmpx install # Equivalent to npm/yarn/pnpm install
pmpx run dev # Equivalent to npm/yarn/pnpm run devHow It Works
pmpx automatically detects your project's package manager by checking for:
pnpm-lock.yaml→ uses pnpmyarn.lock→ uses yarnpackage-lock.json→ uses npm
If no lockfile is found, it uses the configured default or falls back to npm.
Project Structure
The project is organized into a modular structure:
├── bin/ # Entry point for the CLI
├── dist/ # Compiled output files
├── docs/ # Documentation files
├── src/ # Source files (TypeScript)
│ ├── commands/ # CLI commands
│ └── utils/ # Utility functionsConfiguration
You can configure a default package manager to be used when no lockfile is detected:
pmpx pmpx-config set pm pnpm # Set default package manager to pnpm
pmpx pmpx-config get pm # Check current default package managerDevelopment
pmpx is built with TypeScript and uses modern development tools:
# Install dependencies
npm install
# Build the project
npm run build
# Run linting
npm run lint
# Format code
npm run formatFor more details on contributing, see the Contributing Guide.
Help
For a full list of commands and options:
pmpx helpDocumentation
License
MIT © Godswill Ezeala
