Overview
When you runpumu without any subcommand, it operates in default mode (also called “refresh mode”). This mode automatically detects the package manager in the current directory, removes its dependency folder, and reinstalls all dependencies.
This is useful when you want to quickly refresh a single project’s dependencies without scanning your entire filesystem.
Usage
Flags
Root path to scan and refresh. Defaults to the current directory.
Display the version of pumu and exit.
Display help information for pumu.
How It Works
-
Detects the package manager by checking for lockfiles and manifests in priority order:
- Bun (
bun.lockb,bun.lock) - pnpm (
pnpm-lock.yaml) - Yarn (
yarn.lock) - npm (
package-lock.json) - Deno (
deno.json,deno.jsonc) - Cargo (
Cargo.toml) - Go (
go.mod) - Pip (
requirements.txt,pyproject.toml)
- Bun (
-
Removes the corresponding dependency folder (
node_modules,target,.venv, etc.) - Reinstalls dependencies using the detected package manager
Examples
Refresh Current Directory
Run pumu in your project directory to refresh dependencies:Refresh Specific Directory
You can specify a different directory using the--path flag:
Check Version
Display the current version of pumu:Common Use Cases
Fix Broken Dependencies
When your dependencies are in a bad state, refresh them:Clean Install After Branch Switch
After switching git branches, ensure dependencies are fresh:Reset Development Environment
Quickly reset your project to a clean state:Default mode only works when run inside a project directory with a detectable package manager. If you want to scan multiple projects recursively, use the
sweep command instead.Supported Package Managers
| Package Manager | Detection File | Dependency Folder | Install Command |
|---|---|---|---|
| Bun | bun.lockb, bun.lock | node_modules | bun install |
| pnpm | pnpm-lock.yaml | node_modules | pnpm install |
| Yarn | yarn.lock | node_modules | yarn install |
| npm | package-lock.json | node_modules | npm install |
| Deno | deno.json, deno.jsonc | node_modules | deno install |
| Cargo | Cargo.toml | target | cargo build |
| Go | go.mod | N/A | go mod download |
| Pip | requirements.txt, pyproject.toml | .venv | pip install |