@tomisakae/tomibot
Version:
TomiBot - AI Chatbot CLI với Google Genkit. Một chatbot AI thông minh chạy trên command line với giao diện đẹp.
147 lines (105 loc) • 4.24 kB
Markdown
# TomiBot - AI Chatbot CLI with Google Genkit
🤖 **TomiBot** is an intelligent AI chatbot that runs on the command line with a beautiful interface, built with TypeScript and using the Google Genkit framework.
[](https://badge.fury.io/js/%40tomisakae%2Ftomibot)
[](https://opensource.org/licenses/MIT)
[](https://nodejs.org/)
## ✨ Features
- 💬 **Chat with AI**: Conversation with Google Gemini AI model
- 🎨 **Beautiful CLI Interface**: Using modern UI libraries
- 📝 **Save History**: Remember conversation context
- ⚙️ **Easy Configuration**: Simple API key setup
- 🔍 **System Status**: Real-time system monitoring
- 🌐 **Vietnamese Support**: Full Vietnamese language support
- 🏗️ **Modular Architecture**: Clean architecture with separation of concerns
## 🚀 Installation
### Install globally (Recommended)
```bash
npm install -g @tomisakae/tomibot
```
### Or run directly with npx
```bash
npx @tomisakae/tomibot
```
### System Requirements
- Node.js v20+
- npm or yarn
## 🎯 Usage
### Run TomiBot
```bash
# If installed globally
tomibot
# Or with npx
npx @tomisakae/tomibot
```
### Configure API Key
1. Get API key from [Google AI Studio](https://aistudio.google.com/app/apikey)
2. Run TomiBot and select configure API key
3. Or create `.env` file:
```env
GEMINI_API_KEY=your_actual_api_key_here
```
## 📋 Main Menu
- 💬 **Start Chat with AI** - Chat with TomiBot
- 📊 **View System Status** - Check status
- ⚙️ **Configuration** - Setup API key and settings
- ❓ **Help** - View guide
- 🚪 **Exit** - Exit application
## 💬 Chat Commands
In chat session, you can use:
- `/exit`, `/quit`, `/bye` - Exit chat
- `/clear` - Clear conversation history
- `/history` - View conversation history
- `/status` - View system status
- `/help` - Show help
## 🏗️ Architecture
```
src/
├── core/ # Core business logic
│ ├── types.ts # Shared types & interfaces
│ ├── config.ts # Configuration management
│ └── bot.ts # Main Bot orchestrator
├── services/ # External services
│ ├── ai/ # AI related services
│ └── chat/ # Chat related services
├── ui/ # User interface layer
│ ├── components/ # Reusable UI components
│ └── utils/ # UI utilities
└── utils/ # General utilities
```
## 🔧 Technologies Used
- **TypeScript** - Type-safe JavaScript
- **Google Genkit** - AI framework
- **Inquirer.js** - Interactive CLI
- **Chalk** - Terminal colors
- **Boxen** - Terminal boxes
- **Figlet** - ASCII art
## 📝 Example Usage
```bash
$ npx @tomisakae/tomibot
_______ _ ____ _
|__ __| (_) _ \ | |
| | ___ _ __ ___ _| |_) | ___ | |_
| |/ _ \| '_ ` _ \| | _ < / _ \| __|
| | (_) | | | | | | | |_) | (_) | |_
|_|\___/|_| |_| |_|_|____/ \___/ \__|
? Select an option: 💬 Start Chat with AI
👤 You: Hello TomiBot!
🤖 TomiBot:
Hello! I'm TomiBot, your AI assistant. I can help you with many
different things. What do you need help with today?
```
## 🤝 Contributing
All contributions are welcome! Please:
1. Fork repository
2. Create feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to branch (`git push origin feature/AmazingFeature`)
5. Create Pull Request
## 📄 License
Distributed under the MIT License. See `LICENSE` for more information.
## 🔗 Links
- [Google AI Studio](https://aistudio.google.com/app/apikey)
- [Genkit Documentation](https://firebase.google.com/docs/genkit)
- [GitHub Repository](https://github.com/NguyenHuynhPhuVinh/TomiBot)
---
💝 **Thank you for using TomiBot!**