Skip to main content

Klyro is AI pair programming in your terminal

Project description

Klyro

AI pair programming in your terminal.

PyPI Python License Changelog

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

klyro-1.0.2.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.2-py3-none-any.whl (385.2 kB view details)

Uploaded Python 3

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

Hashes for klyro-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ebead9efbac2bff6a86d27989a8549dacd88dd4690603596a81182cb0ca2c686
MD5 0d806407448fa7f6e3ae9c6ee13b0064
BLAKE2b-256 60d617ba5143d705cf16a93c79185b43df8bff5b9fd29dbd3b42dc44fa39f5ea

See more details on using hashes here.

Provenance

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

Hashes for klyro-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 71e4469c23c700611467c64cbedb30d924c3043f7749fab9e3bdeac46a5b265b
MD5 5b29f95bdd6994f09214c4f026ed8eba
BLAKE2b-256 ae93b755ef7bc25b14c3f12229401f50d1ce4d45b67036608059581fc6fc0092

See more details on using hashes here.

Provenance

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