Klyro is AI pair programming in your terminal
Project description
Klyro
AI pair programming in your terminal.
Klyro lets you pair program with LLMs directly from your terminal. Start a new project or work on your existing codebase with an AI that can read, understand, and edit your code.
Quick Install
python -m pip install klyro
If Windows says klyro is not recognized after installation, run it with:
python -m klyro
Or add your Python user Scripts folder to PATH. To find it, run:
python -c "import sysconfig; print(sysconfig.get_path('scripts', 'nt_user'))"
Then add that path to your Windows user PATH environment variable, e.g.:
C:\Users\<YourName>\AppData\Roaming\Python\Python3XX\Scripts
Install from source:
git clone https://github.com/RavindraTirlangi/Klyro.git
cd Klyro
python -m pip install -e .
Usage
# Start Klyro in your project directory
klyro
# Use a specific model
klyro --model gpt-4o
# Use a local Ollama model
klyro --model ollama/llama3.2
Features
Smart Model Detection
Klyro auto-detects your environment:
- Local Ollama running? Uses it automatically with no API key needed.
- Cloud API keys set? Picks the best available model.
- No keys at all? Offers OpenRouter setup.
Slash Commands
| Command | Description |
|---|---|
/model [name] |
Switch LLM model mid-session (e.g. /model gpt-4o, /model ollama/llama3.2). Run without args to see current model and examples. |
/stats |
Show model name, last message cost, and total session cost |
/web <url> |
Fetch a web page and add its content to the chat context |
/export [filename] |
Export chat history to a markdown file |
/tokens |
Report token usage for the current chat context |
/add <file> |
Add a file to the chat |
/drop <file> |
Remove a file from the chat |
/diff |
Show the diff of changes made |
/undo |
Undo the last change |
/help |
Show all available commands |
Code Editing
- Whole-file and diff-based editing modes
- Automatic linting after every edit
- Built-in git integration with auto-commits
Repository Intelligence
- Builds a repo map using tree-sitter AST analysis
- Understands your codebase structure and relationships
- Manages context to stay within token limits
Configuration
Create a .klyro.conf.yml in your project root:
model: ollama/llama3.2
dark-mode: true
auto-commits: true
Or use environment variables:
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
export OLLAMA_API_BASE=http://localhost:11434
Publishing
This project uses GitHub Actions for automated PyPI publishing (using setuptools_scm for dynamic versioning based on git tags). To release version 0.1.0 (or any other version), simply create and push a tag:
git tag v0.1.0
git push origin v0.1.0
The workflow will automatically build the package (e.g., klyro-0.1.0) and attempt to publish it to PyPI.
(Note: To successfully publish to PyPI, you must first configure PyPI Trusted Publishing for this GitHub repository.)
License
Apache License 2.0. See LICENSE for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file klyro-1.0.2.tar.gz.
File metadata
- Download URL: klyro-1.0.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebead9efbac2bff6a86d27989a8549dacd88dd4690603596a81182cb0ca2c686
|
|
| MD5 |
0d806407448fa7f6e3ae9c6ee13b0064
|
|
| BLAKE2b-256 |
60d617ba5143d705cf16a93c79185b43df8bff5b9fd29dbd3b42dc44fa39f5ea
|
Provenance
The following attestation bundles were made for klyro-1.0.2.tar.gz:
Publisher:
publish.yml on RavindraTirlangi/Klyro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
klyro-1.0.2.tar.gz -
Subject digest:
ebead9efbac2bff6a86d27989a8549dacd88dd4690603596a81182cb0ca2c686 - Sigstore transparency entry: 2096024821
- Sigstore integration time:
-
Permalink:
RavindraTirlangi/Klyro@28bbc03476556f2c5559d21b5ab9254018790394 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/RavindraTirlangi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@28bbc03476556f2c5559d21b5ab9254018790394 -
Trigger Event:
push
-
Statement type:
File details
Details for the file klyro-1.0.2-py3-none-any.whl.
File metadata
- Download URL: klyro-1.0.2-py3-none-any.whl
- Upload date:
- Size: 385.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71e4469c23c700611467c64cbedb30d924c3043f7749fab9e3bdeac46a5b265b
|
|
| MD5 |
5b29f95bdd6994f09214c4f026ed8eba
|
|
| BLAKE2b-256 |
ae93b755ef7bc25b14c3f12229401f50d1ce4d45b67036608059581fc6fc0092
|
Provenance
The following attestation bundles were made for klyro-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on RavindraTirlangi/Klyro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
klyro-1.0.2-py3-none-any.whl -
Subject digest:
71e4469c23c700611467c64cbedb30d924c3043f7749fab9e3bdeac46a5b265b - Sigstore transparency entry: 2096025441
- Sigstore integration time:
-
Permalink:
RavindraTirlangi/Klyro@28bbc03476556f2c5559d21b5ab9254018790394 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/RavindraTirlangi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@28bbc03476556f2c5559d21b5ab9254018790394 -
Trigger Event:
push
-
Statement type: