npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@raphaellcs/process-manager

v1.0.0

Published

Simple process manager for Node.js applications

Readme

@raphaellcs/process-manager

A simple and lightweight process manager for Node.js applications.

Features

  • 🚀 Start processes with ease
  • 🛑 Stop running processes
  • 🔄 Restart processes
  • 📋 List all managed processes
  • 📝 Log management and viewing
  • 👻 Daemon mode for background processes

Installation

# Use with npx (no installation needed)
npx @raphaellcs/process-manager --help

# Or install globally
npm install -g @raphaellcs/process-manager

Usage

Start a Process

# Start a Node.js application
npx @raphaellcs/process-manager start "node app.js"

# Start with a custom name
npx @raphaellcs/process-manager start "node server.js" --name web-server

# Start in background (daemon mode)
npx @raphaellcs/process-manager start "npm start" --name api --daemon

# Specify custom log file
npx @raphaellcs/process-manager start "node app.js" --log custom.log

Stop a Process

# Stop by PID
npx @raphaellcs/process-manager stop 12345

# Stop by name
npx @raphaellcs/process-manager stop web-server

Restart a Process

# Restart by PID
npx @raphaellcs/process-manager restart 12345

# Restart by name
npx @raphaellcs/process-manager restart web-server

List Processes

# List all managed processes
npx @raphaellcs/process-manager list

View Logs

# Show last 20 lines of log
npx @raphaellcs/process-manager logs web-server

# Show last 50 lines
npx @raphaellcs/process-manager logs web-server --lines 50

# Follow log output (like tail -f)
npx @raphaellcs/process-manager logs web-server --follow

Examples

Example 1: Start a Web Server

$ npx @raphaellcs/process-manager start "node server.js" --name web-server --daemon
✓ Process started as daemon: web-server
PID: 12345
Log: web-server.log
To stop: process-manager stop 12345

Example 2: List All Processes

$ npx @raphaellcs/process-manager list

📋 Managed Processes:

  ● Running web-server
    PID: 12345
    Command: node server.js
    Log: web-server.log
    Daemon: Yes

  ● Running api-server
    PID: 12346
    Command: npm start
    Log: api-server.log
    Daemon: Yes

Example 3: Stop a Process

$ npx @raphaellcs/process-manager stop web-server
✓ Process stopped: 12345

Example 4: Restart a Process

$ npx @raphaellcs/process-manager restart api-server
✓ Process restarted: api-server
New PID: 12347

Example 5: View Logs

$ npx @raphaellcs/process-manager logs web-server --lines 10

Server started on port 3000
GET /api/users 200
GET /api/posts 200
GET /api/users 200
POST /api/users 201
...

Example 6: Follow Logs

$ npx @raphaellcs/process-manager logs web-server --follow

Server started on port 3000
GET /api/users 200
GET /api/posts 200
...
(new log lines will appear in real-time)

Options

Start Command

  • -n, --name <name> - Process name (default: process-)
  • -l, --log <file> - Log file path (default: .log)
  • -d, --daemon - Run as daemon (background)

Logs Command

  • -f, --follow - Follow log output (tail -f)
  • -n, --lines <number> - Number of lines to show (default: 20)

Process Management

Configuration File

Process information is stored in .pm-config.json:

{
  "web-server": {
    "pid": 12345,
    "command": "node server.js",
    "logFile": "web-server.log",
    "daemon": true,
    "started": 1707715200000
  }
}

Stopping Processes

Processes are stopped gracefully with SIGTERM. If you need to force kill:

kill -9 <PID>

Auto-cleanup

When a process exits naturally, it's automatically removed from the configuration.

Use Cases

  • 🌐 Web Servers: Manage Node.js HTTP servers
  • 🤖 Bots: Keep chatbots running
  • 📊 Workers: Run background processing jobs
  • 🔔 Monitors: Watch files and run tasks
  • 🎯 Dev Tools: Start dev servers in background
  • 📈 Scrapers: Run web scrapers in background

Best Practices

1. Use Meaningful Names

# Good
npx @raphaellcs/process-manager start "npm start" --name api-server

# Not as helpful
npx @raphaellcs/process-manager start "npm start" --name proc-123

2. Use Daemon Mode for Long-running Processes

# Run as daemon for background execution
npx @raphaellcs/process-manager start "node bot.js" --name telegram-bot --daemon

3. Separate Logs for Each Process

# Use custom log files
npx @raphaellcs/process-manager start "node api.js" --name api --log logs/api.log
npx @raphaellcs/process-manager start "node worker.js" --name worker --log logs/worker.log

4. Monitor with Logs

# Start process
npx @raphaellcs/process-manager start "node app.js" --name app --daemon

# Follow logs in another terminal
npx @raphaellcs/process-manager logs app --follow

Comparison with PM2

| Feature | @raphaellcs/process-manager | PM2 | |---------|---------------------------|------| | Simplicity | ✅ Very simple | ❌ More complex | | Process Management | ✅ Start/Stop/Restart | ✅ Full-featured | | Clustering | ❌ No | ✅ Yes | | Log Management | ✅ Basic | ✅ Advanced | | Monitoring | ❌ No | ✅ Yes | | Zero Config | ✅ Yes | ❌ Requires setup | | Use Case | Simple dev setups | Production apps |

Use @raphaellcs/process-manager when:

  • You need simple process management
  • You're working on development
  • You don't need advanced features

Use PM2 when:

  • You need production-ready features
  • You need clustering
  • You need advanced monitoring

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

License

MIT

Author

Dream Heart 🌙

Links