Skip to content

students-dev/create-cordgen

Repository files navigation

create-cordgen

Generate production-ready Discord bots from advanced templates

npm version CI status Discord license


✨ Features

  • 🚀 12 Advanced Templates - From starter bots to complex systems
  • 🎨 Interactive CLI - Beautiful terminal interface with Ink
  • 🔧 Optional Integrations - MongoDB, Redis, PostgreSQL, Lavalink, Spotify
  • 📦 Zero Dependencies - Works offline after initial setup
  • 🔒 Security First - Token validation with user consent only
  • 🎯 Production Ready - Includes tests, linting, and best practices

🎬 Quick Demo

Demo

🚀 Quick Start

# Create a new Discord bot
npx create-cordgen my-awesome-bot

# Use a specific template
npx create-cordgen my-bot --template music-lavalink

# TypeScript project
npx create-cordgen my-bot --template starter-ts --ts

# Skip prompts
npx create-cordgen my-bot --yes --owner "Your Name"

📋 Available Templates

Starter Bots

  • multipurpose-starter - Commands, events, and modular structure
  • starter-ts - TypeScript version with full type safety

Specialized Bots

  • moderation-pro - Advanced moderation with logging
  • music-lavalink - High-quality music with Lavalink
  • economy-basic - Coin system and gambling games
  • ticket-system - Support ticket management
  • ai-chat - AI-powered conversations
  • fun-games - Trivia and entertainment games
  • reaction-roles - Self-assignable role system
  • logging-audit - Comprehensive server logging
  • webhook-bridge - Cross-platform messaging
  • express-dashboard - Web dashboard for bot management

🛠️ CLI Options

Usage: create-cordgen [options] [directory]

Arguments:
  directory          Directory to create the project in

Options:
  -t, --template <template>  Template to use
  --ts                       Use TypeScript
  --pm <manager>             Package manager (npm, pnpm, yarn)
  --no-install               Skip dependency installation
  -y, --yes                  Skip interactive prompts
  --owner <name>             Project owner/author name
  --prefix <letter>          Command prefix
  -h, --help                 Display help
  -V, --version              Display version

Commands:
  list                       List all available templates
  info <templateId>          Show template information
  upgrade                    Check for updates

🔧 Integrations

Add powerful features to your bot:

  • MongoDB - NoSQL database for user data
  • Redis - Caching and session management
  • PostgreSQL + Prisma - SQL database with ORM
  • Lavalink - High-quality audio streaming
  • Spotify API - Music metadata and OAuth

📁 Project Structure

my-discord-bot/
├── src/
│   ├── commands/     # Slash commands
│   ├── events/       # Discord.js events
│   ├── utils/        # Helper functions
│   └── index.js      # Main bot file
├── tests/            # Vitest test suite
├── .env              # Environment variables
├── .env.example      # Configuration template
├── package.json      # Dependencies and scripts
└── README.md         # Project documentation

🏃‍♂️ Getting Started

  1. Create your bot:

    npx create-cordgen my-bot
  2. Configure environment:

    cd my-bot
    cp .env.example .env
    # Edit .env with your bot token
  3. Install and run:

    npm install
    npm run dev
  4. Invite to server: Use the Discord Developer Portal to generate an invite link.

📚 Documentation

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📝 License

MIT © students-dev

🙏 Acknowledgments

  • Built with Ink for the CLI interface
  • Powered by Discord.js
  • Inspired by create-react-app and similar project generators

📞 Support


Made with ❤️ by students-dev

GitHubWebsitenpm

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published