Skip to main content

Klyro is AI pair programming in your terminal

Project description

 ██╗  ██╗██╗  ██╗   ██╗██████╗  ██████╗
 ██║ ██╔╝██║  ╚██╗ ██╔╝██╔══██╗██╔═══██╗
 █████╔╝ ██║   ╚████╔╝ ██████╔╝██║   ██║
 ██╔═██╗ ██║    ╚██╔╝  ██╔══██╗██║   ██║
 ██║  ██╗███████╗██║   ██║  ██║╚██████╔╝
 ╚═╝  ╚═╝╚══════╝╚═╝   ╚═╝  ╚═╝ ╚═════╝

AI pair programming in your terminal.

PyPI version Python License Version Changelog


Klyro talks to your code. You talk to Klyro.
Works with GPT-4o, Claude, Gemini, DeepSeek, Ollama, Grok, Groq, Mistral — and 100+ more.


Quick Start · Features · Models · Commands · Config · Changelog


⚡ Quick Start

pip install klyro
# Run with your API key set
klyro

# Or specify a model directly
klyro --model gpt-4o
klyro --model ollama/llama3.2
klyro --model gemini/gemini-2.5-flash

Windows: If klyro is not recognized, either run python -m klyro or add your Scripts folder to PATH:

python -c "import sysconfig; print(sysconfig.get_path('scripts', 'nt_user'))"

Install from source:

git clone https://github.com/RavindraTirlangi/Klyro.git
cd Klyro
pip install -e .

✨ Features

🤖 Smart Model Detection

Auto-detects your environment at startup:

  • Local Ollama running? Uses it instantly — no API key needed
  • Cloud keys set? Picks the best available model
  • Nothing configured? Guides you through OpenRouter setup (free tier available)

🗺️ Repository Intelligence

Understands your entire codebase:

  • Builds a repo map using tree-sitter AST analysis
  • Identifies relevant files automatically
  • Manages context to stay within token limits

✏️ Precise Code Editing

Applies changes surgically:

  • Whole-file and diff-based editing modes
  • Auto-lints after every edit and feeds errors back
  • Built-in git integration with descriptive auto-commits

🔀 Model Switching On-the-Fly

Switch any time without restarting:

/model flash        → Gemini 2.5 Flash
/model r1           → DeepSeek R1
/model groq-llama   → Groq (ultra-fast)
/model list         → see all options

🧠 Supported Models

Switch models inside Klyro using /model <alias>:

ProviderAliasModel
Anthropicclaude / sonnetclaude-sonnet-4-6 ⭐ latest
opusclaude-opus-4-7 — most capable
haikuclaude-haiku-4-5 — fastest
OpenAI4ogpt-4o ⭐ recommended
4o-minigpt-4o-mini — cheapest
o1 / o3-minireasoning models
Googlegeminigemini-2.5-pro ⭐ recommended
flashgemini-2.5-flash — fast & cheap
flash-litegemini-2.5-flash-lite
DeepSeekdeepseekdeepseek-chat (v3)
r1deepseek-reasoner — best reasoning
Mistralmistralmistral-large-latest
codestralcodestral-latest — code specialist
pixtralpixtral-large — vision
Ollama (local)llama / llama3.2ollama/llama3.2 — no API key
qwenollama/qwen2.5-coder
phi4ollama/phi4
devstralollama/devstral — code expert
xAIgrok / grok3xai/grok-3-beta
grok3-minixai/grok-3-mini-beta
Groqgroq-llamallama-3.3-70b-versatile — ultra-fast
groq-mixtralmixtral-8x7b-32768
groq-gemmagemma2-9b-it
OpenRouter (free)llama-freellama-3.1-8b-instruct:free
deepseek-freedeepseek-r1-0528:free
gemma-freegemma-3-27b-it:free
qwen-freeqwen3-235b-a22b:free
AWS Bedrockbedrock-claudeanthropic.claude-3-5-sonnet-v2
Azure OpenAIazure-gpt4oazure/gpt-4o
Coherecommandcohere/command-r-plus

Run /model list inside Klyro to see all 90+ aliases.


💬 Slash Commands

Command Description
/model [name] Switch model mid-session — /model list to browse all providers
/stats Show current model, last message cost, and total session cost
/web <url> Scrape a webpage and add its content to the chat
/export [file] Export full chat history to a Markdown file
/add <file> Add a file to the chat context
/drop <file> Remove a file from the chat context
/diff Show the diff of changes made in this session
/undo Undo the last AI commit
/tokens Report token usage for current context
/git <cmd> Run any git command
/run <cmd> Run a shell command and add output to chat
/clear Clear the chat history
/help Show all available commands

⚙️ Configuration

Create .klyro.conf.yml in your project root:

model: ollama/llama3.2   # default model
dark-mode: true
auto-commits: true

Or use environment variables:

# Cloud providers
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
export GEMINI_API_KEY=...
export DEEPSEEK_API_KEY=...
export MISTRAL_API_KEY=...
export XAI_API_KEY=...
export GROQ_API_KEY=...
export OPENROUTER_API_KEY=sk-or-...

# Local
export OLLAMA_API_BASE=http://localhost:11434

📦 Release

Tagged releases automatically publish to PyPI via GitHub Actions:

git tag v1.0.3
git push origin v1.0.3

See CHANGELOG.md for full version history.


📄 License

Apache License 2.0 — see LICENSE for details.


Made with ❤️ · PyPI · GitHub · Changelog

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

klyro-1.0.4.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

klyro-1.0.4-py3-none-any.whl (386.3 kB view details)

Uploaded Python 3

File details

Details for the file klyro-1.0.4.tar.gz.

File metadata

  • Download URL: klyro-1.0.4.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for klyro-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d41d94ed7d0a00bb9628d8538fff41a79b9ae6662e9f496ce46cbb53adf46112
MD5 8d89a62fdb36020ebb05403fe618e95a
BLAKE2b-256 6d6f2efcbf01eae7ee3e0b97293615bb4c04ef0c90015e07e895b170431ebb90

See more details on using hashes here.

Provenance

The following attestation bundles were made for klyro-1.0.4.tar.gz:

Publisher: publish.yml on RavindraTirlangi/Klyro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file klyro-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: klyro-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 386.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for klyro-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cc0353766f58271c1315574b6edb40c631b15b7c30a7def012fb27eab805f1b6
MD5 852aee3ccd59b8ad24cecb415b3135f0
BLAKE2b-256 d6879761c11906e6d572d7c982ea4cac9f966027df8cf3c7871247358843f6b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for klyro-1.0.4-py3-none-any.whl:

Publisher: publish.yml on RavindraTirlangi/Klyro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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