Smart, Fast, Cached - Your personal AI assistant that learns from every question
ErenAI is a powerful command-line AI assistant that brings OpenAI's capabilities directly to your terminal. It's designed to be fast, smart, and efficient with a built-in caching system that learns from every interaction.
- 🔥 Lightning Fast: Cached responses for instant answers
- 💰 Cost Efficient: Intelligent caching reduces API calls
- 🌐 Multi-Server: Syncs knowledge across all your servers
- 📊 Analytics: Tracks usage statistics and popular questions
- 🔒 Secure: Each user manages their own API key
- 🎯 Focused: Concise answers (max 3 lines) with code-first approach
curl -fsSL https://raw.githubusercontent.com/erenakkus/erenai/main/erenai_setup.sh | bash# Clone the repository
git clone https://github.com/erenakkus/erenai.git
cd erenai
# Run the installer
chmod +x erenai_setup.sh
./erenai_setup.sherenai "How to create a Python list?"
erenai "Git merge conflict resolution"
erenai "JavaScript async/await example"# Quick code snippets
erenai "Python read CSV file"
# Output: import pandas as pd; df = pd.read_csv('file.csv')
# System administration
erenai "nginx restart command"
# Output: sudo systemctl restart nginx
# Programming concepts
erenai "What is Docker?"
# Output: Docker is containerization platform. Creates isolated environments. Packages apps with dependencies.- Cache Hit Rate: ~85% for repeated questions
- Response Time:
- Cached: ~50ms
- API Call: ~2-5s
- Token Usage: Optimized with max 150 tokens per response
On first run, ErenAI will prompt for your OpenAI API key:
erenai "test question"
# Output: OpenAI API anahtarınızı girin: sk-...rm ~/.erenai/config.json
erenai "any question" # Will prompt for new keyView your usage statistics:
# Check cache efficiency
sqlite3 ~/.erenai/erenai.db "SELECT COUNT(*) as total_questions FROM qa_cache;"
# Most popular questions
sqlite3 ~/.erenai/erenai.db "SELECT question, usage_count FROM qa_cache ORDER BY usage_count DESC LIMIT 10;"
# Server usage distribution
sqlite3 ~/.erenai/erenai.db "SELECT server_name, COUNT(*) FROM usage_stats GROUP BY server_name;"- Questions are hashed and cached for lightning-fast responses
- Handles variations in question phrasing
- Automatic cache updates for better answers
- Each server maintains its own cache
- Usage statistics track cross-server patterns
- Perfect for DevOps teams
- Programming questions get direct code examples
- Minimal explanations, maximum utility
- Perfect for developers who want quick solutions
- API keys stored locally in encrypted format
- No data sent to external servers except OpenAI
- Full control over your questions and answers
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
git clone https://github.com/[username]/erenai.git
cd erenai
# Install development dependencies
pip3 install -r requirements.txt
# Run tests
python3 -m pytest tests/This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for providing the GPT-3.5-turbo API
- SQLite for the lightweight database solution
- The amazing open-source community
Found a bug? Have a feature request?
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [[email protected]]
- Support for multiple OpenAI models
- Web interface for analytics
- Team collaboration features
- Export/import cache functionality
- Docker containerization
- Slack/Discord integration
Made with ❤️ by developers, for developers
⭐ Star this repo if you find it useful! ⭐