A CLI tool that provides Claude Code-like capabilities but with the flexibility to switch between different LLM models (Claude, GPT, Gemini). This tool will be publishable as a package for others to easily install and use.
- CLI Interface - Command parsing, user interaction
- Model Manager - Handles model selection and API integration
- Context Manager - Maintains conversation history
- Tool Framework - Integrates system tools for file operations, web access, etc.
- Output Formatter - Renders responses appropriately for terminal
- Abstract adapter pattern for different LLM APIs
- Standardized prompt formatting across models
- Configuration system for API keys and preferences
- Capability detection for model-specific features
# Set default model
$ llm config set-default-model gemini-2.5-pro
# Use specific model for current session
$ llm --model gpt-o1
$ llm config add-api-key claude CLAUDE_API_KEY
$ llm config add-api-key openai OPENAI_API_KEY
$ llm config add-api-key google GOOGLE_API_KEY
- Persistent conversations with model switching
- Ability to export/import sessions
- Session isolation for different projects
- Context management with
/compactcommand:- Warns when approaching token limits (e.g., Gemini 2.5 Pro's 1M context)
- Generates conversation summary on demand
- Carries summary forward to new context window
- Allows for theoretically infinite conversation length
- Handle token limits per model
- Account for different capabilities (code generation, tools, etc.)
- Normalize response formats for consistent UX
- Model-specific Tool Implementation - Hardcode specific tool sets for OpenAI and Gemini initially
- Secure storage of API keys
- Support for organization accounts and custom endpoints
- Streaming responses for all models
- Local caching of contexts to minimize token usage
- Efficient file handling for large codebases
- Start with basic CLI framework (Click, Typer, or similar)
- Implement Gemini 2.5 Pro integration first:
- Basic conversation capability
- Token tracking and context management
/compactcommand implementation
- Add basic file operations and tool integration
- Expand to OpenAI models
- Enhance with advanced tools (search, web access)
- Package for distribution (PyPI/npm)
- Create documentation and examples
- Refine UX based on user feedback
- Publish to package managers (PyPI for Python, npm for Node.js)
- Create easy installation process (
pip install llm-cliornpm install -g llm-cli) - Version management and release cycle
- Interactive configuration on first run
- API key setup wizard
- Default model selection
- Quick tutorial/example workflow
- How to handle tool capabilities that differ between models?
- What's the best local storage approach for conversation history?
- How to implement efficient codebase indexing for context?
- Should we support plugins/extensions for custom tools?