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

nexusautobot

v1.0.3

Published

Advanced Process Manager for Discord Bots with Auto-Restart, Error Detection, and Shard Management

Readme

🚀 NexusAutoBot

Advanced Process Manager for Discord Bots - Built specifically for Discord.js with intelligent monitoring, auto-restart, and error detection.

npm version License: MIT

✨ Features

  • 🔄 Auto-Restart - Automatically restarts your bot on crash
  • 🧠 Intelligent Error Detection - Analyzes errors and determines severity
  • 📊 Discord.js Optimized - Built specifically for Discord bots
  • 🎯 Live Dashboard - Real-time monitoring with beautiful CLI interface
  • 🔔 Discord Webhook Notifications - Get notified directly in Discord
  • 🚦 Shard Management - Auto-sharding support for large bots
  • 📝 Advanced Logging - Keep track of everything
  • Zero Config - Works out of the box

📦 Installation

npm install -g nexusautobot

🎯 Quick Start

# Start your bot
nexus start bot.js --name my-bot

# View running bots
nexus list

# Open live dashboard
nexus dashboard

# View logs
nexus logs my-bot

# Stop bot
nexus stop my-bot

📖 Commands

Start a Bot

nexus start <file> [options]

Options:
  -n, --name <name>           Bot name
  -i, --instances <number>    Number of instances (default: 1)
  --shard                     Enable auto-sharding
  --webhook <url>             Discord webhook URL for notifications

Example:

nexus start bot.js --name "MyDiscordBot" --webhook "https://discord.com/api/webhooks/..."

List Running Bots

nexus list
# or
nexus ls

View Bot Status

nexus status <name>

View Logs

nexus logs <name> [options]

Options:
  -f, --follow              Follow log output
  -n, --lines <number>      Number of lines (default: 50)

Live Dashboard

nexus dashboard
# or
nexus dash

The dashboard shows:

  • 🤖 Running bots with status
  • 📜 Live logs
  • 📊 CPU & Memory usage
  • 📈 System statistics

Press q or ESC to exit.

Stop/Restart Bot

nexus stop <name>
nexus restart <name>

Delete Bot

nexus delete <name>
nexus delete-all

Configure Webhook

nexus webhook <name> <webhook-url>

Webhook notifications include:

  • ⚠️ Critical errors
  • 🔄 Auto-restarts
  • 🛑 Maximum restart limit reached
  • ✅ Bot started/stopped

🎨 Features in Detail

Intelligent Error Detection

NexusAutoBot analyzes errors and categorizes them:

  • Critical Errors (Auto-restart)

    • Invalid token
    • Connection failures
    • Memory issues
    • Fatal Node.js errors
  • Non-Critical Errors (No restart)

    • Rate limits
    • Missing permissions
    • Temporary Discord API issues

Discord.js Optimized Monitoring

  • Gateway ping tracking
  • Command usage statistics
  • Event monitoring
  • API call tracking
  • Memory leak detection
  • Shard health monitoring

Auto-Sharding Support

nexus start bot.js --shard

Automatically manages shards based on server count and optimizes distribution.

🔧 Configuration

NexusAutoBot stores configuration in ~/.nexusautobot/

  • config.json - Global settings
  • processes.json - Bot processes data

📊 Example Bot

// bot.js
const { Client, GatewayIntentBits } = require('discord.js');

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent
  ]
});

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}`);
});

client.on('messageCreate', (message) => {
  if (message.content === '!ping') {
    message.reply('Pong!');
  }
});

client.login(process.env.TOKEN);

Start it:

nexus start bot.js --name ping-bot --webhook <your-webhook>

🆚 NexusAutoBot vs PM2

| Feature | NexusAutoBot | PM2 | |---------|-------------|-----| | Discord.js Optimized | ✅ | ❌ | | Intelligent Error Detection | ✅ | ❌ | | Discord Webhook Integration | ✅ | ❌ | | Auto-Sharding | ✅ | ❌ | | Bot-Specific Monitoring | ✅ | ❌ | | General Process Management | ❌ | ✅ |

NexusAutoBot is built specifically for Discord bots, while PM2 is a general-purpose process manager.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

MIT License - see the LICENSE file for details

🙏 Acknowledgments

  • Built with ❤️ by the NexusHub Team
  • Inspired by PM2 but optimized for Discord bots

🐛 Bug Reports

Found a bug? Open an issue

📧 Support

🌟 Star History

If you find NexusAutoBot useful, please consider giving it a star on GitHub! ⭐


Made with 💙 for the Discord bot community