Skip to main content

Overview

When you run pumu 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

pumu [flags]

Flags

-p, --path
string
default:"."
Root path to scan and refresh. Defaults to the current directory.
-v, --version
boolean
default:"false"
Display the version of pumu and exit.
-h, --help
boolean
default:"false"
Display help information for pumu.

How It Works

  1. 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)
  2. Removes the corresponding dependency folder (node_modules, target, .venv, etc.)
  3. Reinstalls dependencies using the detected package manager

Examples

Refresh Current Directory

Run pumu in your project directory to refresh dependencies:
cd ~/projects/webapp
pumu
Example Output:
Running refresh in current directory...
🔍 Detected package manager: npm
🗑️  Removing node_modules...
✅ Removed in 1.23s
📦 Running npm install...
[npm install output...]
🎉 Refresh complete!

Refresh Specific Directory

You can specify a different directory using the --path flag:
pumu --path ~/projects/rust-app
Example Output:
Running refresh in /home/user/projects/rust-app...
🔍 Detected package manager: cargo
🗑️  Removing target...
✅ Removed in 2.45s
📦 Running cargo build...
[cargo build output...]
🎉 Refresh complete!

Check Version

Display the current version of pumu:
pumu --version
# or
pumu -v
Example Output:
pumu version v1.2.1-rc.1

Common Use Cases

Fix Broken Dependencies

When your dependencies are in a bad state, refresh them:
cd ~/projects/webapp
pumu

Clean Install After Branch Switch

After switching git branches, ensure dependencies are fresh:
git checkout feature-branch
pumu

Reset Development Environment

Quickly reset your project to a clean state:
pumu && npm run dev
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.
This command will delete your dependency folder. Make sure you have your lockfile committed to version control so dependencies can be restored exactly.

Supported Package Managers

Package ManagerDetection FileDependency FolderInstall Command
Bunbun.lockb, bun.locknode_modulesbun install
pnpmpnpm-lock.yamlnode_modulespnpm install
Yarnyarn.locknode_modulesyarn install
npmpackage-lock.jsonnode_modulesnpm install
Denodeno.json, deno.jsoncnode_modulesdeno install
CargoCargo.tomltargetcargo build
Gogo.modN/Ago mod download
Piprequirements.txt, pyproject.toml.venvpip install
  • list - Preview heavy folders without deleting
  • sweep - Delete dependency folders across multiple projects
  • repair - Fix corrupted dependencies automatically
  • prune - Smart cleanup based on staleness score

Build docs developers (and LLMs) love