aigenx is a production-ready CLI tool that scaffolds high-performance AI chatbot applications with modern UI, streaming responses, and support for multiple AI providers.
- Name: aigenx
- Author: ramykatour
- Email: [email protected]
- GitHub: https://github.com/ramykatour/aigenx
- License: MIT
- Version: 1.0.0
- ✅ Interactive command-line interface with prompts
- ✅ Support for multiple AI providers (Groq, HuggingFace, TogetherAI)
- ✅ Framework selection (Next.js with App Router)
- ✅ Auto-configuration of environment files
- ✅ Clean terminal UX with colors and formatted output
- ✅ Force overwrite option for existing directories
- ✅ Next.js 15 with App Router
- ✅ TypeScript for type safety
- ✅ Streaming responses with real-time token-by-token display
- ✅ Edge runtime for API routes
- ✅ React Server Components where applicable
- ✅ Dark mode by default with modern design
- ✅ Glassmorphism effects with blur and transparency
- ✅ Smooth animations using Framer Motion
- ✅ Responsive design (mobile-first)
- ✅ Keyboard shortcuts (Enter to send, Shift+Enter for new line)
- ✅ Auto-resize textarea for input
- ✅ Copy message functionality
- ✅ Clear chat button
- ✅ Typing indicator with animated dots
- ✅ Auto-scroll to latest message
- ✅ State management with Zustand
- ✅ Error handling with user-friendly messages
- ✅ Accessibility features (ARIA labels, semantic HTML)
/home/z/aigenx/
├── bin/
│ └── index.js # CLI entry point with Commander.js
├── lib/
│ └── create-project.js # Project creation logic
├── templates/
│ └── nextjs-template/ # Next.js app template
│ ├── app/
│ │ ├── api/
│ │ │ └── chat/
│ │ │ └── route.ts # Streaming chat API (Edge runtime)
│ │ ├── layout.tsx # Root layout with metadata
│ │ ├── page.tsx # Home page component
│ │ └── globals.css # Global styles (imported in layout)
│ ├── components/
│ │ ├── ChatInterface.tsx # Main chat container
│ │ ├── ChatHeader.tsx # Header with clear button
│ │ ├── ChatMessage.tsx # Message component with copy
│ │ └── ChatInput.tsx # Input with auto-resize
│ ├── lib/
│ │ ├── api.ts # API client with streaming
│ │ ├── store.ts # Zustand state management
│ │ └── utils.ts # Utility functions
│ ├── styles/
│ │ └── globals.css # Custom styles & animations
│ ├── .env.example # Environment variables template
│ ├── .gitignore # Git ignore rules
│ ├── next.config.js # Next.js configuration
│ ├── package.json # Dependencies
│ ├── postcss.config.js # PostCSS configuration
│ ├── tailwind.config.ts # Tailwind CSS configuration
│ ├── tsconfig.json # TypeScript configuration
│ └── README.md # Generated app documentation
├── package.json # CLI tool dependencies
├── README.md # Main README
└── SETUP.md # Complete setup guide
cd /home/z/aigenx
npm installnode /home/z/aigenx/bin/index.js create my-chat-app✨ Welcome to aigenx!
Building modern AI chatbot apps with ease.
? Select your AI Provider: 🚀 Groq (fastest, recommended)
? Select Framework: ⚛️ Next.js (App Router) - Production Ready
cd my-chat-appnpm installcp .env.example .envEdit .env and add your API key:
# For Groq (recommended)
GROQ_API_KEY=gsk_your_api_key_hereGet your Groq API key: https://console.groq.com/keys
npm run devOpen http://localhost:3000 in your browser.
- Background: Deep dark (#0a0a0f)
- Primary: Violet to Purple gradient
- User Messages: Blue to Cyan gradient
- AI Messages: Violet to Purple gradient
- Text: White (#ffffff)
- Secondary Text: Gray (#6b7280)
- Glassmorphism: Background blur with semi-transparent panels
- Gradients: Radial gradient background with violet/purple accents
- Shadows: Subtle shadows for depth
- Rounded Corners: xl/2xl for modern feel
- Animations:
- Slide-in for messages (left for AI, right for user)
- Typing indicator with bouncing dots
- Hover effects on buttons
- Scale animations on interactions
- Font: Inter (Google Fonts)
- Hierarchy: Clear heading and body text sizes
- Line Height: Comfortable reading spacing (leading-relaxed)
- Fastest inference speeds
- OpenAI-compatible API
- Models: Llama 3.3 70B, Llama 3, Mixtral, and more
- Endpoint: https://api.groq.com/openai/v1/chat/completions
- Streaming: ✅ Native SSE support
- Wide range of open-source models
- Community-driven
- Models: Any HuggingFace model (default: Mistral-7B)
- Endpoint: https://api-inference.huggingface.co/models/{model}
- Streaming: ✅ Simulated via client-side
- High-performance open-source models
- Production-ready
- Models: Mixtral 8x7B, and more
- Endpoint: https://api.together.xyz/v1/chat/completions
- Streaming: ✅ Native SSE support
- Edge runtime support
- Streaming responses via Server-Sent Events (SSE)
- Automatic provider detection
- Error handling
- Request/response logging
interface ChatStore {
messages: ChatMessage[];
isLoading: boolean;
error: string | null;
systemPrompt: string;
addMessage: (message: Omit<ChatMessage, 'id' | 'timestamp'>) => void;
updateLastMessage: (content: string) => void;
setLoading: (loading: boolean) => void;
setError: (error: string | null) => void;
clearChat: () => void;
setSystemPrompt: (prompt: string) => void;
}async function streamChatResponse(
messages: ChatMessage[],
onChunk: (chunk: string) => void,
onError: (error: string) => void,
onComplete: () => void
): Promise<void>- User types message in textarea
- Press Enter → handleSubmit()
- Add user message to store
- Add empty assistant message for streaming
- Call API with streaming
- Update assistant message token by token
- onComplete() → setLoading(false)
commander- CLI frameworkinquirer- Interactive promptschalk- Terminal colorsora- Loading spinnersexeca- Process executionfs-extra- File system operations
next- React frameworkreact&react-dom- React librarytypescript- Type safetytailwindcss- Stylingframer-motion- Animationszustand- State managementlucide-react- Iconsclsx&tailwind-merge- Class utilities
npm loginnpm view aigenxnpm publish --access publicnpx aigenx create my-appnpx aigenx create my-groq-app
# Select: Groq
# Select: Next.jsnpx aigenx create my-hf-app
# Select: HuggingFace
# Select: Next.jsnpx aigenx create existing-app --force- Edge Runtime - API routes run on edge for low latency
- Streaming Responses - No waiting for full response
- Lazy Loading - Components load on demand
- Minimal Re-renders - Zustand optimizes updates
- Code Splitting - Next.js automatic code splitting
- Optimized Bundle - Tree-shaking and minification
- CSS Purging - Tailwind removes unused styles
# Groq (recommended)
GROQ_API_KEY=your_key
# HuggingFace
HUGGINGFACE_API_KEY=your_key
MODEL=mistralai/Mistral-7B-Instruct-v0.2
# TogetherAI
TOGETHERAI_API_KEY=your_key
MODEL=mistralai/Mixtral-8x7B-Instruct-v0.1
# Optional
SYSTEM_PROMPT=You are a helpful AI assistant.- System Prompt - Change AI behavior
- Model Selection - Use different models
- Colors - Modify Tailwind config
- Animations - Adjust Framer Motion
- API Endpoint - Add custom providers
- Production-Ready - Not a prototype, but a complete solution
- Modern Stack - Latest technologies (Next.js 15, React 18)
- Beautiful UI - ChatGPT/Perplexity style design
- Fast Performance - Streaming with edge runtime
- Developer Experience - Clean code, TypeScript, easy customization
- Multiple Providers - Flexibility in AI choice
- Complete Documentation - README, SETUP.md, inline comments
- ✅ TypeScript throughout
- ✅ Error handling everywhere
- ✅ Accessibility features
- ✅ Mobile responsive
- ✅ Dark mode default
- ✅ Smooth animations
- ✅ Clean architecture
- ✅ Reusable components
- README.md - Main documentation
- SETUP.md - Complete setup and deployment guide
- templates/nextjs-template/README.md - Generated app docs
- GitHub: https://github.com/ramykatour/aigenx
- Email: [email protected]
- Issues: https://github.com/ramykatour/aigenx/issues
MIT License - Free to use, modify, and distribute
aigenx is a complete, production-ready CLI tool that generates high-performance AI chatbot applications. It includes:
- ✅ Fully functional CLI with interactive prompts
- ✅ Complete Next.js 15 template with App Router
- ✅ Modern, beautiful UI with dark mode
- ✅ Streaming responses with edge runtime
- ✅ Support for multiple AI providers
- ✅ Comprehensive documentation
- ✅ Ready for npm publishing
The generated apps feel like create-next-app quality with smooth UX, fast performance, and production-ready code.