Skip to main content

Installation

StackProbe can be installed globally, added as a dev dependency, or run directly with npx. Choose the method that works best for your workflow.

Quick Install

npm install -g stackprobe
For one-off audits or trying StackProbe without installing, use npx stackprobe audit. For regular use, install globally.

Add to Project Dev Dependencies

If you want to lock StackProbe to a specific version in your project:
npm install --save-dev stackprobe
Then add to your package.json scripts:
package.json
{
  "scripts": {
    "audit": "stackprobe audit",
    "precommit": "stackprobe audit --only deps,env"
  }
}

System Requirements

StackProbe requires:

Node.js >= 16.0.0

StackProbe is built with modern Node.js features and requires Node 16 or higher.

Check Your Node Version

node --version
If you’re on Node 14 or lower, upgrade using:
nvm install 18
nvm use 18

Verify Installation

After installing, verify StackProbe is working:
1

Check Version

stackprobe --version
Should output: 0.1.2 (or higher)
2

View Help

stackprobe --help
Expected output:
Usage: stackprobe [options] [command]

Audit your project before it becomes a problem

Options:
  -V, --version        output the version number
  -h, --help          display help for command

Commands:
  audit [options]     Run all checks on the current project
  help [command]      display help for command
3

Run Test Audit

Navigate to any Node.js project and run:
stackprobe audit
You should see output similar to:
πŸ” stackprobe β€” auditing your project...

βœ… license      PASS  (10ms)
βœ… env          PASS  (5ms)
βœ… deps         PASS  (1523ms)
βœ… engine       PASS  (4ms)
βœ… circular     PASS  (189ms)

────────────────────────────────────────────────
Summary  5 passed  in 1731ms

All checks passed. Ship it! πŸš€

What Gets Installed

StackProbe is a lightweight CLI with minimal dependencies:
  • Binary: stackprobe command available in your PATH
  • Dependencies:
    • commander - CLI argument parsing
    • chalk & picocolors - Terminal colors
    • semver - Version comparison
  • Size: ~500KB installed
StackProbe does NOT install heavy analysis tools like madge or depcheck. It uses lightweight built-in checks to keep installation fast.

Troubleshooting

If you installed globally but get command not found:
  1. Check your global npm bin path:
    npm config get prefix
    
  2. Ensure it’s in your PATH:
    echo $PATH
    
  3. Reinstall with correct permissions:
    sudo npm install -g stackprobe
    
Or use npx instead:
npx stackprobe audit
On Linux/macOS, you may need to fix npm permissions:
# Option 1: Use a Node version manager (recommended)
# Install nvm or n

# Option 2: Change npm's default directory
mkdir ~/.npm-global
npm config set prefix '~/.npm-global"
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
If you see errors about unsupported Node features:
Error: Requires Node >= 16.0.0
Upgrade Node using nvm:
nvm install 18
nvm alias default 18

Uninstalling

To remove StackProbe:
npm uninstall -g stackprobe

Next Steps

Now that StackProbe is installed, let’s run your first audit:

Quickstart Guide

Learn how to audit your first project in minutes

Build docs developers (and LLMs) love