llmswap


Namellmswap JSON
Version 5.2.2 PyPI version JSON
download
home_pageNone
SummaryUniversal LLM SDK with Tool Calling: Enable ANY LLM to access YOUR data/APIs. Multi-provider (Anthropic, OpenAI, Gemini, Groq, xAI) with automatic format conversion. Features: universal tool calling, workspace memory, cost optimization, provider switching, zero vendor lock-in. Build AI agents, chatbots, data assistants with one SDK.
upload_time2025-10-19 09:03:11
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2025 Sreenath Menon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords 10-providers adaptive-learning age-appropriate-ai agentic-ai agents ai ai-abstraction-layer ai-assistant ai-chat ai-chat-cli ai-cli ai-code-assistant ai-code-generation ai-code-review ai-comparison-tool ai-context-switching ai-cost-savings ai-dashboard ai-debugging ai-infrastructure ai-learning ai-logs ai-memory ai-mentor ai-pair-programming ai-persona ai-personas ai-provider-switcher ai-sdk ai-straying-prevention ai-teaching ai-testing-tool ai-tutor anthropic anthropic-sdk-alternative api-client architecture-decisions arena-validated-models bash-generator battle-tested-ai browser-ui chatgpt-alternative chromadb churn-detection claude claude-4-5 claude-code-alternative claude-sonnet-4-5 cli cli-ai-assistant code-completion-api code-generation code-review coding-mentor cohere command-generation command-line-ai comparison-dashboard context-aware-ai contextual-ai continue-dev-alternative contract-analysis conversational-ai conversational-cli copilot-alternative copilot-cli copilot-cli-alternative copilot-replacement cost-analytics cost-comparison cost-optimization cost-savings cross-provider-cli cursor-alternative custom-ai-personas customer-support debugging developer-ai-tools developer-tools document-qa due-diligence dynamic-provider-switching editor-integration educational-ai eklavya embeddings enterprise enterprise-ai fast-inference fastapi financial-analysis flask-ui function-calling gemini gemini-cli-alternative gemini-sdk-alternative github-copilot-alternative gpt-4 granite grok-4 grok-4-0709 grok-4-fast groq groq-inference hackathon hackathon-starter ibm-watson ibm-watsonx indian-language-ai intelligent-routing langchain langchain-alternative leaderboard-models learning-journal library-and-cli litellm-alternative llama llm llm-abstraction llm-api llm-benchmarking llm-cli-interface llm-comparison llm-evaluation llm-gateway llm-gateway-routing llm-routing llm-sdk llm-switching llm-tools lmarena lmarena-tested-models log-analysis m&a mistral model-comparison model-evaluation model-testing multi-llm multi-llm-cli multi-llm-copilot multi-modal-ai multi-model-ai multi-model-testing multi-provider-chat multi-provider-cli multi-provider-routing multi-provider-sdk multi-provider-tools multilingual-ai multiple-contexts natural-language-to-code no-vendor-lock-in ollama open-source-copilot openai openai-alternative-sdk openai-cli-alternative pdf-qa perplexity persistent-context persona-rotation personalized-ai pinecone production-validated-llm project-context project-knowledge-base project-memory prompt-testing provider-agnostic-cli provider-agnostic-sdk provider-fallback provider-health-check provider-switching provider-verification python-generator python-sdk python-sdk-cli quality-comparison rag response-caching response-comparison retrieval-augmented-generation sarvam-ai sdk sdk-and-cli second-brain self-hosted-ai session-management shell-integration side-by-side-comparison sonnet-4-5 sonnet-4.5 speed-comparison streamlit support-triage teaching-assistant terminal-ai terminal-ai-chat terminal-assistant text-to-code token-tracking tool-calling top-rated-models universal-ai-cli universal-ai-sdk universal-tool-calling usage-analytics vector-database vendor-agnostic vim-integration vim-plugin visual-comparison watson-ai watsonx web-interface web-ui workspace-ai workspace-system xai-grok
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # llmswap: Universal LLM SDK That Just Works

[![PyPI version](https://badge.fury.io/py/llmswap.svg)](https://badge.fury.io/py/llmswap)
[![PyPI Downloads](https://static.pepy.tech/badge/llmswap)](https://pepy.tech/projects/llmswap)
[![Homebrew](https://img.shields.io/badge/homebrew-available-blue?logo=homebrew)](https://github.com/llmswap/homebrew-tap)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Ship AI Features in Minutes, Not Weeks

**One SDK. 11 providers. Zero vendor lock-in.**

Stop wrestling with complex frameworks. llmswap gives you tool calling, caching, and multi-provider support in 10 lines of code. Used by developers shipping real products.

**📚 Documentation:** [llmswap.org](https://llmswap.org) | **⚡ CLI Reference:** [CLI Docs](https://llmswap.org/docs/cli.html) | **🐍 SDK Guide:** [SDK Docs](https://llmswap.org/docs/sdk.html)

## 🆕 NEW in v5.2.0: Universal Tool Calling

**Enable LLMs to access YOUR data and systems** - Define tools once, works across ALL providers.

```python
from llmswap import LLMClient, Tool

# Define tool to access YOUR weather API
weather = Tool(
    name="get_weather",
    description="Get real-time weather data",
    parameters={"city": {"type": "string"}},
    required=["city"]
)

# Works with ANY provider - Anthropic, OpenAI, Gemini, Groq, xAI
client = LLMClient(provider="anthropic")
response = client.chat("What's the weather in Tokyo?", tools=[weather])

# LLM calls YOUR function → you return data → LLM gives natural response
```

**Real-World Use Cases:**
- 🌦️ Give LLM access to YOUR weather API for real-time data
- 💾 Let LLM query YOUR database for customer information
- 🛒 Enable LLM to search YOUR product catalog for shopping assistance
- 🔧 Connect LLM to YOUR systems and APIs

**Works with:** Anthropic, OpenAI, Groq, Gemini, xAI | **[Quick Start Guide →](examples/)** | **[Full Docs →](.llmswap/website-docs/)**

---

## ⚡ Quick Start (30 seconds)

```bash
# Install
pip install llmswap

# or Homebrew
brew tap llmswap/tap && brew install llmswap

# Create your first workspace
cd ~/my-project
llmswap workspace init

# Chat with AI that remembers everything
llmswap chat "Help me with Flask routing"
# AI has full project context + all past learnings!

# 🆕 Compare models visually (optional)
pip install llmswap[web]
llmswap web  # Opens browser - compare GPT-4 vs Claude vs Gemini
```

> **🆕 Use Any Model from Any Provider!** New model just launched? Use it immediately. llmswap's pass-through architecture means GPT-5, Claude Opus 4, Gemini 2.5 Pro work the day they release. Currently supports **10 providers** (OpenAI, Anthropic, Gemini, Cohere, Perplexity, IBM watsonx, Groq, Ollama, **xAI Grok**, **Sarvam AI**).

> **✅ Battle-Tested with LMArena Top Models:** All 10 providers tested and validated with top-rated models from LMArena leaderboard. From Grok-4 (xAI's flagship) to Claude Sonnet 4.5 (best coding model) to Gemini 2.0 Flash Exp - every model in our defaults is production-validated and arena-tested for real-world use.

**The First AI Tool with Project Memory & Learning Journals** - LLMSwap v5.1.0 introduces revolutionary workspace system that remembers your learning journey across projects. Build apps without vendor lock-in (SDK) or use from terminal (CLI). Works with your existing subscriptions: Claude, OpenAI, Gemini, Cohere, Perplexity, IBM watsonx, Groq, Ollama, xAI Grok, Sarvam AI (**10 providers**). **Use any model from your provider** - even ones released tomorrow. Pass-through architecture means GPT-5, Gemini 2.5 Pro, Claude Opus 4? They work the day they launch.

**🎯 Solve These Common Problems:**
- ❌ "I need multiple second brains for different aspects of my life" 🆕
- ❌ "AI strays over time, I need to re-steer it constantly" 🆕
- ❌ "I keep explaining the same context to AI over and over"
- ❌ "AI forgets what I learned yesterday"
- ❌ "I lose track of architecture decisions across projects"
- ❌ "Context switching between projects is exhausting"
- ❌ "I want AI to understand my specific codebase, not generic answers"

**✅ llmswap v5.1.0 Solves All These:**
- ✅ Multiple independent "second brains" per project/life aspect 🆕
- ✅ Persistent context prevents AI from straying 🆕
- ✅ Per-project workspaces that persist context across sessions
- ✅ Auto-tracked learning journals - never forget what you learned
- ✅ Architecture decision logs - all your technical decisions documented
- ✅ Zero context switching - AI loads the right project automatically
- ✅ Project-aware AI - mentor understands YOUR specific tech stack

## Why Developers Choose llmswap

✅ **10 Lines to Production** - Not 1000 like LangChain
✅ **Automatic Fallback** - Never down. Switches providers if one fails
✅ **50-90% Cost Savings** - Built-in caching. Same query = FREE
✅ **Workspace Memory** - Your AI remembers your project context
✅ **Universal Tool Calling** - Define once, works everywhere (NEW v5.2.0)
✅ **CLI + SDK** - Code AND terminal. Your choice
✅ **Zero Lock-in** - Switch from OpenAI to Claude in 1 line

**Built for Speed:**
- 🚀 **Hackathons** - Ship in hours
- 💡 **MVPs** - Validate ideas fast
- 📱 **Production Apps** - Scale as you grow
- 🎯 **Real Projects** - Trusted by developers worldwide

**v5.1.0**: Revolutionary AI mentorship with **project memory**, **workspace-aware context**, **auto-tracked learning journals**, and **persistent mentor relationships**. The first AI tool that truly remembers your learning journey across projects.

**NEW in v5.2.0:**
- 🛠️ **Universal Tool Calling** - Enable LLMs to use YOUR custom functions across all providers
- 🔧 **5 Providers Supported** - Anthropic, OpenAI, Groq, Gemini, xAI with automatic format conversion
- 📖 **Complete Documentation** - Full guides, examples, and real-world use cases
- ✅ **100% Backward Compatible** - All existing features work without changes

**v5.1.6:**
- 🌐 **Web UI** - Compare 20+ models side-by-side in beautiful browser interface & learn prompting techniques
- 📊 **Visual Comparison** - Live streaming results with speed badges (⚡🥈🥉), cost charts, efficiency metrics
- 💰 **Cost Optimizer** - See exact costs across providers, find cheapest model for your use case
- 🎨 **Markdown + Code Highlighting** - Syntax-highlighted code blocks with individual copy buttons
- 💾 **Smart Preferences** - Remembers your favorite models via localStorage
- 📈 **Real-time Metrics** - Tokens/sec efficiency, response length indicators, actual API token counts

**NEW in v5.1.0:**
- 🧠 **Workspace Memory** - Per-project context that persists across sessions
- 📚 **Auto-Learning Journal** - Automatically tracks what you learn in each project
- 🎯 **Context-Aware Mentorship** - AI mentor understands your project and past learnings
- 📖 **Architecture Decision Log** - Document and remember key technical decisions
- 🔄 **Cross-Project Intelligence** - Learn patterns from one project, apply to another
- 💡 **Proactive Learning** - AI suggests next topics based on your progress
- 🗂️ **Project Knowledge Base** - Custom prompt library per workspace

## 🧠 Finally: An Elegant Solution for Multiple Second Brains

**The Problem Industry Leaders Can't Solve:**

> "I still haven't found an elegant solution to the fact that I need several second brains for the various aspects of my life, each with different styles and contexts." - Industry feedback

**The LLMSwap Solution: Workspace System**

Each aspect of your life gets its own "brain" with independent memory:

- 💼 **Work Projects** - `~/work/api-platform` - Enterprise patterns, team conventions
- 📚 **Learning** - `~/learning/rust` - Your learning journey, struggles, progress
- 🚀 **Side Projects** - `~/personal/automation` - Personal preferences, experiments
- 🌐 **Open Source** - `~/oss/django` - Community patterns, contribution history

**What Makes It "Elegant":**
- ✅ Zero configuration - just `cd` to project directory
- ✅ Auto-switching - AI loads the right "brain" automatically
- ✅ No context bleed - work knowledge stays separate from personal
- ✅ Persistent memory - each brain remembers across sessions
- ✅ Independent personas - different teaching style per project if you want

**Stop Re-Explaining Context. Start Building.**

---

## 🎯 Transform AI Into Your Personal Mentor with Project Memory

**Inspired by Eklavya** - the legendary self-taught archer who learned from dedication and the right guidance - LLMSwap transforms any AI provider into a personalized mentor that adapts to your learning style **and remembers your journey**.

**The Challenge:** Developers struggle to learn effectively from AI because:
- 🔴 Responses are generic, lack personality, and don't adapt to individual needs
- 🔴 AI loses context between sessions - you repeat the same explanations
- 🔴 No learning history - AI doesn't know what you already learned
- 🔴 Project context is lost - AI doesn't understand your codebase

**LLMSwap's Solution v5.1.0:** Choose your mentorship style, initialize a workspace, and ANY AI provider becomes **your personalized guide that remembers everything**:

```bash
# 🆕 v5.1.0: Initialize workspace for your project
cd ~/my-flask-app
llmswap workspace init
# Creates .llmswap/ with context.md, learnings.md, decisions.md

# Now your AI mentor KNOWS your project
llmswap chat --mentor guru --alias "Guruji"
# Mentor has full context: your tech stack, past learnings, decisions made

# 🆕 Auto-tracked learning journal
# Every conversation automatically saves key learnings
llmswap workspace journal
# View everything you've learned in this project

# 🆕 Architecture decision log
llmswap workspace decisions
# See all technical decisions documented automatically

# View all your workspaces
llmswap workspace list

# Get wisdom and deep insights from a patient teacher
llmswap chat --mentor guru --alias "Guruji"

# High-energy motivation when you're stuck
llmswap ask "How do I debug this?" --mentor coach

# Collaborative peer learning for exploring ideas
llmswap chat --mentor friend --alias "CodeBuddy"

# Question-based learning for critical thinking
llmswap ask "Explain REST APIs" --mentor socrates

# 🆕 Use Claude Sonnet 4.5 - Best coding model
llmswap chat --provider anthropic --model claude-sonnet-4-5
# Or set as default in config for all queries
```

### 🔄 Rotate Personas to Expose Blind Spots

**Industry Insight:** "Rotate personas: mentor, skeptic, investor, end-user. Each lens exposes blind spots differently."

**Use Case: Reviewing API Design**

```bash
# Round 1: Long-term wisdom
llmswap chat --mentor guru "Design API for multi-tenant SaaS"
# Catches: scalability, technical debt, maintenance

# Round 2: Critical questions
llmswap chat --mentor socrates "Review this API design"
# Catches: assumptions, alternatives, edge cases

# Round 3: Practical execution
llmswap chat --mentor coach "What's the fastest path to v1?"
# Catches: over-engineering, paralysis by analysis
```

**Same project context. Different perspectives. Complete understanding.**

**What Makes v5.1.0 Revolutionary:**
- 🧠 **Works with ANY provider** - Transform Claude, GPT-4, or Gemini into your mentor
- 🎭 **6 Teaching Personas** - Guru, Coach, Friend, Socrates, Professor, Tutor
- 📊 **Project Memory** - Per-project context that persists across sessions ⭐ NEW
- 📚 **Auto-Learning Journal** - Automatically tracks what you learn ⭐ NEW
- 📖 **Decision Tracking** - Documents architecture decisions ⭐ NEW
- 🎓 **Age-Appropriate** - Explanations tailored to your level (--age 10, --age 25, etc.)
- 💰 **Cost Optimized** - Use cheaper providers for learning, premium for complex problems
- 🔄 **Workspace Detection** - Automatically loads project context ⭐ NEW

**Traditional AI tools give you answers. LLMSwap v5.1.0 gives you a personalized learning journey that REMEMBERS.**

## 🏆 Production-Validated with LMArena Top Models

**Every model in LLMSwap's defaults comes from LMArena's top performers:**

All 10 providers ship with carefully selected default models based on LMArena rankings and real-world production testing. We track arena performance and update defaults to ensure you're always using validated, battle-tested models.

| Provider | Default Model | Arena Status | Why We Chose It |
|----------|---------------|--------------|-----------------|
| **Anthropic** | claude-sonnet-4-5 | #1 Coding | Best coding model in the world (Sept 2025) |
| **xAI** | grok-4-0709 | Top 5 Overall | Advanced reasoning, real-time data access |
| **Gemini** | gemini-2.0-flash-exp | Top 10 | Lightning-fast, multimodal, cutting-edge |
| **OpenAI** | gpt-4o-mini | Cost Leader | Best price/performance ratio |
| **Cohere** | command-r-08-2024 | Top RAG | Enterprise-grade retrieval-augmented generation |
| **Perplexity** | sonar | Web Search | Real-time web-connected AI with citations |
| **Groq** | llama-3.1-8b-instant | Speed King | 840+ tokens/second ultra-fast inference |
| **Sarvam** | sarvam-m | Multilingual | 24B params, best for 10 Indian languages |
| **Watsonx** | granite-3-8b-instruct | Enterprise | IBM's production-grade AI for business |
| **Ollama** | granite-code:8b | Local AI | Privacy-first, runs on your hardware |

**✅ Battle-tested with real API calls** - Every provider validated in production, not simulated tests.

**✅ Weekly model updates** - We monitor LMArena rankings and deprecation notices to keep defaults current.

**✅ Zero lock-in** - Don't like our defaults? Override with any model: `LLMClient(model="gpt-5")` or `llmswap config set provider.models.openai gpt-5`

---

## 🔓 Use Any Model Your Provider Supports (Zero-Wait Model Support)

Here's something cool: LLMSwap doesn't restrict which models you can use. When GPT-5 or Gemini 2.5 Pro drops tomorrow, you can start using it immediately. No waiting for us to update anything.

**How?** We use pass-through architecture. Whatever model name you pass goes directly to your provider's API. We don't gatekeep.

### CLI Examples:

```bash
# Use any OpenAI model (even ones that don't exist yet)
llmswap chat --provider openai --model gpt-5
llmswap chat --provider openai --model o3-mini

# Use any Anthropic model
llmswap chat --provider anthropic --model claude-opus-4
llmswap chat --provider anthropic --model claude-sonnet-4-5

# Use any Gemini model
llmswap chat --provider gemini --model gemini-2-5-pro
llmswap chat --provider gemini --model gemini-ultra-2

# Set as default so you don't have to type it every time
llmswap config set provider.models.openai gpt-5
llmswap config set provider.models.anthropic claude-opus-4
```

### Python SDK:

```python
from llmswap import LLMClient

# Use whatever model your provider offers
client = LLMClient(provider="openai", model="gpt-5")
client = LLMClient(provider="anthropic", model="claude-opus-4")
client = LLMClient(provider="gemini", model="gemini-2-5-pro")

# Model just released? Use it right now
client = LLMClient(provider="openai", model="gpt-6")  # works!
```

**The point:** You're not limited to what we've documented. If your provider supports it, llmswap supports it.

## 🆚 LLMSwap vs Single-Provider Tools

### For Python Developers Building Apps:

| Your Need | Single-Provider SDKs | LLMSwap SDK |
|-----------|---------------------|-------------|
| Build chatbot/app | Import `openai` library (locked in) | Import `llmswap` (works with any provider) |
| Switch providers | Rewrite all API calls | Change 1 line: `provider="anthropic"` |
| Try different models | Sign up, new SDK, refactor code | Just change config, same code |
| Use new models | Wait for SDK update | Works immediately (pass-through) |
| Cost optimization | Manual implementation | Built-in caching (50-90% savings) |
| Use multiple providers | Maintain separate codebases | One codebase, switch dynamically |

### For Developers Using Terminal:

| Your Need | Vendor CLIs | LLMSwap CLI |
|-----------|-------------|-------------|
| Have Claude subscription | Install Claude Code (Claude only) | Use llmswap (works with Claude) |
| Have OpenAI subscription | Build your own scripts | Use llmswap (works with OpenAI) |
| Have multiple subscriptions | Install 3+ different CLIs | One CLI for all subscriptions |
| New model launches | Wait for CLI update | Use it same day (pass-through) |
| Want AI to teach you | Not available | Built-in Eklavya mentorship |
| Switch providers mid-chat | Can't - locked in | `/switch anthropic` command |

**The Bottom Line:**
- **Building an app?** Use llmswap SDK - no vendor lock-in
- **Using terminal?** Use llmswap CLI - works with your existing subscriptions
- **Both?** Perfect - it's the same tool!

```bash
# 🆕 NEW v5.1.0: Workspace System - Project Memory That Persists
llmswap workspace init
# Creates .llmswap/ directory with:
#   - workspace.json (project metadata)
#   - context.md (editable project description)
#   - learnings.md (auto-tracked learning journal)
#   - decisions.md (architecture decision log)

llmswap workspace list                    # View all your workspaces
llmswap workspace info                    # Show current workspace statistics
llmswap workspace journal                 # View learning journal
llmswap workspace decisions               # View decision log
llmswap workspace context                 # Edit project context

# 🆕 NEW v5.1.0: Context-Aware Mentorship
# AI mentor automatically loads project context, past learnings, and decisions
llmswap chat
# Mentor knows: your tech stack, what you've learned, decisions made

# 🆕 NEW v5.0: Age-Appropriate AI Explanations
llmswap ask "What is Docker?" --age 10
# Output: "Docker is like a magic lunch box! 🥪 When your mom packs..."

llmswap ask "What is blockchain?" --audience "business owner"
# Output: "Think of blockchain like your business ledger system..."

# 🆕 NEW v5.0: Teaching Personas & Personalization  
llmswap ask "Explain Python classes" --teach --mentor developer --alias "Sarah"
# Output: "[Sarah - Senior Developer]: Here's how we handle classes in production..."

# 🆕 NEW v5.0: Conversational Chat with Provider Switching
llmswap chat --age 25 --mentor tutor
# In chat: /switch anthropic  # Switch mid-conversation
# In chat: /provider         # See current provider
# Commands: /help, /switch, /clear, /stats, /quit

# 🆕 NEW v5.0: Provider Management & Configuration
llmswap providers                    # View all providers and their status
llmswap config set provider.models.cohere command-r-plus-08-2024
llmswap config set provider.default anthropic
llmswap config show

# Code Generation (GitHub Copilot CLI Alternative)
llmswap generate "sort files by size in reverse order"
# Output: du -sh * | sort -hr

llmswap generate "Python function to read JSON with error handling" --language python
# Output: Complete Python function with try/catch blocks

# Advanced Log Analysis with AI
llmswap logs --analyze /var/log/app.log --since "2h ago"
llmswap logs --request-id REQ-12345 --correlate

# Code Review & Debugging
llmswap review app.py --focus security
llmswap debug --error "IndexError: list index out of range"
```

```python
# ❌ Problem: Vendor Lock-in
import openai  # Locked to OpenAI forever
client = openai.Client(api_key="sk-...")
response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello"}]
)
# To switch to Claude? Rewrite everything.

# ✅ Solution: llmswap SDK - Universal Interface
from llmswap import LLMClient

# Works with any provider you're subscribed to
client = LLMClient()  # Auto-detects from env vars
response = client.query("Hello")

# Want Claude instead? Just change provider:
client = LLMClient(provider="anthropic")  # That's it!

# Want to try Gemini? 
client = LLMClient(provider="gemini")  # Same code, different provider

# Built-in cost optimization:
# - Automatic response caching (50-90% savings)
# - Provider cost comparison
# - Smart provider selection based on query type
```

## 🆕 v5.1.0: Workspace System - Real-World Scenarios

### 🎯 **Scenario 1: New Developer Learning Flask**

**Problem:** Junior developer learning Flask keeps asking AI the same questions because AI forgets previous conversations.

**Solution with llmswap v5.1.0:**
```bash
cd ~/my-first-flask-app
llmswap workspace init --name "Learning Flask"

# Day 1: Learn about routing
llmswap chat --mentor professor
"How do Flask routes work?"
# AI explains. Learning auto-saved to learnings.md

# Day 2: Same workspace, AI remembers!
llmswap chat
"Can I use decorators for authentication?"
# AI response: "Building on what you learned about routes yesterday..."
# No need to re-explain basics!

# View your learning journey
llmswap workspace journal
# See: Day 1 - Routes, Day 2 - Authentication, etc.
```

**Result:** 60% faster learning because AI builds on previous knowledge instead of repeating basics.

---

### 🏢 **Scenario 2: Team Onboarding on Legacy Project**

**Problem:** New team member joins 2-year-old codebase. Spends weeks understanding architecture decisions.

**Solution with llmswap v5.1.0:**
```bash
cd ~/legacy-ecommerce-app
llmswap workspace init

# Edit context.md with project overview
llmswap workspace context
# Add: Tech stack, key components, known issues

# Ask questions - AI has full context
llmswap ask "Why did we choose MongoDB over PostgreSQL?" --mentor guru
# AI suggests checking decisions.md
# If documented: "According to your decision log from 2023-05..."
# If not: AI helps document it now

llmswap workspace decisions
# See all past architectural decisions in one place
```

**Result:** Onboarding time reduced from 3 weeks to 1 week.

---

### 💼 **Scenario 3: Freelancer Managing Multiple Projects**

**Problem:** Freelancer switches between 5 client projects daily. Context switching is exhausting.

**Solution with llmswap v5.1.0:**
```bash
# Morning: Client A's React project
cd ~/client-a-dashboard
llmswap chat
# AI loads: React patterns you learned, components built, state management decisions

# Afternoon: Client B's Python API
cd ~/client-b-api
llmswap chat
# AI switches context: Python best practices, API design decisions, database schema

# List all projects
llmswap workspace list
# See: 5 workspaces, each with independent context and learnings

# Each workspace has separate:
# - Learning journal (React patterns vs Python patterns)
# - Decision log (frontend vs backend decisions)
# - Project context (different tech stacks)
```

**Result:** Zero mental overhead for context switching. AI handles it automatically.

---

### 🎓 **Scenario 4: Learning Journey Across Technologies**

**Problem:** Developer learning full-stack wants to track progress across frontend, backend, DevOps.

**Solution with llmswap v5.1.0:**
```bash
# Frontend project
cd ~/react-app
llmswap workspace init --name "React Learning"
llmswap chat --mentor tutor
# Learn: Hooks, State, Components
# All auto-tracked in learnings.md

# Backend project
cd ~/python-api
llmswap workspace init --name "Python API"
llmswap chat --mentor tutor
# Learn: FastAPI, SQLAlchemy, Testing
# Separate learning journal

# View all learning across projects
llmswap workspace list
# See progress in each area

# Each workspace shows:
# - Total queries
# - Learnings count
# - Last accessed
```

**Result:** Complete visibility into learning journey across all technologies.

---

### 🚀 **Scenario 5: Open Source Contributor**

**Problem:** Contributing to 3 different OSS projects. Each has different conventions, patterns, testing approaches.

**Solution with llmswap v5.1.0:**
```bash
# Project 1: Django
cd ~/django-oss
llmswap workspace init
# Document in context.md: Coding style, PR process, testing patterns

# Project 2: FastAPI
cd ~/fastapi-oss
llmswap workspace init
# Different conventions, different patterns

# Ask project-specific questions
cd ~/django-oss
llmswap ask "How should I write tests here?"
# AI knows: This project uses pytest with Django TestCase

cd ~/fastapi-oss
llmswap ask "How should I write tests here?"
# AI knows: This project uses pytest with async fixtures

# Each workspace maintains separate:
# - Testing patterns learned
# - Code review feedback
# - Architecture understanding
```

**Result:** Contribute confidently to multiple projects without mixing up conventions.

---

## 💡 Real-World Use Cases (v5.0 Features)

### 📚 **Learning & Skill Development**
```bash
# Junior developer learning system design
llmswap chat --mentor professor --alias "Dr. Smith"
"Explain microservices architecture"
# Response adapts to teaching style with examples and deep explanations

# Career switcher exploring new domains
llmswap ask "What is Kubernetes?" --age 25 --audience "beginner"
# Age-appropriate explanation without assuming prior DevOps knowledge
```

### 🚀 **Professional Development**
```bash
# Get different perspectives on technical decisions
llmswap ask "Should I use MongoDB or PostgreSQL?" --mentor guru
# Wisdom-based response considering trade-offs and bigger picture

llmswap ask "Should I use MongoDB or PostgreSQL?" --mentor developer
# Practical engineering perspective with production experience
```

### 💼 **Team Collaboration**
```bash
# Explain technical concepts to non-technical stakeholders
llmswap ask "Explain our API architecture" --audience "business owner"
# Business-friendly explanation without jargon

# Onboard new team members
llmswap chat --mentor friend --alias "TeamBuddy"
# Collaborative, approachable learning environment
```

### 🎭 **Same Question, Different Perspectives**

Watch how the SAME question gets tailored responses based on your role:

```bash
# As a Developer: Implementation focus
llmswap ask "Explain Model Context Protocol (MCP)" --audience developer

Response: "MCP is a standardized protocol for connecting AI models to external 
data sources and tools. Unlike traditional chatbots that bundle everything into 
one monolithic system, MCP uses a client-server architecture:

- Server: Exposes tools, resources, and prompts via standard interface
- Client: Your AI application that consumes these capabilities
- Transport: JSON-RPC over stdio/HTTP

Key difference from older chatbots:
OLD: Hardcoded integrations, tight coupling, monolithic deployment
NEW: Pluggable architecture, loose coupling, independent tool servers

Code example:
from mcp import Server
server = Server("my-tools")
@server.tool()
def get_weather(city: str): ..."

---

# As an Architect: System design focus  
llmswap ask "Explain Model Context Protocol (MCP)" --audience architect

Response: "MCP introduces a service-oriented architecture for AI systems, 
addressing key architectural concerns:

**System Architecture:**
┌─────────────┐      ┌──────────────┐      ┌─────────────┐
│ AI Client   │◄────►│ MCP Protocol │◄────►│ Tool Server │
│ (Claude App)│      │  (JSON-RPC)  │      │ (Resources) │
└─────────────┘      └──────────────┘      └─────────────┘

**Design Patterns:**
- Service Discovery: Dynamic capability negotiation
- Loose Coupling: Clients/servers evolve independently  
- Extensibility: Add new tools without modifying core
- Standardization: Uniform interface across tools

**vs Traditional Chatbots:**
- Monolithic → Microservices for AI tools
- Static → Dynamic capability loading
- Vendor lock-in → Provider-agnostic standard

**Scalability:** Deploy tool servers independently, horizontal scaling per service"

---

# As a Business Leader: ROI and strategy focus
llmswap ask "Explain Model Context Protocol (MCP)" --audience "business leader"

Response: "Model Context Protocol (MCP) is like moving from custom-built 
integrations to standardized APIs - but for AI systems.

**Business Impact:**

1. **Reduced Integration Costs**
   - OLD: $50K-$100K per custom AI integration
   - NEW: Plug-and-play tools, 80% cost reduction
   - Time to market: Weeks instead of months

2. **Vendor Independence**  
   - Not locked to one AI provider
   - Switch between Claude, GPT-4, Gemini seamlessly
   - Negotiating power with vendors

3. **Reusable Components**
   - Build once, use across multiple AI applications
   - Internal tools become valuable assets
   - Ecosystem of third-party MCP tools

4. **Competitive Advantage**
   - Deploy AI features 10x faster than competitors
   - Respond quickly to market changes
   - Lower total cost of ownership

**vs Traditional Chatbots:** Traditional bots were closed systems requiring 
custom development for each feature. MCP creates an open ecosystem where your 
team (or partners) can extend capabilities without vendor dependencies.

**ROI Example:** A company saved $200K in integration costs and reduced 
deployment time from 6 months to 3 weeks using MCP architecture."
```

**The Power:** Same command, same AI provider, completely different responses tailored to what each role needs to know.

## ⚠️ Privacy & Usage Disclaimers

**llmswap is an interface tool only** - all AI interactions and billing are handled directly by your chosen providers.

### 🔒 Context Privacy & Provider Switching
- **No context sharing**: When switching providers mid-conversation, NO conversation history is transferred between providers
- **Fresh start**: Each provider switch starts a completely new conversation thread
- **Legal compliance**: This protects your privacy and complies with provider Terms of Service
- **Your control**: You decide what each provider sees in their separate conversations

### 💰 Cost Information
**Cost estimates** (`~$X.XX estimated`) are approximate based on public pricing and common tokenizers. Actual costs may differ. **You are responsible for all provider costs and billing.**

**Legal Notice**: llmswap provides estimates and interface functionality for convenience only. We are not responsible for billing differences, provider charges, pricing changes, or data handling by individual providers. Always verify costs with your provider's billing dashboard.

## ⚡ Get Started in 30 Seconds

### 🍺 Homebrew (Recommended - macOS/Linux)
```bash
# Add our tap and install
brew tap llmswap/tap
brew install llmswap

# Ready to use immediately!
llmswap --help
```

### 🐍 PyPI (All platforms)
```bash
pip install llmswap
```

**Why Homebrew?** No virtualenv needed, global access, automatic dependency management, and easier updates.

## 🚀 Quick Start with Workspaces (v5.1.0)

### Complete Beginner's Guide - 3 Steps:

**Step 1: Install llmswap**
```bash
pip install llmswap
# or
brew install llmswap
```

**Step 2: Set up API key (one provider is enough)**
```bash
export ANTHROPIC_API_KEY="your-key-here"  # For Claude
# or
export OPENAI_API_KEY="your-key-here"     # For GPT-4
# or any other provider
```

**Step 3: Initialize workspace in your project**
```bash
cd ~/my-project
llmswap workspace init

# Start chatting - AI has full project context!
llmswap chat --mentor guru
# Ask anything about your project
# Learnings automatically tracked
# Decisions automatically documented

# View your learning journey
llmswap workspace journal
```

**That's it!** Your AI mentor now remembers everything about your project. 🎉

### Without Workspace (Classic Mode)
```bash
# Works exactly like v5.0 - no workspace needed
llmswap ask "How do I deploy a Flask app?"
llmswap chat --mentor tutor
llmswap generate "Python function to read CSV"
```

## 📋 Quick Reference - v5.1.0 Commands

### 🆕 Workspace Commands (NEW!)
| Command | Description | Example |
|---------|-------------|---------|
| `llmswap workspace init` | Initialize workspace in current directory | Creates `.llmswap/` with context, learnings, decisions |
| `llmswap workspace init --name` | Initialize with custom project name | `llmswap workspace init --name "My API"` |
| `llmswap workspace info` | Show current workspace statistics | Displays queries, learnings, decisions count |
| `llmswap workspace list` | List all registered workspaces | Shows all projects with llmswap workspaces |
| `llmswap workspace journal` | View learning journal | See everything you've learned |
| `llmswap workspace decisions` | View architecture decision log | See all technical decisions |
| `llmswap workspace context` | Edit project context | Opens context.md in default editor |

### Provider & Config Commands (v5.0)
| Command | Description | Example |
|---------|-------------|---------|
| `llmswap providers` | View all providers and their status | Shows configured/missing API keys |
| `llmswap config set provider.models.<provider> <model>` | Update default model for any provider | `llmswap config set provider.models.cohere command-r-plus-08-2024` |
| `llmswap config list` | View current configuration | Shows all settings and models |
| `/switch` (in chat) | Switch providers mid-conversation | Privacy-compliant provider switching |
| `/provider` (in chat) | Show current provider and available options | Quick status check |

### 🔧 First-Time Setup (v5.0.4 NEW!)
```bash
# First run automatically creates ~/.llmswap/config.yaml with defaults
llmswap ask "Hello world"
# Output: 🔧 Creating config file at ~/.llmswap/config.yaml
#         ✅ Default configuration created

# View all providers and their configuration status
llmswap providers

# Set up your API keys and start using
export ANTHROPIC_API_KEY="your-key-here"
llmswap ask "Explain Docker in simple terms"
```

**💡 Smart Defaults:** llmswap comes pre-configured with sensible model defaults for all 8 providers. No configuration needed to get started!

```python
from llmswap import LLMClient

# Works with any provider you have configured
client = LLMClient()  # Auto-detects from environment/config
response = client.query("Explain quantum computing in 50 words")
print(response.content)
```

## 🎯 Why LLMSwap v5.1.0 for AI Development?

| Feature | LLMSwap v5.1.0 | Claude Code | Cursor AI | Aider | LangChain | Direct APIs |
|---------|---------|-----------|---------|-----------|-------------|-------------|
| **Project Memory** | ✅ Workspace system | ❌ No memory | ❌ No memory | ❌ No memory | ❌ Manual | ❌ None |
| **Learning Journal** | ✅ Auto-tracked | ❌ Not available | ❌ Not available | ❌ Not available | ❌ Manual | ❌ None |
| **Context Awareness** | ✅ Project-specific | ❌ Generic | ❌ Generic | ❌ Generic | ❌ Manual | ❌ None |
| **AI Providers** | ✅ 8+ providers, instant switch | ❌ Claude only | ❌ Few providers | ❌ OpenAI only | ⚠️ 50+ complex setup | ❌ 1 per codebase |
| **Conversational Mode** | ✅ Provider-native, all | ✅ Claude only | ✅ Limited | ❌ Not available | ⚠️ Manual setup | ❌ Not available |
| **Memory Usage** | ✅ 99% reduction | ⚠️ Local storage | ⚠️ Local storage | ⚠️ Local storage | ❌ Heavy framework | ❌ Manual |
| **Configuration** | ✅ Git-like, shareable | ⚠️ Basic settings | ⚠️ Basic settings | ⚠️ Basic settings | ❌ Complex files | ❌ None |
| **Cost Analytics** | ✅ Real-time tracking | ❌ No cost info | ❌ No cost info | ❌ No cost info | ❌ External tools | ❌ Manual |
| **Provider Switching** | ✅ Mid-conversation | ❌ Locked to Claude | ⚠️ Limited | ❌ Locked to OpenAI | ❌ Restart required | ❌ New session |
| **Workspace System** | ✅ Per-project context | ❌ Not available | ❌ Not available | ❌ Not available | ❌ Not available | ❌ None |
| **CLI Commands** | ✅ 15+ powerful tools | ⚠️ Limited | ❌ IDE only | ⚠️ Limited | ❌ Separate packages | ❌ None |
| **SDK + CLI** | ✅ Both included | ❌ CLI only | ❌ IDE only | ❌ CLI only | ✅ SDK only | ⚠️ SDK only |
| **Teaching Personas** | ✅ 6 mentors | ❌ Not available | ❌ Not available | ❌ Not available | ❌ Not available | ❌ None |
| **Open Source** | ✅ 100% MIT licensed | ❌ Proprietary | ❌ Proprietary | ✅ Open source | ✅ Open source | ⚠️ Varies |

**Key Differentiators for LLMSwap v5.1.0:**
- 🧠 **Only AI tool with persistent project memory** - Never repeat context again
- 📚 **Automatic learning journals** - Track your progress without manual work
- 🎯 **Workspace-aware mentorship** - AI understands your specific project
- 🔄 **Zero context switching overhead** - Change projects, AI adapts automatically
- 💡 **Learning extraction** - AI summarizes key takeaways from conversations

## 🚀 Three Ways to Use LLMSwap:

**📚 1. Python Library/SDK**
```python
from llmswap import LLMClient
client = LLMClient()  # Import into any codebase
response = client.query("Analyze this data")
```

**⚡ 2. CLI Tools**  
```bash
llmswap generate "sort files by size"           # GitHub Copilot alternative
llmswap generate "Python function to read JSON" # Multi-language code generation
llmswap ask "Debug this error"                  # Terminal AI assistant
llmswap costs                                    # Cost optimization insights
```

**📊 3. Enterprise Analytics**
```python
stats = client.get_usage_stats()         # Track AI spend
comparison = client.get_provider_comparison()  # Compare costs
```

## 🎯 What's New in v5.1.0

### 🆕 Revolutionary Workspace & Memory Features
- **🧠 Workspace System**: Per-project memory with `.llmswap/` directories (inspired by `.git/`)
- **📚 Auto-Learning Journal**: AI automatically tracks what you learn in `learnings.md`
- **📖 Architecture Decision Log**: Document technical decisions in `decisions.md`
- **🎯 Context-Aware Mentorship**: AI mentor loads project context, past learnings, and decisions
- **🔍 Workspace Detection**: Automatically finds `.llmswap/` in current or parent directories
- **🗂️ Project Knowledge Base**: Editable `context.md` for project-specific information
- **📊 Workspace Statistics**: Track queries, learnings, and decisions per project
- **🌐 Global Workspace Registry**: Manage all workspaces from `~/.llmswap/workspaces/registry.json`
- **💡 Learning Extraction**: Uses fast AI (Groq) to extract key learnings from conversations
- **🔄 Workspace Switching**: Change directories, AI automatically loads different context

### Teaching & Conversational Features (v5.0)
- **🎓 Age-Appropriate AI**: First CLI with age-targeted explanations (`--age 10`, `--audience "teacher"`)
- **🧑‍🏫 Teaching Personas**: 6 AI mentors (teacher, developer, tutor, professor, mentor, buddy)
- **👤 Personalized Aliases**: Custom AI names (`--alias "Sarah"` for your personal tutor)
- **💬 Multi-Provider Chat**: Provider-native conversational mode with mid-chat switching
- **🧠 Zero Local Storage**: 99% memory reduction, all context at provider level
- **⚙️ Git-like Config**: Team-shareable configuration management
- **📊 Session Analytics**: Real-time cost and token tracking

### Provider & Model Flexibility
- **🔓 Pass-Through Architecture**: Use ANY model from your provider - GPT-5, Claude Opus 4, Gemini 2.5 Pro work immediately
- **⚡ Zero-Wait Updates**: New model released? Use it the same day, no llmswap update needed
- **🌐 10 Providers Currently**: OpenAI, Anthropic, Gemini, Cohere, Perplexity, IBM watsonx, Groq, Ollama, **xAI (Grok)**, **Sarvam AI**
- **🆕 v5.1.4**: Added xAI Grok and Sarvam AI support for cutting-edge and Indian language AI

## 🚀 Complete Feature Set

### 1️⃣ **Python SDK** - Multi-Provider Intelligence
```python
from llmswap import LLMClient

# Auto-detects available providers
client = LLMClient()  

# Or specify your preference
client = LLMClient(provider="anthropic")  # Claude 3 Opus/Sonnet/Haiku
client = LLMClient(provider="openai")     # GPT-4, GPT-3.5
client = LLMClient(provider="gemini")     # Google Gemini Pro/Flash
client = LLMClient(provider="watsonx")    # IBM watsonx.ai Granite
client = LLMClient(provider="ollama")     # Llama, Mistral, Phi, 100+ local
client = LLMClient(provider="groq")       # Groq ultra-fast inference
client = LLMClient(provider="cohere")     # Cohere Command models for RAG
client = LLMClient(provider="perplexity") # Perplexity web-connected AI
client = LLMClient(provider="xai")        # xAI Grok models 🆕
client = LLMClient(provider="sarvam")     # Sarvam AI (Indian languages) 🆕

# Automatic failover
client = LLMClient(fallback=True)
response = client.query("Hello")  # Tries multiple providers

# Save 50-90% with intelligent caching
client = LLMClient(cache_enabled=True)
response1 = client.query("Expensive question")  # $$$ API call
response2 = client.query("Expensive question")  # FREE from cache

# 🆕 v5.1.0: Workspace-Aware SDK (Auto-detects .llmswap/)
from llmswap import LLMClient

# SDK automatically detects workspace in current directory
client = LLMClient()  # Loads workspace context if .llmswap/ exists

# Query with full project context
response = client.query("How should I structure my API?")
# AI has access to: project context, past learnings, architecture decisions

# Check if workspace is loaded
if client.workspace_manager:
    workspace_data = client.workspace_manager.load_workspace()
    print(f"Working in: {workspace_data['project_name']}")
    print(f"Learnings tracked: {workspace_data['statistics']['learnings_count']}")

# Learnings are automatically saved after each query
# No manual tracking needed!

# 🆕 v5.1.0: Eklavya Mentor Integration with Workspace
from llmswap import LLMClient
from llmswap.eklavya.mentor import EklavyaMentor

# Initialize client and mentor
client = LLMClient(provider="anthropic")
mentor = EklavyaMentor(persona="guru", alias="Guruji")

# Generate teaching system prompt with workspace context
teaching_prompt = mentor.generate_system_prompt()

# Use mentor for teaching-focused responses
response = client.query(
    "Explain Python decorators",
    system_prompt=teaching_prompt
)
print(response.content)  # Guru-style teaching response

# Different personas for different learning styles
coach = EklavyaMentor(persona="coach", alias="Coach Sarah")  # Motivational
friend = EklavyaMentor(persona="friend", alias="CodeBuddy")  # Collaborative
socrates = EklavyaMentor(persona="socrates")  # Question-based learning

# 🆕 v5.0: Conversational Sessions (Provider-Native)
client.start_chat_session()
response = client.chat("Tell me about Python")  # Context maintained
response = client.chat("What are its best features?")  # Remembers previous
client.end_chat_session()  # Clean provider-level cleanup

# 🆕 v5.0: Async Support for High Performance
import asyncio
from llmswap import AsyncLLMClient

async def main():
    async_client = AsyncLLMClient()
    response = await async_client.query_async("Process this data")
    
asyncio.run(main())
```

### 2️⃣ **CLI Suite** - 15+ Powerful Terminal Commands

#### 🆕 v5.1.0: Workspace Commands
```bash
# Initialize workspace in current project
llmswap workspace init
llmswap workspace init --name "My Flask App"

# View workspace information
llmswap workspace info                    # Current workspace stats
llmswap workspace list                    # All workspaces
llmswap workspace journal                 # View learning journal
llmswap workspace decisions               # View decision log
llmswap workspace context                 # Edit project context

# Workspace automatically detected when you run:
llmswap chat                              # Loads workspace context
llmswap ask "How do I test this?"         # Uses project-specific context
```

#### CLI Commands (All Features)
```bash
# 🆕 v5.0: Conversational Chat with Provider-Native Context
llmswap chat  # Interactive AI assistant with memory

# 🆕 v5.0: Configuration Management (Git-like)
llmswap config set provider.default anthropic
llmswap config export --file team-config.yaml

# Generate code from natural language (GitHub Copilot alternative)
llmswap generate "sort files by size in reverse order"
llmswap generate "Python function to read JSON file" --language python
llmswap generate "find large files over 100MB" --execute

# Ask one-line questions
llmswap ask "How to optimize PostgreSQL queries?"

# Interactive AI chat
llmswap chat

# AI code review
llmswap review app.py --focus security

# Debug errors instantly
llmswap debug --error "ConnectionTimeout at line 42"

# Analyze logs with AI
llmswap logs --analyze app.log --since "2h ago"

# 🆕 Web UI - Compare models side-by-side
llmswap web  # Opens browser at http://localhost:5005
```

### 🌐 **Web UI for Model Comparison** (v5.1.6 NEW!)

Compare 20+ AI models side-by-side in a beautiful web interface with live streaming results:

![LLMSwap Web UI - Model Comparison](assets/web-ui-screenshot.png)
*Compare responses from GPT-4, Claude, Gemini, Grok, and more - see speed rankings, costs, and quality side-by-side*

```bash
# Install web UI dependencies (one-time, optional)
pip install llmswap[web]

# Start local web server (opens at http://localhost:5005)
llmswap web

# Note: If you haven't installed [web] dependencies, you'll get a helpful message
# with installation instructions. The core SDK and CLI work without it.

# Custom port (if 5005 is already in use)
llmswap web --port 8080

# Allow network access (access from other devices on your network)
llmswap web --host 0.0.0.0 --port 8080

# Don't auto-open browser
llmswap web --no-browser

# Combine options
llmswap web --port 3000 --host 0.0.0.0 --no-browser
```

**Features:**
- ⚡ **Live streaming results** - Cards fill in real-time as responses arrive with speed badges (⚡ Fastest! 🥈 🥉)
- 📊 **Rich metrics** - Response time, tokens, tokens/sec efficiency, response length indicators (📝 Brief, 📄 Detailed, 📚 Comprehensive)
- 💰 **Visual cost comparison** - Bar chart showing relative costs, FREE badges for $0 models (Ollama, Groq)
- 🎨 **Markdown rendering** - Full markdown support with syntax-highlighted code blocks (Highlight.js)
- 📋 **Code block copy** - Individual copy buttons on each code block with hover reveal
- 💾 **Smart preferences** - Remembers your favorite models via localStorage with "Welcome back!" messages
- 🎯 **Real token counts** - Uses actual API token data (not estimates) for accurate cost calculation
- 🔒 **Local-first** - Runs on your machine, uses your API keys, zero data leaves your system

**Perfect for:**
- **Quality comparison** - See which model gives better coding responses (Claude vs GPT-4o vs Grok)
- **Speed testing** - Find fastest model for latency-sensitive apps (Groq vs Gemini Flash)
- **Cost optimization** - Compare $0.0001 vs $0.0150 and decide if quality difference justifies 150x price
- **Prompt engineering** - Test same prompt across providers to find best match
- **Model evaluation** - Compare 20+ models simultaneously without switching tabs

**What Makes It Special:**
- Compare up to 20 models at once (9 visible by default, 12 expandable)
- Success/failure tracking - see exactly which models succeeded vs failed
- First-time user tips - gentle onboarding for new users
- Better error messages - helpful setup instructions when API keys missing

**Screenshot:** Compare GPT-4o, Claude Sonnet 4.5, Gemini 2.0 Flash, Grok-4, and 17 more models simultaneously. See speed badges update in real-time, cost bars visualize price differences, and code blocks with syntax highlighting.

---

### 3️⃣ **Provider Management & Model Configuration** (v5.0.4 NEW!)

**🎯 View All Providers and Models:**
```bash
# Beautiful table showing all providers, their status, and default models
llmswap providers
```

**Output Example:**
```
🤖 llmswap Provider Status Report
============================================================
| Provider   | Default Model              | Status            | Issue                    |
|============|============================|===================|==========================| 
| ANTHROPIC  | claude-3-5-sonnet-20241022 | ✅ CONFIGURED     |                          |
| OPENAI     | gpt-4o                     | ❌ NOT CONFIGURED | OPENAI_API_KEY missing   |
| GEMINI     | gemini-1.5-pro             | ✅ CONFIGURED     |                          |
| COHERE     | command-r-plus-08-2024     | ❌ NOT CONFIGURED | COHERE_API_KEY missing   |
| PERPLEXITY | sonar-pro                  | ✅ CONFIGURED     |                          |
| WATSONX    | granite-13b-chat           | ✅ CONFIGURED     |                          |
| GROQ       | llama-3.3-70b-versatile    | ✅ CONFIGURED     |                          |
| OLLAMA     | llama3.1                   | ⚠️ NOT RUNNING   | Local server not running |

📊 Summary: 5/8 providers available
```

**🔧 Model Configuration:**
```bash
# Update any provider's default model
llmswap config set provider.models.openai gpt-4o-mini
llmswap config set provider.models.cohere command-r-plus-08-2024
llmswap config set provider.models.anthropic claude-3-5-haiku-20241022

# Set default provider
llmswap config set provider.default anthropic

# View current configuration
llmswap config list

# Export/import team configurations
llmswap config export team-config.yaml
llmswap config import team-config.yaml --merge
```

**🚀 Handle Model Deprecations:**
When providers deprecate models (like Cohere's `command-r-plus` → `command-r-plus-08-2024`):
```bash
# Simply update your config - no code changes needed!
llmswap config set provider.models.cohere command-r-plus-08-2024
llmswap providers  # Verify the change
```

**⚙️ Configuration File Location:**
- **User config:** `~/.llmswap/config.yaml` (created automatically on first run)
- **Custom location:** Set `LLMSWAP_CONFIG_HOME` environment variable
- **Team sharing:** Export/import YAML configs for team standardization

**💬 Interactive Chat Commands:**
```bash
llmswap chat  # Start interactive conversation

# Available commands in chat:
/help      # Show all commands
/provider  # Show current provider and available providers
/switch    # Switch to different provider (privacy-compliant)
/clear     # Clear conversation history
/stats     # Show session statistics
/quit      # Exit chat

# Example session:
[0] > Hello, I'm working on a Python project
[anthropic] Hi! I'd be happy to help with your Python project...

[1] > /switch
📋 Available providers: anthropic, gemini, perplexity, watsonx, groq
Enter provider name: gemini

🔒 PRIVACY NOTICE: Switching to gemini
   ✅ NO conversation history will be shared with the new provider
   ✅ This protects your privacy and complies with provider Terms of Service
Continue? (y/n): y

✅ Switched to gemini
💬 Starting fresh conversation with gemini
```

### 4️⃣ **Analytics & Cost Optimization** (v4.0 NEW!)
```bash
# Compare provider costs before choosing
llmswap compare --input-tokens 1000 --output-tokens 500
# Output: Gemini $0.0005 | OpenAI $0.014 | Claude $0.011

# Track your actual usage and spending
llmswap usage --days 30 --format table
# Shows: queries, tokens, costs by provider, response times

# Get AI spend optimization recommendations
llmswap costs
# Suggests: Switch to Gemini, enable caching, use Ollama for dev
```

```python
# Python SDK - Full analytics suite
client = LLMClient(analytics_enabled=True)

# Automatic conversation memory
response = client.chat("What is Python?")
response = client.chat("How is it different from Java?")  # Remembers context

# Real-time cost tracking
stats = client.get_usage_stats()
print(f"Total queries: {stats['totals']['queries']}")
print(f"Total cost: ${stats['totals']['cost']:.4f}")
print(f"Avg response time: {stats['avg_response_time_ms']}ms")

# Cost optimization insights
analysis = client.get_cost_breakdown()
print(f"Potential savings: ${analysis['optimization_opportunities']['potential_provider_savings']:.2f}")
print(f"Recommended provider: {analysis['recommendations'][0]}")

# Compare providers for your specific use case
comparison = client.get_provider_comparison(input_tokens=1500, output_tokens=500)
print(f"Cheapest: {comparison['cheapest']} (${comparison['cheapest_cost']:.6f})")
print(f"Savings vs current: {comparison['max_savings_percentage']:.1f}%")
```

### 4️⃣ **Advanced Features**

**Async/Streaming Support**
```python
import asyncio
from llmswap import AsyncLLMClient

async def main():
    client = AsyncLLMClient()
    
    # Async queries
    response = await client.query("Explain AI")
    
    # Streaming responses
    async for chunk in client.stream("Write a story"):
        print(chunk, end="")
```

**Multi-User Security**
```python
# Context-aware caching for multi-tenant apps
response = client.query(
    "Get user data",
    cache_context={"user_id": "user123"}  # Isolated cache
)
```

**Provider Comparison**
```python
# Compare responses from different models
comparison = client.compare_providers(
    "Solve this problem",
    providers=["anthropic", "openai", "gemini"]
)
```

## 📊 Real-World Use Cases & Examples

### 🏢 **Enterprise: Content Generation at Scale**
**Netflix-style recommendation descriptions for millions of items:**
```python
from llmswap import LLMClient

# Start with OpenAI, switch to Gemini for 96% cost savings
client = LLMClient(provider="gemini", cache_enabled=True)

def generate_descriptions(items):
    for item in items:
        # Cached responses save 90% on similar content
        description = client.query(
            f"Create engaging description for {item['title']}",
            cache_context={"category": item['category']}
        )
        yield description.content

# Cost: $0.0005 per description vs $0.015 with OpenAI
```

### 👨‍💻 **Developers: AI-Powered Code Review**
**GitHub Copilot alternative for your team:**
```python
# CLI for instant code review
$ llmswap review api_handler.py --focus security

# Python SDK for CI/CD integration
from llmswap import LLMClient

client = LLMClient(analytics_enabled=True)
review = client.query(f"Review this PR for bugs: {pr_diff}")

# Track costs across your team
stats = client.get_usage_stats()
print(f"This month's AI costs: ${stats['totals']['cost']:.2f}")
```

### 🎓 **Education: AI Tutoring Platform**
**Khan Academy-style personalized learning:**
```python
client = LLMClient(provider="ollama")  # Free for schools!

def ai_tutor(student_question, subject):
    # Use watsonx for STEM, Ollama for general subjects
    if subject in ["math", "science"]:
        client.set_provider("watsonx")
    
    response = client.query(
        f"Explain {student_question} for a {subject} student",
        cache_context={"grade_level": student.grade}
    )
    return response.content

# Zero cost with Ollama, enterprise-grade with watsonx
```

### 🚀 **Startups: Multi-Modal Customer Support**
**Shopify-scale merchant assistance:**
```python
from llmswap import LLMClient

# Start with Anthropic, fallback to others if rate-limited
client = LLMClient(fallback=True, cache_enabled=True)

async def handle_support_ticket(ticket):
    # 90% of questions are similar - cache saves thousands
    response = await client.aquery(
        f"Help with: {ticket.issue}",
        cache_context={"type": ticket.category}
    )
    
    # Auto-escalate complex issues
    if response.confidence < 0.8:
        client.set_provider("anthropic")  # Use best model
        response = await client.aquery(ticket.issue)
    
    return response.content
```

### 📱 **Content Creators: Writing Assistant**
**Medium/Substack article generation:**
```bash
# Quick blog post ideas
llmswap ask "10 trending topics in AI for developers"

# Full article draft
llmswap chat
> Write a 1000-word article on prompt engineering
> Make it more technical
> Add code examples
```

### 🔧 **DevOps Engineers: Infrastructure as Code**
**Kubernetes and Docker automation:**
```bash
# Generate Kubernetes deployment
llmswap generate "Kubernetes deployment for React app with 3 replicas" --save k8s-deploy.yaml

# Docker multi-stage build
llmswap generate "Docker multi-stage build for Node.js app with Alpine" --language dockerfile

# Terraform AWS infrastructure
llmswap generate "Terraform script for AWS VPC with public/private subnets" --save main.tf
```

### 🎯 **Data Scientists: Analysis Workflows**
**Pandas, visualization, and ML pipeline generation:**
```bash
# Data analysis scripts
llmswap generate "Pandas script to clean CSV and handle missing values" --language python

# Visualization code
llmswap generate "Matplotlib script for correlation heatmap" --save plot.py

# ML pipeline
llmswap generate "scikit-learn pipeline for text classification with TF-IDF" --language python
```

### 💬 **App Developers: Full Applications**
**Complete app generation with modern frameworks:**
```bash
# Streamlit chatbot
llmswap generate "Streamlit chatbot app with session state and file upload" --save chatbot.py

# FastAPI REST API
llmswap generate "FastAPI app with CRUD operations for user management" --save api.py

# React component
llmswap generate "React component for data table with sorting and filtering" --language javascript --save DataTable.jsx
```

### 🤖 **AI/ML Engineers: Model Deployment**
**Production-ready ML workflows and deployments:**
```bash
# LangChain RAG pipeline
llmswap generate "LangChain RAG system with ChromaDB and OpenAI embeddings" --language python --save rag_pipeline.py

# Hugging Face model fine-tuning
llmswap generate "Script to fine-tune BERT for sentiment analysis with Hugging Face" --save finetune.py

# Gradio ML demo app
llmswap generate "Gradio app for image classification with drag and drop" --save demo.py

# Vector database setup
llmswap generate "Pinecone vector database setup for semantic search" --language python
```

### 🔒 **Security Engineers: Vulnerability Scanning**  
**Security automation and compliance scripts:**
```bash
# Security audit script
llmswap generate "Python script to scan for exposed API keys in codebase" --save security_scan.py

# OAuth2 implementation
llmswap generate "FastAPI OAuth2 with JWT tokens implementation" --language python

# Rate limiting middleware
llmswap generate "Redis-based rate limiting for Express.js" --language javascript
```

### 🛠️ **AI Agent Development: Tool Creation**
**Build tools and functions for AI agents (inspired by Anthropic's writing tools):**
```bash
# Create tool functions for agents
llmswap generate "Python function for web scraping with BeautifulSoup error handling" --save tools/scraper.py

# Database interaction tools
llmswap generate "SQLAlchemy functions for CRUD operations with type hints" --save tools/database.py

# File manipulation utilities
llmswap generate "Python class for safe file operations with context managers" --save tools/file_ops.py

# API integration tools
llmswap generate "Async Python functions for parallel API calls with rate limiting" --save tools/api_client.py

# Agent orchestration
llmswap generate "LangChain agent with custom tools for research tasks" --language python
```

### 🏆 **Hackathon Power Kit: Win Your Next Hackathon**
**Build complete MVPs in minutes, not hours:**
```bash
# RAG Chatbot for Document Q&A (Most requested hackathon project)
llmswap generate "Complete RAG chatbot with OpenAI embeddings, Pinecone vector store, and Streamlit UI for PDF document Q&A" --save rag_chatbot.py

# Full-Stack SaaS Starter (0 to production in 5 minutes)
llmswap generate "Next.js 14 app with Clerk auth, Stripe payments, Prisma ORM, and PostgreSQL schema for SaaS platform" --save saas_mvp.js
```

## 🛠️ Installation & Setup

```bash
# Install package
pip install llmswap

# Set any API key (one is enough to get started)
export ANTHROPIC_API_KEY="sk-..."       # For Claude
export OPENAI_API_KEY="sk-..."          # For GPT-4
export GEMINI_API_KEY="..."             # For Google Gemini
export WATSONX_API_KEY="..."            # For IBM watsonx
export WATSONX_PROJECT_ID="..."         # watsonx project
export GROQ_API_KEY="gsk_..."           # For Groq ultra-fast inference
export COHERE_API_KEY="co_..."            # For Cohere Command models
export PERPLEXITY_API_KEY="pplx-..."      # For Perplexity web search
# Or run Ollama locally for 100% free usage
```

## 📈 Token Usage Guidelines

| Task Type | Input Tokens | Output Tokens | Estimated Cost |
|-----------|--------------|---------------|----------------|
| Simple Q&A | 100 | 50 | ~$0.001 |
| Code Review | 1000 | 300 | ~$0.010 |
| Document Analysis | 3000 | 800 | ~$0.025 |
| Creative Writing | 500 | 2000 | ~$0.020 |

## 🔗 Quick Links

- **GitHub**: [github.com/sreenathmmenon/llmswap](https://github.com/sreenathmmenon/llmswap)
- **Documentation**: [Full API Reference](https://github.com/sreenathmmenon/llmswap#readme)
- **PyPI**: [pypi.org/project/llmswap](https://pypi.org/project/llmswap)
- **Issues**: [Report bugs or request features](https://github.com/sreenathmmenon/llmswap/issues)

## 🚀 Get Started in 30 Seconds

```bash
# Install
pip install llmswap

# Set ANY API key (one is enough)
export ANTHROPIC_API_KEY="your-key"  # or OpenAI, or Gemini...

# Start building
llmswap chat "Hello!"
```

**Or use the SDK:**

```python
from llmswap import LLMClient

# Auto-detects available providers
client = LLMClient()

# Chat with AI
response = client.chat("Write a Python function to sort a list")
print(response.content)

# Add tool calling (v5.2.0)
from llmswap import Tool

weather = Tool(
    name="get_weather",
    description="Get weather data",
    parameters={"city": {"type": "string"}},
    required=["city"]
)

response = client.chat("What's the weather in Tokyo?", tools=[weather])
```

**That's it!** Automatic provider detection, failover, caching, and now tool calling - all in 10 lines.

---

## 🌐 Links & Resources

- **Website:** [llmswap.org](https://llmswap.org)
- **Documentation:** [llmswap.org/docs](https://llmswap.org/docs)
- **CLI Reference:** [llmswap.org/docs/cli.html](https://llmswap.org/docs/cli.html)
- **SDK Guide:** [llmswap.org/docs/sdk.html](https://llmswap.org/docs/sdk.html)
- **GitHub Repository:** [github.com/sreenathmmenon/llmswap](https://github.com/sreenathmmenon/llmswap)
- **PyPI Package:** [pypi.org/project/llmswap](https://pypi.org/project/llmswap)
- **Homebrew Tap:** [github.com/llmswap/homebrew-tap](https://github.com/llmswap/homebrew-tap)
- **Issues & Support:** [github.com/sreenathmmenon/llmswap/issues](https://github.com/sreenathmmenon/llmswap/issues)
- **Twitter/X:** [@llmswap](https://twitter.com/llmswap)

---

## 📊 Why Thousands Choose llmswap

- ⚡ **12,000+ Downloads** - Trusted by developers worldwide
- 🚀 **v5.2.0** - Now with universal tool calling
- 🔓 **MIT License** - 100% open source, free forever
- 🐍 **Python 3.8+** - Works on all platforms
- 🌍 **11 Providers** - Anthropic, OpenAI, Gemini, Groq, xAI, Cohere, Perplexity, Sarvam, IBM watsonx, Ollama
- 📦 **pip & Homebrew** - Install in seconds
- 🎯 **Production Ready** - Used in real products

## Compare with Alternatives

| Feature | llmswap | LiteLLM | LangChain |
|---------|---------|---------|-----------|
| **Setup Time** | 30 seconds | 5 minutes | 1 hour |
| **Lines of Code** | 10 | 20 | 100+ |
| **Tool Calling** | ✅ Universal | ✅ Universal | ✅ Complex |
| **Caching** | ✅ Built-in | ✅ Optional | ❌ External |
| **Workspace Memory** | ✅ Unique | ❌ | ❌ |
| **CLI + SDK** | ✅ Both | SDK only | SDK only |
| **Learning Curve** | Easy | Medium | Hard |
| **Best For** | Shipping fast | Gateway | Agents |

**Choose llmswap when you want to ship fast without the complexity.**

---

Built with ❤️ for developers who ship. Star us on [GitHub](https://github.com/sreenathmmenon/llmswap) if llmswap helps you build faster!

**Latest:** v5.2.0 - Universal tool calling across all providers 🚀

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llmswap",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "10-providers, adaptive-learning, age-appropriate-ai, agentic-ai, agents, ai, ai-abstraction-layer, ai-assistant, ai-chat, ai-chat-cli, ai-cli, ai-code-assistant, ai-code-generation, ai-code-review, ai-comparison-tool, ai-context-switching, ai-cost-savings, ai-dashboard, ai-debugging, ai-infrastructure, ai-learning, ai-logs, ai-memory, ai-mentor, ai-pair-programming, ai-persona, ai-personas, ai-provider-switcher, ai-sdk, ai-straying-prevention, ai-teaching, ai-testing-tool, ai-tutor, anthropic, anthropic-sdk-alternative, api-client, architecture-decisions, arena-validated-models, bash-generator, battle-tested-ai, browser-ui, chatgpt-alternative, chromadb, churn-detection, claude, claude-4-5, claude-code-alternative, claude-sonnet-4-5, cli, cli-ai-assistant, code-completion-api, code-generation, code-review, coding-mentor, cohere, command-generation, command-line-ai, comparison-dashboard, context-aware-ai, contextual-ai, continue-dev-alternative, contract-analysis, conversational-ai, conversational-cli, copilot-alternative, copilot-cli, copilot-cli-alternative, copilot-replacement, cost-analytics, cost-comparison, cost-optimization, cost-savings, cross-provider-cli, cursor-alternative, custom-ai-personas, customer-support, debugging, developer-ai-tools, developer-tools, document-qa, due-diligence, dynamic-provider-switching, editor-integration, educational-ai, eklavya, embeddings, enterprise, enterprise-ai, fast-inference, fastapi, financial-analysis, flask-ui, function-calling, gemini, gemini-cli-alternative, gemini-sdk-alternative, github-copilot-alternative, gpt-4, granite, grok-4, grok-4-0709, grok-4-fast, groq, groq-inference, hackathon, hackathon-starter, ibm-watson, ibm-watsonx, indian-language-ai, intelligent-routing, langchain, langchain-alternative, leaderboard-models, learning-journal, library-and-cli, litellm-alternative, llama, llm, llm-abstraction, llm-api, llm-benchmarking, llm-cli-interface, llm-comparison, llm-evaluation, llm-gateway, llm-gateway-routing, llm-routing, llm-sdk, llm-switching, llm-tools, lmarena, lmarena-tested-models, log-analysis, m&a, mistral, model-comparison, model-evaluation, model-testing, multi-llm, multi-llm-cli, multi-llm-copilot, multi-modal-ai, multi-model-ai, multi-model-testing, multi-provider-chat, multi-provider-cli, multi-provider-routing, multi-provider-sdk, multi-provider-tools, multilingual-ai, multiple-contexts, natural-language-to-code, no-vendor-lock-in, ollama, open-source-copilot, openai, openai-alternative-sdk, openai-cli-alternative, pdf-qa, perplexity, persistent-context, persona-rotation, personalized-ai, pinecone, production-validated-llm, project-context, project-knowledge-base, project-memory, prompt-testing, provider-agnostic-cli, provider-agnostic-sdk, provider-fallback, provider-health-check, provider-switching, provider-verification, python-generator, python-sdk, python-sdk-cli, quality-comparison, rag, response-caching, response-comparison, retrieval-augmented-generation, sarvam-ai, sdk, sdk-and-cli, second-brain, self-hosted-ai, session-management, shell-integration, side-by-side-comparison, sonnet-4-5, sonnet-4.5, speed-comparison, streamlit, support-triage, teaching-assistant, terminal-ai, terminal-ai-chat, terminal-assistant, text-to-code, token-tracking, tool-calling, top-rated-models, universal-ai-cli, universal-ai-sdk, universal-tool-calling, usage-analytics, vector-database, vendor-agnostic, vim-integration, vim-plugin, visual-comparison, watson-ai, watsonx, web-interface, web-ui, workspace-ai, workspace-system, xai-grok",
    "author": null,
    "author_email": "Sreenath M Menon <sreenathmmmenon@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3b/d2/0f241ed41732020510eb13c33510caeb663b42de9756b31cf40e15d1452c/llmswap-5.2.2.tar.gz",
    "platform": null,
    "description": "# llmswap: Universal LLM SDK That Just Works\n\n[![PyPI version](https://badge.fury.io/py/llmswap.svg)](https://badge.fury.io/py/llmswap)\n[![PyPI Downloads](https://static.pepy.tech/badge/llmswap)](https://pepy.tech/projects/llmswap)\n[![Homebrew](https://img.shields.io/badge/homebrew-available-blue?logo=homebrew)](https://github.com/llmswap/homebrew-tap)\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Ship AI Features in Minutes, Not Weeks\n\n**One SDK. 11 providers. Zero vendor lock-in.**\n\nStop wrestling with complex frameworks. llmswap gives you tool calling, caching, and multi-provider support in 10 lines of code. Used by developers shipping real products.\n\n**\ud83d\udcda Documentation:** [llmswap.org](https://llmswap.org) | **\u26a1 CLI Reference:** [CLI Docs](https://llmswap.org/docs/cli.html) | **\ud83d\udc0d SDK Guide:** [SDK Docs](https://llmswap.org/docs/sdk.html)\n\n## \ud83c\udd95 NEW in v5.2.0: Universal Tool Calling\n\n**Enable LLMs to access YOUR data and systems** - Define tools once, works across ALL providers.\n\n```python\nfrom llmswap import LLMClient, Tool\n\n# Define tool to access YOUR weather API\nweather = Tool(\n    name=\"get_weather\",\n    description=\"Get real-time weather data\",\n    parameters={\"city\": {\"type\": \"string\"}},\n    required=[\"city\"]\n)\n\n# Works with ANY provider - Anthropic, OpenAI, Gemini, Groq, xAI\nclient = LLMClient(provider=\"anthropic\")\nresponse = client.chat(\"What's the weather in Tokyo?\", tools=[weather])\n\n# LLM calls YOUR function \u2192 you return data \u2192 LLM gives natural response\n```\n\n**Real-World Use Cases:**\n- \ud83c\udf26\ufe0f Give LLM access to YOUR weather API for real-time data\n- \ud83d\udcbe Let LLM query YOUR database for customer information\n- \ud83d\uded2 Enable LLM to search YOUR product catalog for shopping assistance\n- \ud83d\udd27 Connect LLM to YOUR systems and APIs\n\n**Works with:** Anthropic, OpenAI, Groq, Gemini, xAI | **[Quick Start Guide \u2192](examples/)** | **[Full Docs \u2192](.llmswap/website-docs/)**\n\n---\n\n## \u26a1 Quick Start (30 seconds)\n\n```bash\n# Install\npip install llmswap\n\n# or Homebrew\nbrew tap llmswap/tap && brew install llmswap\n\n# Create your first workspace\ncd ~/my-project\nllmswap workspace init\n\n# Chat with AI that remembers everything\nllmswap chat \"Help me with Flask routing\"\n# AI has full project context + all past learnings!\n\n# \ud83c\udd95 Compare models visually (optional)\npip install llmswap[web]\nllmswap web  # Opens browser - compare GPT-4 vs Claude vs Gemini\n```\n\n> **\ud83c\udd95 Use Any Model from Any Provider!** New model just launched? Use it immediately. llmswap's pass-through architecture means GPT-5, Claude Opus 4, Gemini 2.5 Pro work the day they release. Currently supports **10 providers** (OpenAI, Anthropic, Gemini, Cohere, Perplexity, IBM watsonx, Groq, Ollama, **xAI Grok**, **Sarvam AI**).\n\n> **\u2705 Battle-Tested with LMArena Top Models:** All 10 providers tested and validated with top-rated models from LMArena leaderboard. From Grok-4 (xAI's flagship) to Claude Sonnet 4.5 (best coding model) to Gemini 2.0 Flash Exp - every model in our defaults is production-validated and arena-tested for real-world use.\n\n**The First AI Tool with Project Memory & Learning Journals** - LLMSwap v5.1.0 introduces revolutionary workspace system that remembers your learning journey across projects. Build apps without vendor lock-in (SDK) or use from terminal (CLI). Works with your existing subscriptions: Claude, OpenAI, Gemini, Cohere, Perplexity, IBM watsonx, Groq, Ollama, xAI Grok, Sarvam AI (**10 providers**). **Use any model from your provider** - even ones released tomorrow. Pass-through architecture means GPT-5, Gemini 2.5 Pro, Claude Opus 4? They work the day they launch.\n\n**\ud83c\udfaf Solve These Common Problems:**\n- \u274c \"I need multiple second brains for different aspects of my life\" \ud83c\udd95\n- \u274c \"AI strays over time, I need to re-steer it constantly\" \ud83c\udd95\n- \u274c \"I keep explaining the same context to AI over and over\"\n- \u274c \"AI forgets what I learned yesterday\"\n- \u274c \"I lose track of architecture decisions across projects\"\n- \u274c \"Context switching between projects is exhausting\"\n- \u274c \"I want AI to understand my specific codebase, not generic answers\"\n\n**\u2705 llmswap v5.1.0 Solves All These:**\n- \u2705 Multiple independent \"second brains\" per project/life aspect \ud83c\udd95\n- \u2705 Persistent context prevents AI from straying \ud83c\udd95\n- \u2705 Per-project workspaces that persist context across sessions\n- \u2705 Auto-tracked learning journals - never forget what you learned\n- \u2705 Architecture decision logs - all your technical decisions documented\n- \u2705 Zero context switching - AI loads the right project automatically\n- \u2705 Project-aware AI - mentor understands YOUR specific tech stack\n\n## Why Developers Choose llmswap\n\n\u2705 **10 Lines to Production** - Not 1000 like LangChain\n\u2705 **Automatic Fallback** - Never down. Switches providers if one fails\n\u2705 **50-90% Cost Savings** - Built-in caching. Same query = FREE\n\u2705 **Workspace Memory** - Your AI remembers your project context\n\u2705 **Universal Tool Calling** - Define once, works everywhere (NEW v5.2.0)\n\u2705 **CLI + SDK** - Code AND terminal. Your choice\n\u2705 **Zero Lock-in** - Switch from OpenAI to Claude in 1 line\n\n**Built for Speed:**\n- \ud83d\ude80 **Hackathons** - Ship in hours\n- \ud83d\udca1 **MVPs** - Validate ideas fast\n- \ud83d\udcf1 **Production Apps** - Scale as you grow\n- \ud83c\udfaf **Real Projects** - Trusted by developers worldwide\n\n**v5.1.0**: Revolutionary AI mentorship with **project memory**, **workspace-aware context**, **auto-tracked learning journals**, and **persistent mentor relationships**. The first AI tool that truly remembers your learning journey across projects.\n\n**NEW in v5.2.0:**\n- \ud83d\udee0\ufe0f **Universal Tool Calling** - Enable LLMs to use YOUR custom functions across all providers\n- \ud83d\udd27 **5 Providers Supported** - Anthropic, OpenAI, Groq, Gemini, xAI with automatic format conversion\n- \ud83d\udcd6 **Complete Documentation** - Full guides, examples, and real-world use cases\n- \u2705 **100% Backward Compatible** - All existing features work without changes\n\n**v5.1.6:**\n- \ud83c\udf10 **Web UI** - Compare 20+ models side-by-side in beautiful browser interface & learn prompting techniques\n- \ud83d\udcca **Visual Comparison** - Live streaming results with speed badges (\u26a1\ud83e\udd48\ud83e\udd49), cost charts, efficiency metrics\n- \ud83d\udcb0 **Cost Optimizer** - See exact costs across providers, find cheapest model for your use case\n- \ud83c\udfa8 **Markdown + Code Highlighting** - Syntax-highlighted code blocks with individual copy buttons\n- \ud83d\udcbe **Smart Preferences** - Remembers your favorite models via localStorage\n- \ud83d\udcc8 **Real-time Metrics** - Tokens/sec efficiency, response length indicators, actual API token counts\n\n**NEW in v5.1.0:**\n- \ud83e\udde0 **Workspace Memory** - Per-project context that persists across sessions\n- \ud83d\udcda **Auto-Learning Journal** - Automatically tracks what you learn in each project\n- \ud83c\udfaf **Context-Aware Mentorship** - AI mentor understands your project and past learnings\n- \ud83d\udcd6 **Architecture Decision Log** - Document and remember key technical decisions\n- \ud83d\udd04 **Cross-Project Intelligence** - Learn patterns from one project, apply to another\n- \ud83d\udca1 **Proactive Learning** - AI suggests next topics based on your progress\n- \ud83d\uddc2\ufe0f **Project Knowledge Base** - Custom prompt library per workspace\n\n## \ud83e\udde0 Finally: An Elegant Solution for Multiple Second Brains\n\n**The Problem Industry Leaders Can't Solve:**\n\n> \"I still haven't found an elegant solution to the fact that I need several second brains for the various aspects of my life, each with different styles and contexts.\" - Industry feedback\n\n**The LLMSwap Solution: Workspace System**\n\nEach aspect of your life gets its own \"brain\" with independent memory:\n\n- \ud83d\udcbc **Work Projects** - `~/work/api-platform` - Enterprise patterns, team conventions\n- \ud83d\udcda **Learning** - `~/learning/rust` - Your learning journey, struggles, progress\n- \ud83d\ude80 **Side Projects** - `~/personal/automation` - Personal preferences, experiments\n- \ud83c\udf10 **Open Source** - `~/oss/django` - Community patterns, contribution history\n\n**What Makes It \"Elegant\":**\n- \u2705 Zero configuration - just `cd` to project directory\n- \u2705 Auto-switching - AI loads the right \"brain\" automatically\n- \u2705 No context bleed - work knowledge stays separate from personal\n- \u2705 Persistent memory - each brain remembers across sessions\n- \u2705 Independent personas - different teaching style per project if you want\n\n**Stop Re-Explaining Context. Start Building.**\n\n---\n\n## \ud83c\udfaf Transform AI Into Your Personal Mentor with Project Memory\n\n**Inspired by Eklavya** - the legendary self-taught archer who learned from dedication and the right guidance - LLMSwap transforms any AI provider into a personalized mentor that adapts to your learning style **and remembers your journey**.\n\n**The Challenge:** Developers struggle to learn effectively from AI because:\n- \ud83d\udd34 Responses are generic, lack personality, and don't adapt to individual needs\n- \ud83d\udd34 AI loses context between sessions - you repeat the same explanations\n- \ud83d\udd34 No learning history - AI doesn't know what you already learned\n- \ud83d\udd34 Project context is lost - AI doesn't understand your codebase\n\n**LLMSwap's Solution v5.1.0:** Choose your mentorship style, initialize a workspace, and ANY AI provider becomes **your personalized guide that remembers everything**:\n\n```bash\n# \ud83c\udd95 v5.1.0: Initialize workspace for your project\ncd ~/my-flask-app\nllmswap workspace init\n# Creates .llmswap/ with context.md, learnings.md, decisions.md\n\n# Now your AI mentor KNOWS your project\nllmswap chat --mentor guru --alias \"Guruji\"\n# Mentor has full context: your tech stack, past learnings, decisions made\n\n# \ud83c\udd95 Auto-tracked learning journal\n# Every conversation automatically saves key learnings\nllmswap workspace journal\n# View everything you've learned in this project\n\n# \ud83c\udd95 Architecture decision log\nllmswap workspace decisions\n# See all technical decisions documented automatically\n\n# View all your workspaces\nllmswap workspace list\n\n# Get wisdom and deep insights from a patient teacher\nllmswap chat --mentor guru --alias \"Guruji\"\n\n# High-energy motivation when you're stuck\nllmswap ask \"How do I debug this?\" --mentor coach\n\n# Collaborative peer learning for exploring ideas\nllmswap chat --mentor friend --alias \"CodeBuddy\"\n\n# Question-based learning for critical thinking\nllmswap ask \"Explain REST APIs\" --mentor socrates\n\n# \ud83c\udd95 Use Claude Sonnet 4.5 - Best coding model\nllmswap chat --provider anthropic --model claude-sonnet-4-5\n# Or set as default in config for all queries\n```\n\n### \ud83d\udd04 Rotate Personas to Expose Blind Spots\n\n**Industry Insight:** \"Rotate personas: mentor, skeptic, investor, end-user. Each lens exposes blind spots differently.\"\n\n**Use Case: Reviewing API Design**\n\n```bash\n# Round 1: Long-term wisdom\nllmswap chat --mentor guru \"Design API for multi-tenant SaaS\"\n# Catches: scalability, technical debt, maintenance\n\n# Round 2: Critical questions\nllmswap chat --mentor socrates \"Review this API design\"\n# Catches: assumptions, alternatives, edge cases\n\n# Round 3: Practical execution\nllmswap chat --mentor coach \"What's the fastest path to v1?\"\n# Catches: over-engineering, paralysis by analysis\n```\n\n**Same project context. Different perspectives. Complete understanding.**\n\n**What Makes v5.1.0 Revolutionary:**\n- \ud83e\udde0 **Works with ANY provider** - Transform Claude, GPT-4, or Gemini into your mentor\n- \ud83c\udfad **6 Teaching Personas** - Guru, Coach, Friend, Socrates, Professor, Tutor\n- \ud83d\udcca **Project Memory** - Per-project context that persists across sessions \u2b50 NEW\n- \ud83d\udcda **Auto-Learning Journal** - Automatically tracks what you learn \u2b50 NEW\n- \ud83d\udcd6 **Decision Tracking** - Documents architecture decisions \u2b50 NEW\n- \ud83c\udf93 **Age-Appropriate** - Explanations tailored to your level (--age 10, --age 25, etc.)\n- \ud83d\udcb0 **Cost Optimized** - Use cheaper providers for learning, premium for complex problems\n- \ud83d\udd04 **Workspace Detection** - Automatically loads project context \u2b50 NEW\n\n**Traditional AI tools give you answers. LLMSwap v5.1.0 gives you a personalized learning journey that REMEMBERS.**\n\n## \ud83c\udfc6 Production-Validated with LMArena Top Models\n\n**Every model in LLMSwap's defaults comes from LMArena's top performers:**\n\nAll 10 providers ship with carefully selected default models based on LMArena rankings and real-world production testing. We track arena performance and update defaults to ensure you're always using validated, battle-tested models.\n\n| Provider | Default Model | Arena Status | Why We Chose It |\n|----------|---------------|--------------|-----------------|\n| **Anthropic** | claude-sonnet-4-5 | #1 Coding | Best coding model in the world (Sept 2025) |\n| **xAI** | grok-4-0709 | Top 5 Overall | Advanced reasoning, real-time data access |\n| **Gemini** | gemini-2.0-flash-exp | Top 10 | Lightning-fast, multimodal, cutting-edge |\n| **OpenAI** | gpt-4o-mini | Cost Leader | Best price/performance ratio |\n| **Cohere** | command-r-08-2024 | Top RAG | Enterprise-grade retrieval-augmented generation |\n| **Perplexity** | sonar | Web Search | Real-time web-connected AI with citations |\n| **Groq** | llama-3.1-8b-instant | Speed King | 840+ tokens/second ultra-fast inference |\n| **Sarvam** | sarvam-m | Multilingual | 24B params, best for 10 Indian languages |\n| **Watsonx** | granite-3-8b-instruct | Enterprise | IBM's production-grade AI for business |\n| **Ollama** | granite-code:8b | Local AI | Privacy-first, runs on your hardware |\n\n**\u2705 Battle-tested with real API calls** - Every provider validated in production, not simulated tests.\n\n**\u2705 Weekly model updates** - We monitor LMArena rankings and deprecation notices to keep defaults current.\n\n**\u2705 Zero lock-in** - Don't like our defaults? Override with any model: `LLMClient(model=\"gpt-5\")` or `llmswap config set provider.models.openai gpt-5`\n\n---\n\n## \ud83d\udd13 Use Any Model Your Provider Supports (Zero-Wait Model Support)\n\nHere's something cool: LLMSwap doesn't restrict which models you can use. When GPT-5 or Gemini 2.5 Pro drops tomorrow, you can start using it immediately. No waiting for us to update anything.\n\n**How?** We use pass-through architecture. Whatever model name you pass goes directly to your provider's API. We don't gatekeep.\n\n### CLI Examples:\n\n```bash\n# Use any OpenAI model (even ones that don't exist yet)\nllmswap chat --provider openai --model gpt-5\nllmswap chat --provider openai --model o3-mini\n\n# Use any Anthropic model\nllmswap chat --provider anthropic --model claude-opus-4\nllmswap chat --provider anthropic --model claude-sonnet-4-5\n\n# Use any Gemini model\nllmswap chat --provider gemini --model gemini-2-5-pro\nllmswap chat --provider gemini --model gemini-ultra-2\n\n# Set as default so you don't have to type it every time\nllmswap config set provider.models.openai gpt-5\nllmswap config set provider.models.anthropic claude-opus-4\n```\n\n### Python SDK:\n\n```python\nfrom llmswap import LLMClient\n\n# Use whatever model your provider offers\nclient = LLMClient(provider=\"openai\", model=\"gpt-5\")\nclient = LLMClient(provider=\"anthropic\", model=\"claude-opus-4\")\nclient = LLMClient(provider=\"gemini\", model=\"gemini-2-5-pro\")\n\n# Model just released? Use it right now\nclient = LLMClient(provider=\"openai\", model=\"gpt-6\")  # works!\n```\n\n**The point:** You're not limited to what we've documented. If your provider supports it, llmswap supports it.\n\n## \ud83c\udd9a LLMSwap vs Single-Provider Tools\n\n### For Python Developers Building Apps:\n\n| Your Need | Single-Provider SDKs | LLMSwap SDK |\n|-----------|---------------------|-------------|\n| Build chatbot/app | Import `openai` library (locked in) | Import `llmswap` (works with any provider) |\n| Switch providers | Rewrite all API calls | Change 1 line: `provider=\"anthropic\"` |\n| Try different models | Sign up, new SDK, refactor code | Just change config, same code |\n| Use new models | Wait for SDK update | Works immediately (pass-through) |\n| Cost optimization | Manual implementation | Built-in caching (50-90% savings) |\n| Use multiple providers | Maintain separate codebases | One codebase, switch dynamically |\n\n### For Developers Using Terminal:\n\n| Your Need | Vendor CLIs | LLMSwap CLI |\n|-----------|-------------|-------------|\n| Have Claude subscription | Install Claude Code (Claude only) | Use llmswap (works with Claude) |\n| Have OpenAI subscription | Build your own scripts | Use llmswap (works with OpenAI) |\n| Have multiple subscriptions | Install 3+ different CLIs | One CLI for all subscriptions |\n| New model launches | Wait for CLI update | Use it same day (pass-through) |\n| Want AI to teach you | Not available | Built-in Eklavya mentorship |\n| Switch providers mid-chat | Can't - locked in | `/switch anthropic` command |\n\n**The Bottom Line:**\n- **Building an app?** Use llmswap SDK - no vendor lock-in\n- **Using terminal?** Use llmswap CLI - works with your existing subscriptions\n- **Both?** Perfect - it's the same tool!\n\n```bash\n# \ud83c\udd95 NEW v5.1.0: Workspace System - Project Memory That Persists\nllmswap workspace init\n# Creates .llmswap/ directory with:\n#   - workspace.json (project metadata)\n#   - context.md (editable project description)\n#   - learnings.md (auto-tracked learning journal)\n#   - decisions.md (architecture decision log)\n\nllmswap workspace list                    # View all your workspaces\nllmswap workspace info                    # Show current workspace statistics\nllmswap workspace journal                 # View learning journal\nllmswap workspace decisions               # View decision log\nllmswap workspace context                 # Edit project context\n\n# \ud83c\udd95 NEW v5.1.0: Context-Aware Mentorship\n# AI mentor automatically loads project context, past learnings, and decisions\nllmswap chat\n# Mentor knows: your tech stack, what you've learned, decisions made\n\n# \ud83c\udd95 NEW v5.0: Age-Appropriate AI Explanations\nllmswap ask \"What is Docker?\" --age 10\n# Output: \"Docker is like a magic lunch box! \ud83e\udd6a When your mom packs...\"\n\nllmswap ask \"What is blockchain?\" --audience \"business owner\"\n# Output: \"Think of blockchain like your business ledger system...\"\n\n# \ud83c\udd95 NEW v5.0: Teaching Personas & Personalization  \nllmswap ask \"Explain Python classes\" --teach --mentor developer --alias \"Sarah\"\n# Output: \"[Sarah - Senior Developer]: Here's how we handle classes in production...\"\n\n# \ud83c\udd95 NEW v5.0: Conversational Chat with Provider Switching\nllmswap chat --age 25 --mentor tutor\n# In chat: /switch anthropic  # Switch mid-conversation\n# In chat: /provider         # See current provider\n# Commands: /help, /switch, /clear, /stats, /quit\n\n# \ud83c\udd95 NEW v5.0: Provider Management & Configuration\nllmswap providers                    # View all providers and their status\nllmswap config set provider.models.cohere command-r-plus-08-2024\nllmswap config set provider.default anthropic\nllmswap config show\n\n# Code Generation (GitHub Copilot CLI Alternative)\nllmswap generate \"sort files by size in reverse order\"\n# Output: du -sh * | sort -hr\n\nllmswap generate \"Python function to read JSON with error handling\" --language python\n# Output: Complete Python function with try/catch blocks\n\n# Advanced Log Analysis with AI\nllmswap logs --analyze /var/log/app.log --since \"2h ago\"\nllmswap logs --request-id REQ-12345 --correlate\n\n# Code Review & Debugging\nllmswap review app.py --focus security\nllmswap debug --error \"IndexError: list index out of range\"\n```\n\n```python\n# \u274c Problem: Vendor Lock-in\nimport openai  # Locked to OpenAI forever\nclient = openai.Client(api_key=\"sk-...\")\nresponse = client.chat.completions.create(\n    model=\"gpt-4\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}]\n)\n# To switch to Claude? Rewrite everything.\n\n# \u2705 Solution: llmswap SDK - Universal Interface\nfrom llmswap import LLMClient\n\n# Works with any provider you're subscribed to\nclient = LLMClient()  # Auto-detects from env vars\nresponse = client.query(\"Hello\")\n\n# Want Claude instead? Just change provider:\nclient = LLMClient(provider=\"anthropic\")  # That's it!\n\n# Want to try Gemini? \nclient = LLMClient(provider=\"gemini\")  # Same code, different provider\n\n# Built-in cost optimization:\n# - Automatic response caching (50-90% savings)\n# - Provider cost comparison\n# - Smart provider selection based on query type\n```\n\n## \ud83c\udd95 v5.1.0: Workspace System - Real-World Scenarios\n\n### \ud83c\udfaf **Scenario 1: New Developer Learning Flask**\n\n**Problem:** Junior developer learning Flask keeps asking AI the same questions because AI forgets previous conversations.\n\n**Solution with llmswap v5.1.0:**\n```bash\ncd ~/my-first-flask-app\nllmswap workspace init --name \"Learning Flask\"\n\n# Day 1: Learn about routing\nllmswap chat --mentor professor\n\"How do Flask routes work?\"\n# AI explains. Learning auto-saved to learnings.md\n\n# Day 2: Same workspace, AI remembers!\nllmswap chat\n\"Can I use decorators for authentication?\"\n# AI response: \"Building on what you learned about routes yesterday...\"\n# No need to re-explain basics!\n\n# View your learning journey\nllmswap workspace journal\n# See: Day 1 - Routes, Day 2 - Authentication, etc.\n```\n\n**Result:** 60% faster learning because AI builds on previous knowledge instead of repeating basics.\n\n---\n\n### \ud83c\udfe2 **Scenario 2: Team Onboarding on Legacy Project**\n\n**Problem:** New team member joins 2-year-old codebase. Spends weeks understanding architecture decisions.\n\n**Solution with llmswap v5.1.0:**\n```bash\ncd ~/legacy-ecommerce-app\nllmswap workspace init\n\n# Edit context.md with project overview\nllmswap workspace context\n# Add: Tech stack, key components, known issues\n\n# Ask questions - AI has full context\nllmswap ask \"Why did we choose MongoDB over PostgreSQL?\" --mentor guru\n# AI suggests checking decisions.md\n# If documented: \"According to your decision log from 2023-05...\"\n# If not: AI helps document it now\n\nllmswap workspace decisions\n# See all past architectural decisions in one place\n```\n\n**Result:** Onboarding time reduced from 3 weeks to 1 week.\n\n---\n\n### \ud83d\udcbc **Scenario 3: Freelancer Managing Multiple Projects**\n\n**Problem:** Freelancer switches between 5 client projects daily. Context switching is exhausting.\n\n**Solution with llmswap v5.1.0:**\n```bash\n# Morning: Client A's React project\ncd ~/client-a-dashboard\nllmswap chat\n# AI loads: React patterns you learned, components built, state management decisions\n\n# Afternoon: Client B's Python API\ncd ~/client-b-api\nllmswap chat\n# AI switches context: Python best practices, API design decisions, database schema\n\n# List all projects\nllmswap workspace list\n# See: 5 workspaces, each with independent context and learnings\n\n# Each workspace has separate:\n# - Learning journal (React patterns vs Python patterns)\n# - Decision log (frontend vs backend decisions)\n# - Project context (different tech stacks)\n```\n\n**Result:** Zero mental overhead for context switching. AI handles it automatically.\n\n---\n\n### \ud83c\udf93 **Scenario 4: Learning Journey Across Technologies**\n\n**Problem:** Developer learning full-stack wants to track progress across frontend, backend, DevOps.\n\n**Solution with llmswap v5.1.0:**\n```bash\n# Frontend project\ncd ~/react-app\nllmswap workspace init --name \"React Learning\"\nllmswap chat --mentor tutor\n# Learn: Hooks, State, Components\n# All auto-tracked in learnings.md\n\n# Backend project\ncd ~/python-api\nllmswap workspace init --name \"Python API\"\nllmswap chat --mentor tutor\n# Learn: FastAPI, SQLAlchemy, Testing\n# Separate learning journal\n\n# View all learning across projects\nllmswap workspace list\n# See progress in each area\n\n# Each workspace shows:\n# - Total queries\n# - Learnings count\n# - Last accessed\n```\n\n**Result:** Complete visibility into learning journey across all technologies.\n\n---\n\n### \ud83d\ude80 **Scenario 5: Open Source Contributor**\n\n**Problem:** Contributing to 3 different OSS projects. Each has different conventions, patterns, testing approaches.\n\n**Solution with llmswap v5.1.0:**\n```bash\n# Project 1: Django\ncd ~/django-oss\nllmswap workspace init\n# Document in context.md: Coding style, PR process, testing patterns\n\n# Project 2: FastAPI\ncd ~/fastapi-oss\nllmswap workspace init\n# Different conventions, different patterns\n\n# Ask project-specific questions\ncd ~/django-oss\nllmswap ask \"How should I write tests here?\"\n# AI knows: This project uses pytest with Django TestCase\n\ncd ~/fastapi-oss\nllmswap ask \"How should I write tests here?\"\n# AI knows: This project uses pytest with async fixtures\n\n# Each workspace maintains separate:\n# - Testing patterns learned\n# - Code review feedback\n# - Architecture understanding\n```\n\n**Result:** Contribute confidently to multiple projects without mixing up conventions.\n\n---\n\n## \ud83d\udca1 Real-World Use Cases (v5.0 Features)\n\n### \ud83d\udcda **Learning & Skill Development**\n```bash\n# Junior developer learning system design\nllmswap chat --mentor professor --alias \"Dr. Smith\"\n\"Explain microservices architecture\"\n# Response adapts to teaching style with examples and deep explanations\n\n# Career switcher exploring new domains\nllmswap ask \"What is Kubernetes?\" --age 25 --audience \"beginner\"\n# Age-appropriate explanation without assuming prior DevOps knowledge\n```\n\n### \ud83d\ude80 **Professional Development**\n```bash\n# Get different perspectives on technical decisions\nllmswap ask \"Should I use MongoDB or PostgreSQL?\" --mentor guru\n# Wisdom-based response considering trade-offs and bigger picture\n\nllmswap ask \"Should I use MongoDB or PostgreSQL?\" --mentor developer\n# Practical engineering perspective with production experience\n```\n\n### \ud83d\udcbc **Team Collaboration**\n```bash\n# Explain technical concepts to non-technical stakeholders\nllmswap ask \"Explain our API architecture\" --audience \"business owner\"\n# Business-friendly explanation without jargon\n\n# Onboard new team members\nllmswap chat --mentor friend --alias \"TeamBuddy\"\n# Collaborative, approachable learning environment\n```\n\n### \ud83c\udfad **Same Question, Different Perspectives**\n\nWatch how the SAME question gets tailored responses based on your role:\n\n```bash\n# As a Developer: Implementation focus\nllmswap ask \"Explain Model Context Protocol (MCP)\" --audience developer\n\nResponse: \"MCP is a standardized protocol for connecting AI models to external \ndata sources and tools. Unlike traditional chatbots that bundle everything into \none monolithic system, MCP uses a client-server architecture:\n\n- Server: Exposes tools, resources, and prompts via standard interface\n- Client: Your AI application that consumes these capabilities\n- Transport: JSON-RPC over stdio/HTTP\n\nKey difference from older chatbots:\nOLD: Hardcoded integrations, tight coupling, monolithic deployment\nNEW: Pluggable architecture, loose coupling, independent tool servers\n\nCode example:\nfrom mcp import Server\nserver = Server(\"my-tools\")\n@server.tool()\ndef get_weather(city: str): ...\"\n\n---\n\n# As an Architect: System design focus  \nllmswap ask \"Explain Model Context Protocol (MCP)\" --audience architect\n\nResponse: \"MCP introduces a service-oriented architecture for AI systems, \naddressing key architectural concerns:\n\n**System Architecture:**\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510      \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510      \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 AI Client   \u2502\u25c4\u2500\u2500\u2500\u2500\u25ba\u2502 MCP Protocol \u2502\u25c4\u2500\u2500\u2500\u2500\u25ba\u2502 Tool Server \u2502\n\u2502 (Claude App)\u2502      \u2502  (JSON-RPC)  \u2502      \u2502 (Resources) \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518      \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518      \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n\n**Design Patterns:**\n- Service Discovery: Dynamic capability negotiation\n- Loose Coupling: Clients/servers evolve independently  \n- Extensibility: Add new tools without modifying core\n- Standardization: Uniform interface across tools\n\n**vs Traditional Chatbots:**\n- Monolithic \u2192 Microservices for AI tools\n- Static \u2192 Dynamic capability loading\n- Vendor lock-in \u2192 Provider-agnostic standard\n\n**Scalability:** Deploy tool servers independently, horizontal scaling per service\"\n\n---\n\n# As a Business Leader: ROI and strategy focus\nllmswap ask \"Explain Model Context Protocol (MCP)\" --audience \"business leader\"\n\nResponse: \"Model Context Protocol (MCP) is like moving from custom-built \nintegrations to standardized APIs - but for AI systems.\n\n**Business Impact:**\n\n1. **Reduced Integration Costs**\n   - OLD: $50K-$100K per custom AI integration\n   - NEW: Plug-and-play tools, 80% cost reduction\n   - Time to market: Weeks instead of months\n\n2. **Vendor Independence**  \n   - Not locked to one AI provider\n   - Switch between Claude, GPT-4, Gemini seamlessly\n   - Negotiating power with vendors\n\n3. **Reusable Components**\n   - Build once, use across multiple AI applications\n   - Internal tools become valuable assets\n   - Ecosystem of third-party MCP tools\n\n4. **Competitive Advantage**\n   - Deploy AI features 10x faster than competitors\n   - Respond quickly to market changes\n   - Lower total cost of ownership\n\n**vs Traditional Chatbots:** Traditional bots were closed systems requiring \ncustom development for each feature. MCP creates an open ecosystem where your \nteam (or partners) can extend capabilities without vendor dependencies.\n\n**ROI Example:** A company saved $200K in integration costs and reduced \ndeployment time from 6 months to 3 weeks using MCP architecture.\"\n```\n\n**The Power:** Same command, same AI provider, completely different responses tailored to what each role needs to know.\n\n## \u26a0\ufe0f Privacy & Usage Disclaimers\n\n**llmswap is an interface tool only** - all AI interactions and billing are handled directly by your chosen providers.\n\n### \ud83d\udd12 Context Privacy & Provider Switching\n- **No context sharing**: When switching providers mid-conversation, NO conversation history is transferred between providers\n- **Fresh start**: Each provider switch starts a completely new conversation thread\n- **Legal compliance**: This protects your privacy and complies with provider Terms of Service\n- **Your control**: You decide what each provider sees in their separate conversations\n\n### \ud83d\udcb0 Cost Information\n**Cost estimates** (`~$X.XX estimated`) are approximate based on public pricing and common tokenizers. Actual costs may differ. **You are responsible for all provider costs and billing.**\n\n**Legal Notice**: llmswap provides estimates and interface functionality for convenience only. We are not responsible for billing differences, provider charges, pricing changes, or data handling by individual providers. Always verify costs with your provider's billing dashboard.\n\n## \u26a1 Get Started in 30 Seconds\n\n### \ud83c\udf7a Homebrew (Recommended - macOS/Linux)\n```bash\n# Add our tap and install\nbrew tap llmswap/tap\nbrew install llmswap\n\n# Ready to use immediately!\nllmswap --help\n```\n\n### \ud83d\udc0d PyPI (All platforms)\n```bash\npip install llmswap\n```\n\n**Why Homebrew?** No virtualenv needed, global access, automatic dependency management, and easier updates.\n\n## \ud83d\ude80 Quick Start with Workspaces (v5.1.0)\n\n### Complete Beginner's Guide - 3 Steps:\n\n**Step 1: Install llmswap**\n```bash\npip install llmswap\n# or\nbrew install llmswap\n```\n\n**Step 2: Set up API key (one provider is enough)**\n```bash\nexport ANTHROPIC_API_KEY=\"your-key-here\"  # For Claude\n# or\nexport OPENAI_API_KEY=\"your-key-here\"     # For GPT-4\n# or any other provider\n```\n\n**Step 3: Initialize workspace in your project**\n```bash\ncd ~/my-project\nllmswap workspace init\n\n# Start chatting - AI has full project context!\nllmswap chat --mentor guru\n# Ask anything about your project\n# Learnings automatically tracked\n# Decisions automatically documented\n\n# View your learning journey\nllmswap workspace journal\n```\n\n**That's it!** Your AI mentor now remembers everything about your project. \ud83c\udf89\n\n### Without Workspace (Classic Mode)\n```bash\n# Works exactly like v5.0 - no workspace needed\nllmswap ask \"How do I deploy a Flask app?\"\nllmswap chat --mentor tutor\nllmswap generate \"Python function to read CSV\"\n```\n\n## \ud83d\udccb Quick Reference - v5.1.0 Commands\n\n### \ud83c\udd95 Workspace Commands (NEW!)\n| Command | Description | Example |\n|---------|-------------|---------|\n| `llmswap workspace init` | Initialize workspace in current directory | Creates `.llmswap/` with context, learnings, decisions |\n| `llmswap workspace init --name` | Initialize with custom project name | `llmswap workspace init --name \"My API\"` |\n| `llmswap workspace info` | Show current workspace statistics | Displays queries, learnings, decisions count |\n| `llmswap workspace list` | List all registered workspaces | Shows all projects with llmswap workspaces |\n| `llmswap workspace journal` | View learning journal | See everything you've learned |\n| `llmswap workspace decisions` | View architecture decision log | See all technical decisions |\n| `llmswap workspace context` | Edit project context | Opens context.md in default editor |\n\n### Provider & Config Commands (v5.0)\n| Command | Description | Example |\n|---------|-------------|---------|\n| `llmswap providers` | View all providers and their status | Shows configured/missing API keys |\n| `llmswap config set provider.models.<provider> <model>` | Update default model for any provider | `llmswap config set provider.models.cohere command-r-plus-08-2024` |\n| `llmswap config list` | View current configuration | Shows all settings and models |\n| `/switch` (in chat) | Switch providers mid-conversation | Privacy-compliant provider switching |\n| `/provider` (in chat) | Show current provider and available options | Quick status check |\n\n### \ud83d\udd27 First-Time Setup (v5.0.4 NEW!)\n```bash\n# First run automatically creates ~/.llmswap/config.yaml with defaults\nllmswap ask \"Hello world\"\n# Output: \ud83d\udd27 Creating config file at ~/.llmswap/config.yaml\n#         \u2705 Default configuration created\n\n# View all providers and their configuration status\nllmswap providers\n\n# Set up your API keys and start using\nexport ANTHROPIC_API_KEY=\"your-key-here\"\nllmswap ask \"Explain Docker in simple terms\"\n```\n\n**\ud83d\udca1 Smart Defaults:** llmswap comes pre-configured with sensible model defaults for all 8 providers. No configuration needed to get started!\n\n```python\nfrom llmswap import LLMClient\n\n# Works with any provider you have configured\nclient = LLMClient()  # Auto-detects from environment/config\nresponse = client.query(\"Explain quantum computing in 50 words\")\nprint(response.content)\n```\n\n## \ud83c\udfaf Why LLMSwap v5.1.0 for AI Development?\n\n| Feature | LLMSwap v5.1.0 | Claude Code | Cursor AI | Aider | LangChain | Direct APIs |\n|---------|---------|-----------|---------|-----------|-------------|-------------|\n| **Project Memory** | \u2705 Workspace system | \u274c No memory | \u274c No memory | \u274c No memory | \u274c Manual | \u274c None |\n| **Learning Journal** | \u2705 Auto-tracked | \u274c Not available | \u274c Not available | \u274c Not available | \u274c Manual | \u274c None |\n| **Context Awareness** | \u2705 Project-specific | \u274c Generic | \u274c Generic | \u274c Generic | \u274c Manual | \u274c None |\n| **AI Providers** | \u2705 8+ providers, instant switch | \u274c Claude only | \u274c Few providers | \u274c OpenAI only | \u26a0\ufe0f 50+ complex setup | \u274c 1 per codebase |\n| **Conversational Mode** | \u2705 Provider-native, all | \u2705 Claude only | \u2705 Limited | \u274c Not available | \u26a0\ufe0f Manual setup | \u274c Not available |\n| **Memory Usage** | \u2705 99% reduction | \u26a0\ufe0f Local storage | \u26a0\ufe0f Local storage | \u26a0\ufe0f Local storage | \u274c Heavy framework | \u274c Manual |\n| **Configuration** | \u2705 Git-like, shareable | \u26a0\ufe0f Basic settings | \u26a0\ufe0f Basic settings | \u26a0\ufe0f Basic settings | \u274c Complex files | \u274c None |\n| **Cost Analytics** | \u2705 Real-time tracking | \u274c No cost info | \u274c No cost info | \u274c No cost info | \u274c External tools | \u274c Manual |\n| **Provider Switching** | \u2705 Mid-conversation | \u274c Locked to Claude | \u26a0\ufe0f Limited | \u274c Locked to OpenAI | \u274c Restart required | \u274c New session |\n| **Workspace System** | \u2705 Per-project context | \u274c Not available | \u274c Not available | \u274c Not available | \u274c Not available | \u274c None |\n| **CLI Commands** | \u2705 15+ powerful tools | \u26a0\ufe0f Limited | \u274c IDE only | \u26a0\ufe0f Limited | \u274c Separate packages | \u274c None |\n| **SDK + CLI** | \u2705 Both included | \u274c CLI only | \u274c IDE only | \u274c CLI only | \u2705 SDK only | \u26a0\ufe0f SDK only |\n| **Teaching Personas** | \u2705 6 mentors | \u274c Not available | \u274c Not available | \u274c Not available | \u274c Not available | \u274c None |\n| **Open Source** | \u2705 100% MIT licensed | \u274c Proprietary | \u274c Proprietary | \u2705 Open source | \u2705 Open source | \u26a0\ufe0f Varies |\n\n**Key Differentiators for LLMSwap v5.1.0:**\n- \ud83e\udde0 **Only AI tool with persistent project memory** - Never repeat context again\n- \ud83d\udcda **Automatic learning journals** - Track your progress without manual work\n- \ud83c\udfaf **Workspace-aware mentorship** - AI understands your specific project\n- \ud83d\udd04 **Zero context switching overhead** - Change projects, AI adapts automatically\n- \ud83d\udca1 **Learning extraction** - AI summarizes key takeaways from conversations\n\n## \ud83d\ude80 Three Ways to Use LLMSwap:\n\n**\ud83d\udcda 1. Python Library/SDK**\n```python\nfrom llmswap import LLMClient\nclient = LLMClient()  # Import into any codebase\nresponse = client.query(\"Analyze this data\")\n```\n\n**\u26a1 2. CLI Tools**  \n```bash\nllmswap generate \"sort files by size\"           # GitHub Copilot alternative\nllmswap generate \"Python function to read JSON\" # Multi-language code generation\nllmswap ask \"Debug this error\"                  # Terminal AI assistant\nllmswap costs                                    # Cost optimization insights\n```\n\n**\ud83d\udcca 3. Enterprise Analytics**\n```python\nstats = client.get_usage_stats()         # Track AI spend\ncomparison = client.get_provider_comparison()  # Compare costs\n```\n\n## \ud83c\udfaf What's New in v5.1.0\n\n### \ud83c\udd95 Revolutionary Workspace & Memory Features\n- **\ud83e\udde0 Workspace System**: Per-project memory with `.llmswap/` directories (inspired by `.git/`)\n- **\ud83d\udcda Auto-Learning Journal**: AI automatically tracks what you learn in `learnings.md`\n- **\ud83d\udcd6 Architecture Decision Log**: Document technical decisions in `decisions.md`\n- **\ud83c\udfaf Context-Aware Mentorship**: AI mentor loads project context, past learnings, and decisions\n- **\ud83d\udd0d Workspace Detection**: Automatically finds `.llmswap/` in current or parent directories\n- **\ud83d\uddc2\ufe0f Project Knowledge Base**: Editable `context.md` for project-specific information\n- **\ud83d\udcca Workspace Statistics**: Track queries, learnings, and decisions per project\n- **\ud83c\udf10 Global Workspace Registry**: Manage all workspaces from `~/.llmswap/workspaces/registry.json`\n- **\ud83d\udca1 Learning Extraction**: Uses fast AI (Groq) to extract key learnings from conversations\n- **\ud83d\udd04 Workspace Switching**: Change directories, AI automatically loads different context\n\n### Teaching & Conversational Features (v5.0)\n- **\ud83c\udf93 Age-Appropriate AI**: First CLI with age-targeted explanations (`--age 10`, `--audience \"teacher\"`)\n- **\ud83e\uddd1\u200d\ud83c\udfeb Teaching Personas**: 6 AI mentors (teacher, developer, tutor, professor, mentor, buddy)\n- **\ud83d\udc64 Personalized Aliases**: Custom AI names (`--alias \"Sarah\"` for your personal tutor)\n- **\ud83d\udcac Multi-Provider Chat**: Provider-native conversational mode with mid-chat switching\n- **\ud83e\udde0 Zero Local Storage**: 99% memory reduction, all context at provider level\n- **\u2699\ufe0f Git-like Config**: Team-shareable configuration management\n- **\ud83d\udcca Session Analytics**: Real-time cost and token tracking\n\n### Provider & Model Flexibility\n- **\ud83d\udd13 Pass-Through Architecture**: Use ANY model from your provider - GPT-5, Claude Opus 4, Gemini 2.5 Pro work immediately\n- **\u26a1 Zero-Wait Updates**: New model released? Use it the same day, no llmswap update needed\n- **\ud83c\udf10 10 Providers Currently**: OpenAI, Anthropic, Gemini, Cohere, Perplexity, IBM watsonx, Groq, Ollama, **xAI (Grok)**, **Sarvam AI**\n- **\ud83c\udd95 v5.1.4**: Added xAI Grok and Sarvam AI support for cutting-edge and Indian language AI\n\n## \ud83d\ude80 Complete Feature Set\n\n### 1\ufe0f\u20e3 **Python SDK** - Multi-Provider Intelligence\n```python\nfrom llmswap import LLMClient\n\n# Auto-detects available providers\nclient = LLMClient()  \n\n# Or specify your preference\nclient = LLMClient(provider=\"anthropic\")  # Claude 3 Opus/Sonnet/Haiku\nclient = LLMClient(provider=\"openai\")     # GPT-4, GPT-3.5\nclient = LLMClient(provider=\"gemini\")     # Google Gemini Pro/Flash\nclient = LLMClient(provider=\"watsonx\")    # IBM watsonx.ai Granite\nclient = LLMClient(provider=\"ollama\")     # Llama, Mistral, Phi, 100+ local\nclient = LLMClient(provider=\"groq\")       # Groq ultra-fast inference\nclient = LLMClient(provider=\"cohere\")     # Cohere Command models for RAG\nclient = LLMClient(provider=\"perplexity\") # Perplexity web-connected AI\nclient = LLMClient(provider=\"xai\")        # xAI Grok models \ud83c\udd95\nclient = LLMClient(provider=\"sarvam\")     # Sarvam AI (Indian languages) \ud83c\udd95\n\n# Automatic failover\nclient = LLMClient(fallback=True)\nresponse = client.query(\"Hello\")  # Tries multiple providers\n\n# Save 50-90% with intelligent caching\nclient = LLMClient(cache_enabled=True)\nresponse1 = client.query(\"Expensive question\")  # $$$ API call\nresponse2 = client.query(\"Expensive question\")  # FREE from cache\n\n# \ud83c\udd95 v5.1.0: Workspace-Aware SDK (Auto-detects .llmswap/)\nfrom llmswap import LLMClient\n\n# SDK automatically detects workspace in current directory\nclient = LLMClient()  # Loads workspace context if .llmswap/ exists\n\n# Query with full project context\nresponse = client.query(\"How should I structure my API?\")\n# AI has access to: project context, past learnings, architecture decisions\n\n# Check if workspace is loaded\nif client.workspace_manager:\n    workspace_data = client.workspace_manager.load_workspace()\n    print(f\"Working in: {workspace_data['project_name']}\")\n    print(f\"Learnings tracked: {workspace_data['statistics']['learnings_count']}\")\n\n# Learnings are automatically saved after each query\n# No manual tracking needed!\n\n# \ud83c\udd95 v5.1.0: Eklavya Mentor Integration with Workspace\nfrom llmswap import LLMClient\nfrom llmswap.eklavya.mentor import EklavyaMentor\n\n# Initialize client and mentor\nclient = LLMClient(provider=\"anthropic\")\nmentor = EklavyaMentor(persona=\"guru\", alias=\"Guruji\")\n\n# Generate teaching system prompt with workspace context\nteaching_prompt = mentor.generate_system_prompt()\n\n# Use mentor for teaching-focused responses\nresponse = client.query(\n    \"Explain Python decorators\",\n    system_prompt=teaching_prompt\n)\nprint(response.content)  # Guru-style teaching response\n\n# Different personas for different learning styles\ncoach = EklavyaMentor(persona=\"coach\", alias=\"Coach Sarah\")  # Motivational\nfriend = EklavyaMentor(persona=\"friend\", alias=\"CodeBuddy\")  # Collaborative\nsocrates = EklavyaMentor(persona=\"socrates\")  # Question-based learning\n\n# \ud83c\udd95 v5.0: Conversational Sessions (Provider-Native)\nclient.start_chat_session()\nresponse = client.chat(\"Tell me about Python\")  # Context maintained\nresponse = client.chat(\"What are its best features?\")  # Remembers previous\nclient.end_chat_session()  # Clean provider-level cleanup\n\n# \ud83c\udd95 v5.0: Async Support for High Performance\nimport asyncio\nfrom llmswap import AsyncLLMClient\n\nasync def main():\n    async_client = AsyncLLMClient()\n    response = await async_client.query_async(\"Process this data\")\n    \nasyncio.run(main())\n```\n\n### 2\ufe0f\u20e3 **CLI Suite** - 15+ Powerful Terminal Commands\n\n#### \ud83c\udd95 v5.1.0: Workspace Commands\n```bash\n# Initialize workspace in current project\nllmswap workspace init\nllmswap workspace init --name \"My Flask App\"\n\n# View workspace information\nllmswap workspace info                    # Current workspace stats\nllmswap workspace list                    # All workspaces\nllmswap workspace journal                 # View learning journal\nllmswap workspace decisions               # View decision log\nllmswap workspace context                 # Edit project context\n\n# Workspace automatically detected when you run:\nllmswap chat                              # Loads workspace context\nllmswap ask \"How do I test this?\"         # Uses project-specific context\n```\n\n#### CLI Commands (All Features)\n```bash\n# \ud83c\udd95 v5.0: Conversational Chat with Provider-Native Context\nllmswap chat  # Interactive AI assistant with memory\n\n# \ud83c\udd95 v5.0: Configuration Management (Git-like)\nllmswap config set provider.default anthropic\nllmswap config export --file team-config.yaml\n\n# Generate code from natural language (GitHub Copilot alternative)\nllmswap generate \"sort files by size in reverse order\"\nllmswap generate \"Python function to read JSON file\" --language python\nllmswap generate \"find large files over 100MB\" --execute\n\n# Ask one-line questions\nllmswap ask \"How to optimize PostgreSQL queries?\"\n\n# Interactive AI chat\nllmswap chat\n\n# AI code review\nllmswap review app.py --focus security\n\n# Debug errors instantly\nllmswap debug --error \"ConnectionTimeout at line 42\"\n\n# Analyze logs with AI\nllmswap logs --analyze app.log --since \"2h ago\"\n\n# \ud83c\udd95 Web UI - Compare models side-by-side\nllmswap web  # Opens browser at http://localhost:5005\n```\n\n### \ud83c\udf10 **Web UI for Model Comparison** (v5.1.6 NEW!)\n\nCompare 20+ AI models side-by-side in a beautiful web interface with live streaming results:\n\n![LLMSwap Web UI - Model Comparison](assets/web-ui-screenshot.png)\n*Compare responses from GPT-4, Claude, Gemini, Grok, and more - see speed rankings, costs, and quality side-by-side*\n\n```bash\n# Install web UI dependencies (one-time, optional)\npip install llmswap[web]\n\n# Start local web server (opens at http://localhost:5005)\nllmswap web\n\n# Note: If you haven't installed [web] dependencies, you'll get a helpful message\n# with installation instructions. The core SDK and CLI work without it.\n\n# Custom port (if 5005 is already in use)\nllmswap web --port 8080\n\n# Allow network access (access from other devices on your network)\nllmswap web --host 0.0.0.0 --port 8080\n\n# Don't auto-open browser\nllmswap web --no-browser\n\n# Combine options\nllmswap web --port 3000 --host 0.0.0.0 --no-browser\n```\n\n**Features:**\n- \u26a1 **Live streaming results** - Cards fill in real-time as responses arrive with speed badges (\u26a1 Fastest! \ud83e\udd48 \ud83e\udd49)\n- \ud83d\udcca **Rich metrics** - Response time, tokens, tokens/sec efficiency, response length indicators (\ud83d\udcdd Brief, \ud83d\udcc4 Detailed, \ud83d\udcda Comprehensive)\n- \ud83d\udcb0 **Visual cost comparison** - Bar chart showing relative costs, FREE badges for $0 models (Ollama, Groq)\n- \ud83c\udfa8 **Markdown rendering** - Full markdown support with syntax-highlighted code blocks (Highlight.js)\n- \ud83d\udccb **Code block copy** - Individual copy buttons on each code block with hover reveal\n- \ud83d\udcbe **Smart preferences** - Remembers your favorite models via localStorage with \"Welcome back!\" messages\n- \ud83c\udfaf **Real token counts** - Uses actual API token data (not estimates) for accurate cost calculation\n- \ud83d\udd12 **Local-first** - Runs on your machine, uses your API keys, zero data leaves your system\n\n**Perfect for:**\n- **Quality comparison** - See which model gives better coding responses (Claude vs GPT-4o vs Grok)\n- **Speed testing** - Find fastest model for latency-sensitive apps (Groq vs Gemini Flash)\n- **Cost optimization** - Compare $0.0001 vs $0.0150 and decide if quality difference justifies 150x price\n- **Prompt engineering** - Test same prompt across providers to find best match\n- **Model evaluation** - Compare 20+ models simultaneously without switching tabs\n\n**What Makes It Special:**\n- Compare up to 20 models at once (9 visible by default, 12 expandable)\n- Success/failure tracking - see exactly which models succeeded vs failed\n- First-time user tips - gentle onboarding for new users\n- Better error messages - helpful setup instructions when API keys missing\n\n**Screenshot:** Compare GPT-4o, Claude Sonnet 4.5, Gemini 2.0 Flash, Grok-4, and 17 more models simultaneously. See speed badges update in real-time, cost bars visualize price differences, and code blocks with syntax highlighting.\n\n---\n\n### 3\ufe0f\u20e3 **Provider Management & Model Configuration** (v5.0.4 NEW!)\n\n**\ud83c\udfaf View All Providers and Models:**\n```bash\n# Beautiful table showing all providers, their status, and default models\nllmswap providers\n```\n\n**Output Example:**\n```\n\ud83e\udd16 llmswap Provider Status Report\n============================================================\n| Provider   | Default Model              | Status            | Issue                    |\n|============|============================|===================|==========================| \n| ANTHROPIC  | claude-3-5-sonnet-20241022 | \u2705 CONFIGURED     |                          |\n| OPENAI     | gpt-4o                     | \u274c NOT CONFIGURED | OPENAI_API_KEY missing   |\n| GEMINI     | gemini-1.5-pro             | \u2705 CONFIGURED     |                          |\n| COHERE     | command-r-plus-08-2024     | \u274c NOT CONFIGURED | COHERE_API_KEY missing   |\n| PERPLEXITY | sonar-pro                  | \u2705 CONFIGURED     |                          |\n| WATSONX    | granite-13b-chat           | \u2705 CONFIGURED     |                          |\n| GROQ       | llama-3.3-70b-versatile    | \u2705 CONFIGURED     |                          |\n| OLLAMA     | llama3.1                   | \u26a0\ufe0f NOT RUNNING   | Local server not running |\n\n\ud83d\udcca Summary: 5/8 providers available\n```\n\n**\ud83d\udd27 Model Configuration:**\n```bash\n# Update any provider's default model\nllmswap config set provider.models.openai gpt-4o-mini\nllmswap config set provider.models.cohere command-r-plus-08-2024\nllmswap config set provider.models.anthropic claude-3-5-haiku-20241022\n\n# Set default provider\nllmswap config set provider.default anthropic\n\n# View current configuration\nllmswap config list\n\n# Export/import team configurations\nllmswap config export team-config.yaml\nllmswap config import team-config.yaml --merge\n```\n\n**\ud83d\ude80 Handle Model Deprecations:**\nWhen providers deprecate models (like Cohere's `command-r-plus` \u2192 `command-r-plus-08-2024`):\n```bash\n# Simply update your config - no code changes needed!\nllmswap config set provider.models.cohere command-r-plus-08-2024\nllmswap providers  # Verify the change\n```\n\n**\u2699\ufe0f Configuration File Location:**\n- **User config:** `~/.llmswap/config.yaml` (created automatically on first run)\n- **Custom location:** Set `LLMSWAP_CONFIG_HOME` environment variable\n- **Team sharing:** Export/import YAML configs for team standardization\n\n**\ud83d\udcac Interactive Chat Commands:**\n```bash\nllmswap chat  # Start interactive conversation\n\n# Available commands in chat:\n/help      # Show all commands\n/provider  # Show current provider and available providers\n/switch    # Switch to different provider (privacy-compliant)\n/clear     # Clear conversation history\n/stats     # Show session statistics\n/quit      # Exit chat\n\n# Example session:\n[0] > Hello, I'm working on a Python project\n[anthropic] Hi! I'd be happy to help with your Python project...\n\n[1] > /switch\n\ud83d\udccb Available providers: anthropic, gemini, perplexity, watsonx, groq\nEnter provider name: gemini\n\n\ud83d\udd12 PRIVACY NOTICE: Switching to gemini\n   \u2705 NO conversation history will be shared with the new provider\n   \u2705 This protects your privacy and complies with provider Terms of Service\nContinue? (y/n): y\n\n\u2705 Switched to gemini\n\ud83d\udcac Starting fresh conversation with gemini\n```\n\n### 4\ufe0f\u20e3 **Analytics & Cost Optimization** (v4.0 NEW!)\n```bash\n# Compare provider costs before choosing\nllmswap compare --input-tokens 1000 --output-tokens 500\n# Output: Gemini $0.0005 | OpenAI $0.014 | Claude $0.011\n\n# Track your actual usage and spending\nllmswap usage --days 30 --format table\n# Shows: queries, tokens, costs by provider, response times\n\n# Get AI spend optimization recommendations\nllmswap costs\n# Suggests: Switch to Gemini, enable caching, use Ollama for dev\n```\n\n```python\n# Python SDK - Full analytics suite\nclient = LLMClient(analytics_enabled=True)\n\n# Automatic conversation memory\nresponse = client.chat(\"What is Python?\")\nresponse = client.chat(\"How is it different from Java?\")  # Remembers context\n\n# Real-time cost tracking\nstats = client.get_usage_stats()\nprint(f\"Total queries: {stats['totals']['queries']}\")\nprint(f\"Total cost: ${stats['totals']['cost']:.4f}\")\nprint(f\"Avg response time: {stats['avg_response_time_ms']}ms\")\n\n# Cost optimization insights\nanalysis = client.get_cost_breakdown()\nprint(f\"Potential savings: ${analysis['optimization_opportunities']['potential_provider_savings']:.2f}\")\nprint(f\"Recommended provider: {analysis['recommendations'][0]}\")\n\n# Compare providers for your specific use case\ncomparison = client.get_provider_comparison(input_tokens=1500, output_tokens=500)\nprint(f\"Cheapest: {comparison['cheapest']} (${comparison['cheapest_cost']:.6f})\")\nprint(f\"Savings vs current: {comparison['max_savings_percentage']:.1f}%\")\n```\n\n### 4\ufe0f\u20e3 **Advanced Features**\n\n**Async/Streaming Support**\n```python\nimport asyncio\nfrom llmswap import AsyncLLMClient\n\nasync def main():\n    client = AsyncLLMClient()\n    \n    # Async queries\n    response = await client.query(\"Explain AI\")\n    \n    # Streaming responses\n    async for chunk in client.stream(\"Write a story\"):\n        print(chunk, end=\"\")\n```\n\n**Multi-User Security**\n```python\n# Context-aware caching for multi-tenant apps\nresponse = client.query(\n    \"Get user data\",\n    cache_context={\"user_id\": \"user123\"}  # Isolated cache\n)\n```\n\n**Provider Comparison**\n```python\n# Compare responses from different models\ncomparison = client.compare_providers(\n    \"Solve this problem\",\n    providers=[\"anthropic\", \"openai\", \"gemini\"]\n)\n```\n\n## \ud83d\udcca Real-World Use Cases & Examples\n\n### \ud83c\udfe2 **Enterprise: Content Generation at Scale**\n**Netflix-style recommendation descriptions for millions of items:**\n```python\nfrom llmswap import LLMClient\n\n# Start with OpenAI, switch to Gemini for 96% cost savings\nclient = LLMClient(provider=\"gemini\", cache_enabled=True)\n\ndef generate_descriptions(items):\n    for item in items:\n        # Cached responses save 90% on similar content\n        description = client.query(\n            f\"Create engaging description for {item['title']}\",\n            cache_context={\"category\": item['category']}\n        )\n        yield description.content\n\n# Cost: $0.0005 per description vs $0.015 with OpenAI\n```\n\n### \ud83d\udc68\u200d\ud83d\udcbb **Developers: AI-Powered Code Review**\n**GitHub Copilot alternative for your team:**\n```python\n# CLI for instant code review\n$ llmswap review api_handler.py --focus security\n\n# Python SDK for CI/CD integration\nfrom llmswap import LLMClient\n\nclient = LLMClient(analytics_enabled=True)\nreview = client.query(f\"Review this PR for bugs: {pr_diff}\")\n\n# Track costs across your team\nstats = client.get_usage_stats()\nprint(f\"This month's AI costs: ${stats['totals']['cost']:.2f}\")\n```\n\n### \ud83c\udf93 **Education: AI Tutoring Platform**\n**Khan Academy-style personalized learning:**\n```python\nclient = LLMClient(provider=\"ollama\")  # Free for schools!\n\ndef ai_tutor(student_question, subject):\n    # Use watsonx for STEM, Ollama for general subjects\n    if subject in [\"math\", \"science\"]:\n        client.set_provider(\"watsonx\")\n    \n    response = client.query(\n        f\"Explain {student_question} for a {subject} student\",\n        cache_context={\"grade_level\": student.grade}\n    )\n    return response.content\n\n# Zero cost with Ollama, enterprise-grade with watsonx\n```\n\n### \ud83d\ude80 **Startups: Multi-Modal Customer Support**\n**Shopify-scale merchant assistance:**\n```python\nfrom llmswap import LLMClient\n\n# Start with Anthropic, fallback to others if rate-limited\nclient = LLMClient(fallback=True, cache_enabled=True)\n\nasync def handle_support_ticket(ticket):\n    # 90% of questions are similar - cache saves thousands\n    response = await client.aquery(\n        f\"Help with: {ticket.issue}\",\n        cache_context={\"type\": ticket.category}\n    )\n    \n    # Auto-escalate complex issues\n    if response.confidence < 0.8:\n        client.set_provider(\"anthropic\")  # Use best model\n        response = await client.aquery(ticket.issue)\n    \n    return response.content\n```\n\n### \ud83d\udcf1 **Content Creators: Writing Assistant**\n**Medium/Substack article generation:**\n```bash\n# Quick blog post ideas\nllmswap ask \"10 trending topics in AI for developers\"\n\n# Full article draft\nllmswap chat\n> Write a 1000-word article on prompt engineering\n> Make it more technical\n> Add code examples\n```\n\n### \ud83d\udd27 **DevOps Engineers: Infrastructure as Code**\n**Kubernetes and Docker automation:**\n```bash\n# Generate Kubernetes deployment\nllmswap generate \"Kubernetes deployment for React app with 3 replicas\" --save k8s-deploy.yaml\n\n# Docker multi-stage build\nllmswap generate \"Docker multi-stage build for Node.js app with Alpine\" --language dockerfile\n\n# Terraform AWS infrastructure\nllmswap generate \"Terraform script for AWS VPC with public/private subnets\" --save main.tf\n```\n\n### \ud83c\udfaf **Data Scientists: Analysis Workflows**\n**Pandas, visualization, and ML pipeline generation:**\n```bash\n# Data analysis scripts\nllmswap generate \"Pandas script to clean CSV and handle missing values\" --language python\n\n# Visualization code\nllmswap generate \"Matplotlib script for correlation heatmap\" --save plot.py\n\n# ML pipeline\nllmswap generate \"scikit-learn pipeline for text classification with TF-IDF\" --language python\n```\n\n### \ud83d\udcac **App Developers: Full Applications**\n**Complete app generation with modern frameworks:**\n```bash\n# Streamlit chatbot\nllmswap generate \"Streamlit chatbot app with session state and file upload\" --save chatbot.py\n\n# FastAPI REST API\nllmswap generate \"FastAPI app with CRUD operations for user management\" --save api.py\n\n# React component\nllmswap generate \"React component for data table with sorting and filtering\" --language javascript --save DataTable.jsx\n```\n\n### \ud83e\udd16 **AI/ML Engineers: Model Deployment**\n**Production-ready ML workflows and deployments:**\n```bash\n# LangChain RAG pipeline\nllmswap generate \"LangChain RAG system with ChromaDB and OpenAI embeddings\" --language python --save rag_pipeline.py\n\n# Hugging Face model fine-tuning\nllmswap generate \"Script to fine-tune BERT for sentiment analysis with Hugging Face\" --save finetune.py\n\n# Gradio ML demo app\nllmswap generate \"Gradio app for image classification with drag and drop\" --save demo.py\n\n# Vector database setup\nllmswap generate \"Pinecone vector database setup for semantic search\" --language python\n```\n\n### \ud83d\udd12 **Security Engineers: Vulnerability Scanning**  \n**Security automation and compliance scripts:**\n```bash\n# Security audit script\nllmswap generate \"Python script to scan for exposed API keys in codebase\" --save security_scan.py\n\n# OAuth2 implementation\nllmswap generate \"FastAPI OAuth2 with JWT tokens implementation\" --language python\n\n# Rate limiting middleware\nllmswap generate \"Redis-based rate limiting for Express.js\" --language javascript\n```\n\n### \ud83d\udee0\ufe0f **AI Agent Development: Tool Creation**\n**Build tools and functions for AI agents (inspired by Anthropic's writing tools):**\n```bash\n# Create tool functions for agents\nllmswap generate \"Python function for web scraping with BeautifulSoup error handling\" --save tools/scraper.py\n\n# Database interaction tools\nllmswap generate \"SQLAlchemy functions for CRUD operations with type hints\" --save tools/database.py\n\n# File manipulation utilities\nllmswap generate \"Python class for safe file operations with context managers\" --save tools/file_ops.py\n\n# API integration tools\nllmswap generate \"Async Python functions for parallel API calls with rate limiting\" --save tools/api_client.py\n\n# Agent orchestration\nllmswap generate \"LangChain agent with custom tools for research tasks\" --language python\n```\n\n### \ud83c\udfc6 **Hackathon Power Kit: Win Your Next Hackathon**\n**Build complete MVPs in minutes, not hours:**\n```bash\n# RAG Chatbot for Document Q&A (Most requested hackathon project)\nllmswap generate \"Complete RAG chatbot with OpenAI embeddings, Pinecone vector store, and Streamlit UI for PDF document Q&A\" --save rag_chatbot.py\n\n# Full-Stack SaaS Starter (0 to production in 5 minutes)\nllmswap generate \"Next.js 14 app with Clerk auth, Stripe payments, Prisma ORM, and PostgreSQL schema for SaaS platform\" --save saas_mvp.js\n```\n\n## \ud83d\udee0\ufe0f Installation & Setup\n\n```bash\n# Install package\npip install llmswap\n\n# Set any API key (one is enough to get started)\nexport ANTHROPIC_API_KEY=\"sk-...\"       # For Claude\nexport OPENAI_API_KEY=\"sk-...\"          # For GPT-4\nexport GEMINI_API_KEY=\"...\"             # For Google Gemini\nexport WATSONX_API_KEY=\"...\"            # For IBM watsonx\nexport WATSONX_PROJECT_ID=\"...\"         # watsonx project\nexport GROQ_API_KEY=\"gsk_...\"           # For Groq ultra-fast inference\nexport COHERE_API_KEY=\"co_...\"            # For Cohere Command models\nexport PERPLEXITY_API_KEY=\"pplx-...\"      # For Perplexity web search\n# Or run Ollama locally for 100% free usage\n```\n\n## \ud83d\udcc8 Token Usage Guidelines\n\n| Task Type | Input Tokens | Output Tokens | Estimated Cost |\n|-----------|--------------|---------------|----------------|\n| Simple Q&A | 100 | 50 | ~$0.001 |\n| Code Review | 1000 | 300 | ~$0.010 |\n| Document Analysis | 3000 | 800 | ~$0.025 |\n| Creative Writing | 500 | 2000 | ~$0.020 |\n\n## \ud83d\udd17 Quick Links\n\n- **GitHub**: [github.com/sreenathmmenon/llmswap](https://github.com/sreenathmmenon/llmswap)\n- **Documentation**: [Full API Reference](https://github.com/sreenathmmenon/llmswap#readme)\n- **PyPI**: [pypi.org/project/llmswap](https://pypi.org/project/llmswap)\n- **Issues**: [Report bugs or request features](https://github.com/sreenathmmenon/llmswap/issues)\n\n## \ud83d\ude80 Get Started in 30 Seconds\n\n```bash\n# Install\npip install llmswap\n\n# Set ANY API key (one is enough)\nexport ANTHROPIC_API_KEY=\"your-key\"  # or OpenAI, or Gemini...\n\n# Start building\nllmswap chat \"Hello!\"\n```\n\n**Or use the SDK:**\n\n```python\nfrom llmswap import LLMClient\n\n# Auto-detects available providers\nclient = LLMClient()\n\n# Chat with AI\nresponse = client.chat(\"Write a Python function to sort a list\")\nprint(response.content)\n\n# Add tool calling (v5.2.0)\nfrom llmswap import Tool\n\nweather = Tool(\n    name=\"get_weather\",\n    description=\"Get weather data\",\n    parameters={\"city\": {\"type\": \"string\"}},\n    required=[\"city\"]\n)\n\nresponse = client.chat(\"What's the weather in Tokyo?\", tools=[weather])\n```\n\n**That's it!** Automatic provider detection, failover, caching, and now tool calling - all in 10 lines.\n\n---\n\n## \ud83c\udf10 Links & Resources\n\n- **Website:** [llmswap.org](https://llmswap.org)\n- **Documentation:** [llmswap.org/docs](https://llmswap.org/docs)\n- **CLI Reference:** [llmswap.org/docs/cli.html](https://llmswap.org/docs/cli.html)\n- **SDK Guide:** [llmswap.org/docs/sdk.html](https://llmswap.org/docs/sdk.html)\n- **GitHub Repository:** [github.com/sreenathmmenon/llmswap](https://github.com/sreenathmmenon/llmswap)\n- **PyPI Package:** [pypi.org/project/llmswap](https://pypi.org/project/llmswap)\n- **Homebrew Tap:** [github.com/llmswap/homebrew-tap](https://github.com/llmswap/homebrew-tap)\n- **Issues & Support:** [github.com/sreenathmmenon/llmswap/issues](https://github.com/sreenathmmenon/llmswap/issues)\n- **Twitter/X:** [@llmswap](https://twitter.com/llmswap)\n\n---\n\n## \ud83d\udcca Why Thousands Choose llmswap\n\n- \u26a1 **12,000+ Downloads** - Trusted by developers worldwide\n- \ud83d\ude80 **v5.2.0** - Now with universal tool calling\n- \ud83d\udd13 **MIT License** - 100% open source, free forever\n- \ud83d\udc0d **Python 3.8+** - Works on all platforms\n- \ud83c\udf0d **11 Providers** - Anthropic, OpenAI, Gemini, Groq, xAI, Cohere, Perplexity, Sarvam, IBM watsonx, Ollama\n- \ud83d\udce6 **pip & Homebrew** - Install in seconds\n- \ud83c\udfaf **Production Ready** - Used in real products\n\n## Compare with Alternatives\n\n| Feature | llmswap | LiteLLM | LangChain |\n|---------|---------|---------|-----------|\n| **Setup Time** | 30 seconds | 5 minutes | 1 hour |\n| **Lines of Code** | 10 | 20 | 100+ |\n| **Tool Calling** | \u2705 Universal | \u2705 Universal | \u2705 Complex |\n| **Caching** | \u2705 Built-in | \u2705 Optional | \u274c External |\n| **Workspace Memory** | \u2705 Unique | \u274c | \u274c |\n| **CLI + SDK** | \u2705 Both | SDK only | SDK only |\n| **Learning Curve** | Easy | Medium | Hard |\n| **Best For** | Shipping fast | Gateway | Agents |\n\n**Choose llmswap when you want to ship fast without the complexity.**\n\n---\n\nBuilt with \u2764\ufe0f for developers who ship. Star us on [GitHub](https://github.com/sreenathmmenon/llmswap) if llmswap helps you build faster!\n\n**Latest:** v5.2.0 - Universal tool calling across all providers \ud83d\ude80\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Sreenath Menon\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Universal LLM SDK with Tool Calling: Enable ANY LLM to access YOUR data/APIs. Multi-provider (Anthropic, OpenAI, Gemini, Groq, xAI) with automatic format conversion. Features: universal tool calling, workspace memory, cost optimization, provider switching, zero vendor lock-in. Build AI agents, chatbots, data assistants with one SDK.",
    "version": "5.2.2",
    "project_urls": {
        "Changelog": "https://github.com/sreenathmmenon/llmswap/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/sreenathmmenon/llmswap#readme",
        "Homepage": "https://github.com/sreenathmmenon/llmswap",
        "Issues": "https://github.com/sreenathmmenon/llmswap/issues",
        "Repository": "https://github.com/sreenathmmenon/llmswap"
    },
    "split_keywords": [
        "10-providers",
        " adaptive-learning",
        " age-appropriate-ai",
        " agentic-ai",
        " agents",
        " ai",
        " ai-abstraction-layer",
        " ai-assistant",
        " ai-chat",
        " ai-chat-cli",
        " ai-cli",
        " ai-code-assistant",
        " ai-code-generation",
        " ai-code-review",
        " ai-comparison-tool",
        " ai-context-switching",
        " ai-cost-savings",
        " ai-dashboard",
        " ai-debugging",
        " ai-infrastructure",
        " ai-learning",
        " ai-logs",
        " ai-memory",
        " ai-mentor",
        " ai-pair-programming",
        " ai-persona",
        " ai-personas",
        " ai-provider-switcher",
        " ai-sdk",
        " ai-straying-prevention",
        " ai-teaching",
        " ai-testing-tool",
        " ai-tutor",
        " anthropic",
        " anthropic-sdk-alternative",
        " api-client",
        " architecture-decisions",
        " arena-validated-models",
        " bash-generator",
        " battle-tested-ai",
        " browser-ui",
        " chatgpt-alternative",
        " chromadb",
        " churn-detection",
        " claude",
        " claude-4-5",
        " claude-code-alternative",
        " claude-sonnet-4-5",
        " cli",
        " cli-ai-assistant",
        " code-completion-api",
        " code-generation",
        " code-review",
        " coding-mentor",
        " cohere",
        " command-generation",
        " command-line-ai",
        " comparison-dashboard",
        " context-aware-ai",
        " contextual-ai",
        " continue-dev-alternative",
        " contract-analysis",
        " conversational-ai",
        " conversational-cli",
        " copilot-alternative",
        " copilot-cli",
        " copilot-cli-alternative",
        " copilot-replacement",
        " cost-analytics",
        " cost-comparison",
        " cost-optimization",
        " cost-savings",
        " cross-provider-cli",
        " cursor-alternative",
        " custom-ai-personas",
        " customer-support",
        " debugging",
        " developer-ai-tools",
        " developer-tools",
        " document-qa",
        " due-diligence",
        " dynamic-provider-switching",
        " editor-integration",
        " educational-ai",
        " eklavya",
        " embeddings",
        " enterprise",
        " enterprise-ai",
        " fast-inference",
        " fastapi",
        " financial-analysis",
        " flask-ui",
        " function-calling",
        " gemini",
        " gemini-cli-alternative",
        " gemini-sdk-alternative",
        " github-copilot-alternative",
        " gpt-4",
        " granite",
        " grok-4",
        " grok-4-0709",
        " grok-4-fast",
        " groq",
        " groq-inference",
        " hackathon",
        " hackathon-starter",
        " ibm-watson",
        " ibm-watsonx",
        " indian-language-ai",
        " intelligent-routing",
        " langchain",
        " langchain-alternative",
        " leaderboard-models",
        " learning-journal",
        " library-and-cli",
        " litellm-alternative",
        " llama",
        " llm",
        " llm-abstraction",
        " llm-api",
        " llm-benchmarking",
        " llm-cli-interface",
        " llm-comparison",
        " llm-evaluation",
        " llm-gateway",
        " llm-gateway-routing",
        " llm-routing",
        " llm-sdk",
        " llm-switching",
        " llm-tools",
        " lmarena",
        " lmarena-tested-models",
        " log-analysis",
        " m&a",
        " mistral",
        " model-comparison",
        " model-evaluation",
        " model-testing",
        " multi-llm",
        " multi-llm-cli",
        " multi-llm-copilot",
        " multi-modal-ai",
        " multi-model-ai",
        " multi-model-testing",
        " multi-provider-chat",
        " multi-provider-cli",
        " multi-provider-routing",
        " multi-provider-sdk",
        " multi-provider-tools",
        " multilingual-ai",
        " multiple-contexts",
        " natural-language-to-code",
        " no-vendor-lock-in",
        " ollama",
        " open-source-copilot",
        " openai",
        " openai-alternative-sdk",
        " openai-cli-alternative",
        " pdf-qa",
        " perplexity",
        " persistent-context",
        " persona-rotation",
        " personalized-ai",
        " pinecone",
        " production-validated-llm",
        " project-context",
        " project-knowledge-base",
        " project-memory",
        " prompt-testing",
        " provider-agnostic-cli",
        " provider-agnostic-sdk",
        " provider-fallback",
        " provider-health-check",
        " provider-switching",
        " provider-verification",
        " python-generator",
        " python-sdk",
        " python-sdk-cli",
        " quality-comparison",
        " rag",
        " response-caching",
        " response-comparison",
        " retrieval-augmented-generation",
        " sarvam-ai",
        " sdk",
        " sdk-and-cli",
        " second-brain",
        " self-hosted-ai",
        " session-management",
        " shell-integration",
        " side-by-side-comparison",
        " sonnet-4-5",
        " sonnet-4.5",
        " speed-comparison",
        " streamlit",
        " support-triage",
        " teaching-assistant",
        " terminal-ai",
        " terminal-ai-chat",
        " terminal-assistant",
        " text-to-code",
        " token-tracking",
        " tool-calling",
        " top-rated-models",
        " universal-ai-cli",
        " universal-ai-sdk",
        " universal-tool-calling",
        " usage-analytics",
        " vector-database",
        " vendor-agnostic",
        " vim-integration",
        " vim-plugin",
        " visual-comparison",
        " watson-ai",
        " watsonx",
        " web-interface",
        " web-ui",
        " workspace-ai",
        " workspace-system",
        " xai-grok"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "62ff986c69ce8ef51436efa6cea9476b33da7a346a47e58bc3e4f6fe58d4678d",
                "md5": "270f8883e12a33384340acd717a7049b",
                "sha256": "aaa92126dc695e079a17a58be6a2c6fb593441142b328e0098d0682644a92605"
            },
            "downloads": -1,
            "filename": "llmswap-5.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "270f8883e12a33384340acd717a7049b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 138979,
            "upload_time": "2025-10-19T09:03:07",
            "upload_time_iso_8601": "2025-10-19T09:03:07.179750Z",
            "url": "https://files.pythonhosted.org/packages/62/ff/986c69ce8ef51436efa6cea9476b33da7a346a47e58bc3e4f6fe58d4678d/llmswap-5.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3bd20f241ed41732020510eb13c33510caeb663b42de9756b31cf40e15d1452c",
                "md5": "58155c3e4478754136ebc0d57855a4ff",
                "sha256": "1ab32c41b9a8149e75e67042b3b61e7323030acbeb6ba03a9d47225919477e39"
            },
            "downloads": -1,
            "filename": "llmswap-5.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "58155c3e4478754136ebc0d57855a4ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 181990,
            "upload_time": "2025-10-19T09:03:11",
            "upload_time_iso_8601": "2025-10-19T09:03:11.908201Z",
            "url": "https://files.pythonhosted.org/packages/3b/d2/0f241ed41732020510eb13c33510caeb663b42de9756b31cf40e15d1452c/llmswap-5.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-19 09:03:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sreenathmmenon",
    "github_project": "llmswap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "llmswap"
}
        
Elapsed time: 1.41675s