Skip to main content

A powerful AI assistant for your terminal

Project description

🤖 Goobits TTT

Professional command-line interface and Python library for interacting with multiple AI providers including OpenRouter, OpenAI, Anthropic, Google, and local models via Ollama.

✨ Key Features

  • 🎯 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!

🚀 Quick Start

# 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"

📚 Python Library

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 context

🛠️ Tools & Function Calling

from 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])

⚙️ Configuration

# 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

📖 Documentation

🔗 Related Projects

🧪 Development

# 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/

📝 License

MIT License - see LICENSE for details

💡 Support

  • Documentation in docs/
  • Examples in examples/
  • Report issues on GitHub

Project details


Download files

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

Source Distribution

goobits_ttt-1.0.3.tar.gz (136.8 kB view details)

Uploaded Source

Built Distribution

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

goobits_ttt-1.0.3-py3-none-any.whl (109.6 kB view details)

Uploaded Python 3

File details

Details for the file goobits_ttt-1.0.3.tar.gz.

File metadata

  • Download URL: goobits_ttt-1.0.3.tar.gz
  • Upload date:
  • Size: 136.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for goobits_ttt-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6cac9a72021da991a75642cca87481b398fa232cb74fb5e16db59746b1c39dbb
MD5 08e491945318d06875a374cda35eacce
BLAKE2b-256 3941b33c499e93d0f0192323e7a192872bc9b779e2c8ed3f41848bb72ad48dd5

See more details on using hashes here.

File details

Details for the file goobits_ttt-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: goobits_ttt-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 109.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for goobits_ttt-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b779b5c0d4269afb8071e1568767331b518b77090a21873de4ae67dee55ca9e0
MD5 dec2c3d3738defb9507a5e373b559531
BLAKE2b-256 d44a1ef1bf7f867bcdd527c8d8ab13ca3962aee481d633de4aa61391ca1009e8

See more details on using hashes here.

Supported by

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