Metadata-Version: 2.4
Name: babincli
Version: 1.2.2
Summary: BabinCLI: A powerful, interactive terminal assistant powered by Gemini 2.5 Flash & Groq with weather integration.
Author-email: KGFCH2 <your-email@example.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/KGFCH2/BabinCLI
Project-URL: Documentation, https://KGFCH2.github.io/BabinCLI/
Project-URL: Repository, https://github.com/KGFCH2/BabinCLI
Project-URL: Bug Tracker, https://github.com/KGFCH2/BabinCLI/issues
Keywords: cli,gemini,groq,ai,terminal,assistant,chatbot,llama
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: google-genai>=1.0.0
Requires-Dist: groq>=0.4.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: rich>=13.0
Dynamic: license-file

<div align="center">

# 🤖 BabinCLI

[![PyPI version](https://badge.fury.io/py/babincli.svg)](https://pypi.org/project/babincli/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**AI-powered terminal assistant with Gemini 2.5 Flash & Groq**



</div>

---

## ✨ Features

| | Feature | Description |
|---|---|---|
| 🔄 | **Multi-Provider** | Gemini + Groq with automatic fallback |
| 🔑 | **Multi-Key Rotation** | Comma-separated Gemini keys = multiplied quota |
| 🌤️ | **Live Weather** | Real-time weather data injected into responses |
| 📅 | **Date-Aware** | AI always knows today's date and time |
| ⌨️ | **Shortcuts** | `babin a`, `babin c`, `babin lm`, `-p`, `-m` |
| 🔀 | **Mid-Chat Switch** | Type `switch` to change models on-the-fly |
| 💬 | **Interactive Chat** | Continuous conversation with memory |
| 🎨 | **Rich Output** | Beautiful markdown formatting in terminal |

---

## 📦 Installation

```bash
pip install babincli
```

> Or install from GitHub: `pip install git+https://github.com/KGFCH2/BabinCLI.git`

> ✅ **Windows**: BabinCLI **auto-fixes PATH** on first run — no manual setup needed. If `babin` isn't recognized, run `python -m babin_cli setup-path` and open a new terminal.

---

## ⚙️ Quick Setup

Copy `.env.example` to `.env` and add your API keys:

```env
GEMINI_API_KEY=your_key_here
GROQ_API_KEY=your_key_here
OPENWEATHERMAP_API_KEY=your_key_here    # optional
WEATHERAPI_KEY=your_key_here            # optional
```

> 🔑 **Multi-key**: Use `GEMINI_API_KEY=key1,key2,key3` to multiply your daily quota!

Get free keys: [Google AI Studio](https://aistudio.google.com/) · [Groq Console](https://console.groq.com/)

---

## ⚡ Quick Start

```bash
babin c                         # 💬 Start chat (Gemini 2.5 Flash)
babin a "What is Python?"       # ❓ Quick question
babin -p groq c                 # 🔄 Chat with Groq
babin lm                        # 📃 List available models
```

### 🔀 Switch Models Mid-Chat

Type `switch` during any chat session to see a numbered menu of available models and switch instantly — no restart needed!

---

## 📖 Full Documentation

See **[INSTRUCTIONS.md](INSTRUCTIONS.md)** for the complete guide including:
- Detailed configuration for all platforms
- All commands with examples
- Multi-key rotation explained
- Auto-fallback behavior
- Local development & testing
- Troubleshooting

---

## 🌐 Portal

Visit **[KGFCH2.github.io/BabinCLI](https://KGFCH2.github.io/BabinCLI/)** for the interactive documentation portal with code examples and AI helper.

---

## 📤 Publishing to PyPI

### 🤖 Automated Publishing (GitHub Actions)

This project uses **GitHub Actions** for automatic PyPI publishing:

1. **Bump version** in `pyproject.toml` and `babin_cli/__init__.py`
2. **Commit, tag, and push**: `git tag vx.y.z && git push origin main --tags`
3. ✅ The workflow auto-builds and uploads to PyPI

> You can also go to **Releases** → **Create a new release** → **Publish** to trigger it.

### 📦 Manual Publishing

For manual publishing or testing:

```bash
# Install build tools
pip install build twine

# Build distribution packages
python -m build

# Test on TestPyPI first (recommended)
twine upload --repository testpypi dist/*

# Upload to production PyPI
twine upload dist/*
```

### ⚙️ First-Time Setup

**For GitHub Actions:**
1. Go to [pypi.org](https://pypi.org) → Your Project → **Settings** → **Publishing**
2. Add **Trusted Publisher** with:
   - **Owner**: `your-github-username`
   - **Repository**: `your-repository-name`
   - **Workflow**: `publish.yml` (or your workflow filename)
   - **Environment**: (leave blank)
3. **Save** → GitHub Actions can now publish without API tokens

**For Manual Publishing:**
1. Create PyPI account at https://pypi.org/account/register/
2. Generate API token at https://pypi.org/manage/account/token/
3. Use token as password with username `__token__`

> ⚠️ **Important**: PyPI does **not** auto-sync with GitHub pushes. You must create a **Release** to trigger publishing.

> 📖 **Detailed Guide**: See [INSTRUCTIONS.md](INSTRUCTIONS.md) for comprehensive publishing instructions.

---

## 📄 License

MIT License © 2026 Babin Bid
