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

create-next-chatbot

v1.0.0

Published

CLI tool for integrating AI Support Chatbot into existing codebases

Readme

AI Support Chatbot CLI

A powerful command-line interface for integrating AI Support Chatbot into existing codebases with customizable options and framework-specific templates.

🚀 Quick Start

# Install globally
npm install -g @dedevsclub/ai-chatbot-cli

# Create a new chatbot project
ai-chatbot init my-chatbot --framework nextjs

# Install into existing project
cd my-existing-project
ai-chatbot install --interactive

# Configure chatbot settings
ai-chatbot configure --interactive

📦 Installation

Global Installation (Recommended)

npm install -g @dedevsclub/ai-chatbot-cli

Local Installation

npm install --save-dev @dedevsclub/ai-chatbot-cli
npx ai-chatbot --help

🛠️ Commands

init - Create New Project

Initialize a new AI chatbot project from scratch.

ai-chatbot init [name] [options]

Options:

  • -f, --framework <framework> - Target framework (nextjs, react, vue, angular, express)
  • -t, --template <template> - Template to use
  • -d, --directory <directory> - Target directory
  • --no-install - Skip dependency installation
  • --no-git - Skip git initialization

Examples:

# Interactive setup
ai-chatbot init

# Quick setup with Next.js
ai-chatbot init my-chatbot --framework nextjs

# Custom directory
ai-chatbot init my-chatbot --directory ./projects/chatbot

# Skip dependency installation
ai-chatbot init my-chatbot --no-install

install - Add to Existing Project

Install AI chatbot components into an existing project.

ai-chatbot install [options]

Options:

  • -f, --framework <framework> - Target framework
  • -c, --config <config> - Configuration file path
  • --interactive - Interactive installation
  • --dry-run - Show what would be installed without making changes

Examples:

# Interactive installation
ai-chatbot install --interactive

# Install for specific framework
ai-chatbot install --framework nextjs

# Dry run to see changes
ai-chatbot install --dry-run

configure - Configure Settings

Configure chatbot settings and behavior.

ai-chatbot configure [options]

Options:

  • -c, --config <config> - Configuration file path
  • --interactive - Interactive configuration
  • --preset <preset> - Use configuration preset (basic, advanced, enterprise)
  • --output <output> - Output configuration file path

Examples:

# Interactive configuration
ai-chatbot configure --interactive

# Use preset
ai-chatbot configure --preset advanced

# Custom config file
ai-chatbot configure --config ./my-config.ts --interactive

update - Update Installation

Update existing chatbot installation to the latest version.

ai-chatbot update [options]

Options:

  • --version <version> - Target version
  • --force - Force update even if breaking changes detected
  • --backup - Create backup before updating

Examples:

# Update to latest
ai-chatbot update

# Update with backup
ai-chatbot update --backup

# Force update
ai-chatbot update --force

validate - Validate Configuration

Validate chatbot configuration for errors and best practices.

ai-chatbot validate [config] [options]

Options:

  • --strict - Enable strict validation
  • --fix - Attempt to fix validation errors

Examples:

# Validate default config
ai-chatbot validate

# Validate specific file
ai-chatbot validate ./lib/chatbot-config.ts

# Strict validation with auto-fix
ai-chatbot validate --strict --fix

templates - Manage Templates

Manage chatbot templates for different frameworks and use cases.

ai-chatbot templates <command>

Subcommands:

  • list [--framework <framework>] - List available templates
  • info <template> - Show template information
  • create <name> [--from <source>] - Create custom template

Examples:

# List all templates
ai-chatbot templates list

# List Next.js templates
ai-chatbot templates list --framework nextjs

# Show template info
ai-chatbot templates info nextjs-advanced

# Create custom template
ai-chatbot templates create my-template --from nextjs-basic

🎯 Supported Frameworks

Next.js

  • App Router support
  • Server and client components
  • API routes with streaming
  • Built-in security with Arcjet
  • Tailwind CSS styling

React (Vite)

  • Modern React with hooks
  • Vite for fast development
  • TypeScript support
  • Component-based architecture

Vue.js

  • Vue 3 Composition API
  • TypeScript support
  • Vite build system
  • Reactive components

Angular

  • Angular 15+ support
  • TypeScript by default
  • Angular CLI integration
  • Service-based architecture

Express.js

  • REST API endpoints
  • Middleware support
  • CORS configuration
  • Rate limiting

🔧 Configuration

Configuration Presets

Basic

  • Essential features only
  • Minimal security
  • Simple UI
  • Perfect for development

Advanced

  • Full feature set
  • Enhanced security
  • Rich UI components
  • Production-ready

Enterprise

  • Maximum security
  • All features enabled
  • Strict validation
  • Audit logging

Environment Variables

# Required
GOOGLE_GENERATIVE_AI_API_KEY=your_api_key_here
ARCJET_KEY=your_arcjet_key_here

# Optional
CHATBOT_NAME="My AI Assistant"
CHATBOT_WELCOME_MESSAGE="Hello! How can I help?"
CHATBOT_PRIMARY_COLOR="#3B82F6"
CHATBOT_ANALYTICS_ENABLED=true

Configuration File Structure

export const chatbotConfig = {
  name: "AI Assistant",
  version: "2.0.0",
  welcomeMessage: "Hello! How can I help you today?",
  
  ui: {
    windowTitle: "AI Assistant",
    inputPlaceholder: "Type your message...",
    theme: {
      primaryColor: "#3B82F6",
      borderRadius: "md",
      animation: {
        enabled: true,
        duration: 300,
        easing: "ease-out",
      },
    },
    positioning: {
      desktop: {
        position: "bottom-right",
        offset: { x: 20, y: 20 },
        size: { width: 400, height: 600 },
      },
    },
  },

  features: {
    conversationHistory: true,
    fileUpload: false,
    voiceInput: false,
    suggestions: true,
    feedback: true,
    export: false,
  },

  api: {
    model: "gemini-2.5-flash-lite",
    systemPrompt: "You are a helpful AI assistant...",
    temperature: 0.7,
    maxTokens: 2048,
  },

  security: {
    enableBotDetection: true,
    enableShield: true,
    contentFiltering: {
      enabled: true,
      strictMode: false,
    },
  },

  rateLimit: {
    capacity: 5,
    refillRate: 2,
    interval: 10,
  },
};

🔐 Security Features

Arcjet Integration

  • Rate Limiting: Token bucket algorithm
  • Bot Detection: Automated bot filtering
  • Content Shield: Malicious content protection
  • IP Filtering: Geographic and reputation-based blocking

Content Filtering

  • Inappropriate content detection
  • Custom filter patterns
  • Strict mode for enhanced filtering
  • Real-time content analysis

API Security

  • Request validation
  • Input sanitization
  • Error handling
  • Timeout protection

🎨 Customization

UI Theming

ui: {
  theme: {
    primaryColor: "#3B82F6",
    borderRadius: "lg",
    animation: {
      enabled: true,
      duration: 400,
      easing: "ease-in-out",
    },
  },
}

Custom CSS

customization: {
  css: `
    .chatbot-container {
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
  `,
}

Custom Hooks

customization: {
  hooks: {
    beforeSend: "validateMessage",
    afterReceive: "logResponse",
    onError: "handleError",
  },
}

📊 Analytics & Monitoring

Supported Providers

  • Google Analytics
  • Mixpanel
  • Amplitude
  • Custom analytics

Tracked Events

  • Conversation starts
  • Message exchanges
  • Error occurrences
  • User satisfaction
  • Performance metrics

Privacy Features

  • IP anonymization
  • DNT (Do Not Track) respect
  • Data retention controls
  • GDPR compliance

🌍 Internationalization

Multi-language Support

i18n: {
  enabled: true,
  defaultLocale: "en",
  supportedLocales: ["en", "es", "fr", "de"],
  autoDetect: true,
}

Translation Management

  • JSON-based translations
  • Dynamic locale switching
  • Fallback language support
  • RTL language support

🚀 Performance Optimization

Caching

  • Response caching
  • Asset optimization
  • CDN integration
  • Memory management

Lazy Loading

  • Component splitting
  • Dynamic imports
  • Progressive enhancement
  • Bandwidth optimization

🧪 Testing

Unit Tests

cd cli
npm test

Integration Tests

npm run test:integration

E2E Tests

npm run test:e2e

🤝 Contributing

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

Development Setup

git clone https://github.com/DeDevsClub/ai-support-chatbot.git
cd ai-support-chatbot/cli
npm install
npm run dev

📝 License

MIT License - see LICENSE for details.

🆘 Support

🗺️ Roadmap

  • [ ] Plugin system
  • [ ] Visual configuration editor
  • [ ] More AI providers
  • [ ] Advanced analytics
  • [ ] Mobile SDK
  • [ ] WordPress plugin
  • [ ] Shopify integration

Made with ❤️ by DeDevsClub