Installation
Prerequisites
- Python 3.12+
- uv (recommended) or pip
Setup
pip install pytifex
# Set an API key for your chosen LLM provider (see below)
export GEMINI_API_KEY=your_gemini_api_key
# Optional — higher GitHub API rate limits
export GITHUB_TOKEN=ghp_your_github_token
# Run Pytifex
uv run pytifexThe type checkers (mypy, pyrefly, zuban, ty) are automatically installed by uv when you run the tool.
Environment Variables
| Variable | Required | Description |
|---|---|---|
GEMINI_API_KEY |
For Gemini models | Google Gemini API key |
OPENAI_API_KEY |
For OpenAI API | OpenAI API key (not needed for local servers) |
COHERE_API_KEY |
For Cohere models | Cohere API key (also accepted as CO_API_KEY) |
GITHUB_TOKEN |
No | GitHub token for higher API rate limits (60 → 5,000 req/hour) |
At least one LLM provider key is required unless you are using a local model server, in which case no key is needed.
LLM Provider Setup
Google Gemini (default)
Get a free API key at aistudio.google.com/apikey.
export GEMINI_API_KEY=your_key
uv run pytifexOpenAI
export OPENAI_API_KEY=your_key
uv run pytifex --model gpt-4o --openai-base-url https://api.openai.com/v1Local model (llama-server, Ollama, vLLM)
No API key needed. Start your server, then point Pytifex at it:
# Example: llama.cpp llama-server
# llama-server -m qwen3-6b.gguf --port 8080
uv run pytifex --model qwen3-6b --openai-base-url http://localhost:8080/v1Any server exposing a /v1/chat/completions endpoint is compatible.
Cohere
export COHERE_API_KEY=your_key
uv run pytifex --model command-a-03-2025