Skip to main content

BabinCLI: A powerful, interactive terminal assistant powered by Gemini 2.5 Flash & Groq with weather integration.

Project description

🤖 BabinCLI

PyPI version Python 3.9+ License: MIT

AI-powered terminal assistant with Gemini 2.5 Flash & Groq


✨ 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

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:

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 · Groq Console


⚡ Quick Start

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 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 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 ReleasesCreate a new releasePublish to trigger it.

📦 Manual Publishing

For manual publishing or testing:

# 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 → Your Project → SettingsPublishing
  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 for comprehensive publishing instructions.


📄 License

MIT License © 2026 Babin Bid

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

babincli-1.2.1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

babincli-1.2.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file babincli-1.2.1.tar.gz.

File metadata

  • Download URL: babincli-1.2.1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for babincli-1.2.1.tar.gz
Algorithm Hash digest
SHA256 b5656cfd245d24cd81f86d526a2ac3a280e950d12d2631ba04416ffc315c6bd0
MD5 2ff1be5f3544ba58076efda2b60e28ae
BLAKE2b-256 5765322535d5bdede2bc21d8402aee61714c6595ea78a9f499eec2ff75a9fcf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for babincli-1.2.1.tar.gz:

Publisher: publish.yml on KGFCH2/BabinCLI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file babincli-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: babincli-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for babincli-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0e5003e9d53bc0261412c4f621ee1f270da5ff1dfdd8d7403eb008bc7b4fa97
MD5 078921f2169d16a9d4fadf8a0f377446
BLAKE2b-256 8d68e19f71c325fce87690ad3bf890e545a86b38c09fc408de2b5f1b5c94c0dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for babincli-1.2.1-py3-none-any.whl:

Publisher: publish.yml on KGFCH2/BabinCLI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page