Documentation

Complete documentation for llmswap - the universal AI CLI.


Overview

llmswap is a universal AI CLI and Python SDK that provides a single interface to 8 different AI providers:

  • OpenAI (GPT-4, GPT-3.5)
  • Anthropic (Claude 3.5)
  • Google (Gemini)
  • IBM Watson
  • Groq
  • Cohere
  • Perplexity
  • Ollama (Local)

Key Features

  • One Interface: Same commands work with any provider
  • No Vendor Lock-in: Switch providers instantly
  • Conversation Memory: AI remembers your chat history
  • Cost Optimization: Compare costs and save 90%
  • Local Models: Run privately with Ollama
  • Enterprise Ready: Configuration, security, analytics

Quick Start

# Install
pip install llmswap

# Configure (choose one)
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."

# Use
llmswap chat

Architecture

┌─────────────────┐
│   Your App      │
└─────────┬───────┘
          │
┌─────────▼───────┐    ┌──────────────┐
│    llmswap      │◄───┤ 8 Providers  │
│                 │    │ OpenAI       │
│ • CLI Commands  │    │ Claude       │
│ • Python SDK    │    │ Gemini       │
│ • Cost Tracking │    │ Watson       │
│ • Analytics     │    │ Groq         │
└─────────────────┘    │ Cohere       │
                       │ Perplexity   │
                       │ Ollama       │
                       └──────────────┘

Documentation Sections

Getting Started

CLI Reference

Provider Setup

Python SDK

FAQ

How is this different from OpenAI’s library?

llmswap provides a unified interface across 8 providers, while OpenAI’s library only works with OpenAI. You can switch providers without changing your code.

Do I need API keys for all providers?

No! You only need one provider configured to start. llmswap auto-detects available providers and can fall back between them.

Is it free?

llmswap itself is free and open source. You pay only for the AI provider APIs you use, often at 90% less cost than subscriptions.

Can I use it offline?

Yes! Use Ollama to run models completely offline and privately on your own machine.

Is it production ready?

Absolutely. llmswap includes enterprise features like configuration management, cost tracking, error handling, and analytics.

Support


Ready to get started? Head to our Getting Started Guide!


Table of contents


Copyright © 2025 llmswap. Distributed under the MIT license.