Professional command-line interface and Python library for interacting with multiple AI providers including OpenRouter, OpenAI, Anthropic, Google, and local models via Ollama.
- 🎯 Simple CLI - Just
ttt "your question"- works instantly - 🔧 Function Calling - AI can call your Python functions and tools
- 🌐 Multi-Provider - OpenRouter (100+ models), OpenAI, Anthropic, Google
- 🤖 Local Support - Ollama integration for privacy
- ⚡ Fast Setup - One-command installation
- 🔄 Direct Pipe Support -
echo "text" | ttt- no dash needed!
# Install
./setup.sh install # For end users
./setup.sh install --dev # For developers
# Set API key (choose one)
export OPENAI_API_KEY=sk-your-key-here
export OPENROUTER_API_KEY=sk-or-your-key-here
# Or add to .env file
# Start using
ttt "What is Python?"
echo "print('Hello world')" | ttt "Explain this code"
echo "Hello world" | ttt
# Use tools
ttt "What time is it in Tokyo?" --tools "get_current_time"
ttt "Search for Python tutorials" --tools "web_search"from ttt import ask, stream, chat
# Simple question
response = ask("What is Python?")
print(response)
# Streaming
for chunk in stream("Tell me a story"):
print(chunk, end="", flush=True)
# Chat sessions
with chat() as session:
response1 = session.ask("My name is Alice")
response2 = session.ask("What's my name?") # Remembers contextfrom ttt import ask
from ttt.tools import tool
# Use built-in tools
response = ask(
"Search for Python tutorials and save results",
tools=["web_search", "write_file"]
)
# Create custom tools
@tool
def get_weather(city: str) -> str:
"""Get weather for a city."""
return f"Weather in {city}: Sunny, 72°F"
response = ask("What's the weather in NYC?", tools=[get_weather])# View settings
ttt config list
# Set configuration
ttt config set models.default gpt-4
ttt config set api.openai_key sk-...
# Use model aliases
ttt -m @fast "Quick question" # gpt-3.5-turbo
ttt -m @best "Complex analysis" # gpt-4
ttt -m @claude "Explain this" # claude-3-sonnet- Configuration Guide - API keys, models, settings
- Development Guide - Setup, testing, contributing
- API Reference - Python API documentation
- Architecture - System design and internals
- Extensibility - Plugins and customization
- Examples - Code examples and tutorials
- Matilda - AI assistant
- Goobits STT - Speech-to-Text
- Goobits TTS - Text-to-Speech
# Setup development environment
./setup.sh install --dev
# Run tests
./test.sh # Unit tests (fast, free)
./test.sh integration # Integration tests (requires API keys)
# Code quality
ruff format src/ttt/ tests/
ruff check src/ttt/ tests/
mypy src/ttt/MIT License - see LICENSE for details
- Documentation in
docs/ - Examples in
examples/ - Report issues on GitHub