Skip to main content
 ██╗  ██╗██╗  ██╗   ██╗██████╗  ██████╗
 ██║ ██╔╝██║  ╚██╗ ██╔╝██╔══██╗██╔═══██╗
 █████╔╝ ██║   ╚████╔╝ ██████╔╝██║   ██║
 ██╔═██╗ ██║    ╚██╔╝  ██╔══██╗██║   ██║
 ██║  ██╗███████╗██║   ██║  ██║╚██████╔╝
 ╚═╝  ╚═╝╚══════╝╚═╝   ╚═╝  ╚═╝ ╚═════╝

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

Optional features are installed explicitly:

pip install "klyro[voice]"       # microphone transcription
pip install "klyro[tui]"         # experimental full terminal UI
pip install "klyro[playwright]"  # browser automation
# 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                              → list current provider's models
/model search coder                 → search current provider
/model openrouter/deepseek/deepseek-r1:free
/model ollama/qwen2.5-coder:latest

🧠 Supported Models

Klyro discovers models from the provider currently in use instead of shipping a fixed model catalogue:

  • OpenRouter: models allowed by the authenticated account's preferences, privacy settings, and guardrails.
  • Ollama: models installed on the local machine.
  • Other providers: current text/chat models registered by LiteLLM.

Run /model to see the current provider's models, then switch with the exact identifier shown. Optional personal aliases can be configured with --alias.


💬 Slash Commands

Klyro provides 43 built-in slash commands to manage your files, models, git repository, and session:

📁 File & Context Management

Command Description
/add <file> Add one or more files to the chat context so the AI can read and edit them
/drop <file> Remove files from the active chat context to free up tokens
/read-only <file> Add files as read-only (AI can reference them but won't modify them)
/ls List all files in your project and indicate which are added to the chat
/clear Clear the conversation history to start fresh
/reset Drop all files and clear chat history to start completely fresh
/tokens Report token counts and how much context window is left
/diff Show a diff of all local changes made in the active session
/map Print out the current repository map (symbols, functions, files structure)
/map-refresh Force a manual refresh of the repository map
/context Enter context mode to view surrounding code context

🛠️ Coding, Testing & Shell

Command Description
/code [prompt] Switch to code editing mode (or run a one-off code edit prompt)
/ask [prompt] Switch to question/explain mode (or ask a one-off question without editing files)
/architect [prompt] Switch to planning mode to design changes using two different models
/chat-mode <mode> Switch the active chat mode (code, ask, architect, or context)
/ok Shortcut for /code Ok, please go ahead and make those changes.
/run <cmd> Run a shell command and optionally add its output to the chat
/test <cmd> Run a test command and feed any errors/failures back to the AI for fixes
/lint Run linter/fixer on all in-chat or dirty files
/editor Open your configured external terminal editor (like vim or nano) to write a prompt

🧠 Model Configuration

Command Description
/model [name] With no name, list models available from the current provider; with a name, switch the main LLM
/model search <query> Search models available from the current provider
/editor-model <name> Switch the model used specifically for writing file edits
/weak-model <name> Switch the model used for minor background tasks (e.g. summaries)
/reasoning-effort <l/m/h> Set the reasoning depth (low, medium, high) for reasoning models
/think-tokens <limit> Set the maximum thinking token budget for reasoning models (0 to disable)

🐙 Git Integration

Command Description
/git <command> Run any git command directly from the session
/commit [message] Commit any unsaved edits made outside of Klyro
/undo Undo/revert the last git commit made by Klyro

🎙️ Session & Input Helpers

Command Description
/multiline-mode Toggle multiline mode (swaps Enter and Alt+Enter behavior)
/paste Paste text or clipboard images into the chat session
/copy Copy the last assistant response to your clipboard
/copy-context Copy the entire active chat context as Markdown
/voice Speak your prompt using your microphone (dictation)
/web <url> Scrape a webpage, convert it to Markdown, and add it to the chat
/export [file] Export your full chat session history to a Markdown file
/stats Show model details, last message cost, and total session cost
/help <question> Ask interactive help questions about using Klyro
/settings Print out all active settings and config parameters
/load <file> Load and execute a list of Klyro commands from a text file
/save <file> Save active files list as a set of /add commands to reconstruct session
/report Report a problem by opening a GitHub Issue
/exit Exit the Klyro application

⌨️ Keyboard Shortcuts

Klyro provides Emacs-style keybindings for prompt editing and history navigation:

Prompt Editing & Navigation

  • Ctrl + A : Move cursor to the start of the line.
  • Ctrl + E : Move cursor to the end of the line.
  • Ctrl + B : Move cursor back one character.
  • Ctrl + F : Move cursor forward one character.
  • Ctrl + D : Delete the character under the cursor.
  • Ctrl + K : Cut/delete from the cursor to the end of the line.
  • Ctrl + Y : Paste (yank) text that was previously cut.
  • Ctrl + L : Clear the terminal screen.

History Navigation

  • Ctrl + R : Search backwards through your sent message history.
  • Ctrl + P / Ctrl + Up : Scroll back to previous history entries.
  • Ctrl + N / Ctrl + Down : Scroll forward to next history entries.
  • Up Arrow : Move cursor up one line inside a multiline message.
  • Down Arrow : Move cursor down one line inside a multiline message.

Multiline & Cancellation

  • Alt + Enter (or Ctrl + J) : Submit message in multiline mode.
  • { on a line by itself : Start a bracket-based multiline prompt.
  • } on a line by itself : Submit a bracket-based multiline prompt.
  • Ctrl + C : Abort the current prompt or cancel an interactive question (returns to prompt).

⚙️ 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 vX.Y.Z
git push origin vX.Y.Z

Publishing is gated by tests, package validation, and a clean wheel install/startup/uninstall smoke test.

See CHANGELOG.md for full version history.


📄 License

Apache License 2.0 — see LICENSE for details.


Made with ❤️ · PyPI · GitHub · Changelog

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.8.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.8-py3-none-any.whl (394.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for klyro-1.0.8.tar.gz
Algorithm Hash digest
SHA256 6f20dbfb9b3d3ead889336e9b2f56dcf9ed01e11ab7fbf2c3fa3150a83a1b8c4
MD5 825c3dd1a25506327413877bb6575857
BLAKE2b-256 35283450a61e895e6bde5433c863ce3699c8dbdafc8f8c4b0cb00ac129723c33

See more details on using hashes here.

Provenance

The following attestation bundles were made for klyro-1.0.8.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.8-py3-none-any.whl.

File metadata

  • Download URL: klyro-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 394.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for klyro-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3c5991df6f2ca12a640848e819041d4e25258867c743acd3e1ae4237fdeca222
MD5 2e5828b4137ff0b90e6b71ff9e963b70
BLAKE2b-256 2ef0f67b1287b7ae8fc2c8c12e7dd41f64c36fcf2f9b6ad2cc136085274ad7da

See more details on using hashes here.

Provenance

The following attestation bundles were made for klyro-1.0.8-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.

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page