Skip to content

Lakylife/ai-hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI Hub ๐Ÿš€

Universal AI CLI - One terminal interface for all major AI providers

AI Hub is a powerful command-line interface that provides unified access to multiple AI providers including Grok, Claude, OpenAI, and Gemini. Inspired by Claude Code, it offers a seamless chat experience with intelligent model switching and beautiful terminal UI.

โœจ Features

  • ๐Ÿค– Multi-Provider Support: Grok (XAI), Claude (Anthropic), OpenAI (GPT-4/3.5), Gemini (Google)
  • ๐Ÿ’ฌ Interactive Chat Mode: Claude Code-like interface with streaming responses
  • ๐ŸŽฏ Smart Defaults: Automatic model selection based on your preferences
  • โš™๏ธ Easy Setup: Guided first-time configuration wizard
  • ๐Ÿ”ง Slash Commands: Full set of /help, /config, /export, /clear, etc.
  • ๐ŸŽจ Beautiful UI: Colored output, progress indicators, and clean formatting
  • ๐Ÿ“ฑ Cross-Platform: Works on Linux, macOS, and Windows
  • ๐Ÿ”’ Secure: API keys stored locally in encrypted format

๐Ÿš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/yourusername/ai-hub.git
cd ai-hub

# Install dependencies
pip install -r requirements.txt

# Install AI Hub
pip install -e .

First Run

Simply run hub and follow the guided setup:

hub

This will walk you through:

  1. ๐Ÿ”ฅ Provider Selection - Choose which AI services to configure
  2. ๐Ÿ”‘ API Key Setup - Securely enter your API keys
  3. ๐ŸŽฏ Model Selection - Pick your default AI model
  4. ๐Ÿš€ Ready to Chat - Start conversing immediately!

๐Ÿ’ป Usage

Interactive Mode (Default)

hub                    # Start chat with default model
hub -m claude         # Use Claude specifically
hub -m gpt-4          # Use GPT-4
hub -m gemini         # Use Gemini

Quick Queries

hub "Explain quantum computing"
hub -m claude "Write a Python function to sort a list"
hub -m gpt-4 "What's the weather like?"

Configuration

hub --setup           # Reconfigure settings
hub --help            # Show all options

๐ŸŽฎ Interactive Commands

While in chat mode, use these commands:

Command Description
/help Show all available commands
/clear Clear conversation history
/config View current configuration
/setup Reconfigure API keys
/model Show current model info
/export Export conversation to file
/history Show conversation history
/system [prompt] Set system prompt
/compact Compress conversation with AI summary
/cost Show session usage stats
/doctor Check AI Hub health
/exit Exit the chat

๐Ÿ”ง Configuration

AI Hub stores configuration in ~/.ai-hub/config.yaml:

# API Keys
grok_api_key: "your-grok-key"
claude_api_key: "your-claude-key" 
openai_api_key: "your-openai-key"
gemini_api_key: "your-gemini-key"

# Settings
default_model: "grok"
max_tokens: 8192
temperature: 0.7
system_prompt: "You are a helpful AI assistant."

Environment Variables

You can also set API keys via environment variables:

export GROK_API_KEY="your-grok-key"
export ANTHROPIC_API_KEY="your-claude-key"
export OPENAI_API_KEY="your-openai-key"
export GEMINI_API_KEY="your-gemini-key"

๐Ÿค– Supported Models

Provider Models Description
Grok (XAI) grok-beta Latest and fastest model from X.AI
Claude (Anthropic) claude-3-5-sonnet Best for reasoning and analysis
OpenAI gpt-4, gpt-4o, gpt-3.5-turbo Most popular and versatile
Gemini (Google) gemini-pro Great for multimodal tasks

๐Ÿ“‹ Requirements

๐Ÿ› ๏ธ Development

Project Structure

ai-hub/
โ”œโ”€โ”€ hub/                    # Main package
โ”‚   โ”œโ”€โ”€ cli.py             # CLI interface and argument parsing
โ”‚   โ”œโ”€โ”€ config.py          # Configuration management
โ”‚   โ”œโ”€โ”€ interactive.py     # Interactive chat session
โ”‚   โ”œโ”€โ”€ clients/           # AI provider clients
โ”‚   โ”‚   โ”œโ”€โ”€ base.py        # Base client interface
โ”‚   โ”‚   โ”œโ”€โ”€ grok.py        # Grok/XAI client
โ”‚   โ”‚   โ”œโ”€โ”€ claude.py      # Claude/Anthropic client
โ”‚   โ”‚   โ”œโ”€โ”€ openai_client.py # OpenAI client
โ”‚   โ”‚   โ””โ”€โ”€ gemini.py      # Gemini/Google client
โ”‚   โ””โ”€โ”€ utils/             # Utilities
โ”‚       โ”œโ”€โ”€ formatting.py  # Text formatting and colors
โ”‚       โ””โ”€โ”€ terminal.py    # Terminal utilities
โ”œโ”€โ”€ setup.py               # Package setup
โ”œโ”€โ”€ requirements.txt       # Dependencies
โ””โ”€โ”€ README.md             # This file

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐ŸŽฏ Roadmap

  • Plugin System - Custom AI provider plugins
  • Conversation Management - Save/load chat sessions
  • Template System - Reusable prompt templates
  • Voice Interface - Speech-to-text and text-to-speech
  • Multi-Modal Support - Image and file uploads
  • Team Features - Shared configurations and sessions
  • Web Interface - Optional browser-based UI
  • Model Comparison - Side-by-side responses

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Inspired by Claude Code - Anthropic's excellent CLI interface
  • Built with love for the AI community
  • Thanks to all AI providers for their amazing APIs

Made with โค๏ธ by the AI Hub Team

โญ Star us on GitHub โ€ข ๐Ÿฆ Follow on Twitter โ€ข ๐Ÿ“ Read the Docs

About

Universal AI CLI - One terminal interface for all major AI providers

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages