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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mnmsys/mnmagent

v1.0.23

Published

MnM Agent - Cross-platform process manager with CLI interface. Requires administrator/root privileges for service installation.

Readme

# MnM Agent - Cross-Platform Process Manager

MnM Agent is a robust cross-platform process manager with CLI interface that works on Windows, Linux, and macOS. It provides a Unix Domain Socket (UDS) server for managing applications and processes, with automatic service installation capabilities.

Features

  • Cross-Platform Support: Windows, Linux, and macOS
  • Process Management: Start, stop, restart, and monitor applications
  • Service Integration: Automatically installs as a system service
  • CLI Interface: Easy-to-use command-line tools
  • Configuration Management: Centralized configuration files
  • User Management: Create and manage users for applications (Linux/macOS)
  • Logging: Comprehensive logging for all managed processes

Installation

Prerequisites

Administrator/Root Privileges Required: MnM Agent automatically installs as a system service, which requires elevated privileges.

Global Installation

Linux/macOS:

sudo npm install -g @mnmsys/mnmagent

Windows:

# Run PowerShell as Administrator, then:
npm install -g @mnmsys/mnmagent

This will:

  1. ✅ Install the package globally
  2. ✅ Create the mnm CLI command
  3. Automatically install and start the system service
  4. ✅ Create necessary configuration directories
  5. ✅ Set up proper permissions

Verification

Check if the service is running:

Linux:

sudo systemctl status mnm

Windows:

sc query mnm

macOS:

sudo launchctl list | grep com.mnm.agent

Platform-Specific Service Installation

Linux (systemd)

  • Creates a systemd service file at /etc/systemd/system/mnm.service
  • Enables and starts the service automatically
  • Requires root privileges (sudo npm install -g mnmagent)

Windows

  • Creates a Windows service using the Service Control Manager
  • Starts automatically on system boot
  • Requires Administrator privileges

macOS

  • Creates a LaunchDaemon plist file
  • Manages the service through launchctl
  • Requires root privileges (sudo npm install -g mnmagent)

Configuration

Environment Variables

Create a process.env file or set environment variables:

TENANTID=your_tenant_id
TENANTTOKEN=your_tenant_token
SOCKETPATH=/tmp/mnm_admin_socket  # Unix/Linux/macOS
# SOCKETPATH=\\\\.\\pipe\\mnm_admin_socket  # Windows (automatic)

Configuration Files

Linux/macOS

  • Primary config: /etc/mnm/pm.cnf
  • App config: /etc/mnm/app.conf
  • Logs: /var/log/mnm/

Windows

  • Primary config: C:\\ProgramData\\mnm\\pm.cnf
  • App config: C:\\ProgramData\\mnm\\app.conf
  • Logs: Windows Event Log

Usage

CLI Commands

Once installed, use the mnm command to interact with the service:

# List all managed processes
mnm list

# Start an application
mnm start <appName> <appPath> <uid> [args]

# Stop an application
mnm stop <appName>

# Restart an application
mnm restart <appName>

# View application logs
mnm logs <appName>

# Remove an application from management
mnm remove <appName>

# Add a new application to management
mnm add --appName myapp --modulePath /path/to/app --username appuser

# Initialize configuration
mnm init '{"setting": "value"}'

Interactive Mode

Run mnm without arguments to enter interactive mode:

mnm
> list
> start myapp /path/to/app 1000
> logs myapp
> exit

Local Development and Testing

Testing Locally

  1. Clone the repository
  2. Install dependencies: npm install
  3. Build the project: npm run build
  4. Test locally: npm run test:local

Development Mode

# Start in development mode with auto-reload
npm run dev

# Build the project
npm run build

# Start the built version
npm start

Troubleshooting

Service Won't Start

  1. Check if another instance is running
  2. Verify socket path permissions
  3. Check system logs for errors
  4. Ensure proper user privileges

Permission Issues

  • Linux/macOS: Run installation with sudo
  • Windows: Run Command Prompt as Administrator
  • Verify file system permissions on config directories

Socket Connection Issues

  • Check if firewall is blocking the socket
  • Verify socket path in configuration
  • Ensure service is actually running

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test on multiple platforms
  5. Submit a pull request

License

MIT License - see LICENSE file for details.