Skip to main content

A coding assistant to help with repository management and code queries.

Project description

Leya

AI coding assistant which can directly be ported into the terminal and be used to query complex Git repositories

Overview

The Git Coding Assistant is a versatile tool designed to allow you to query and find solutions to code within your git repository. Leveraging the power of Git and OpenAI, it offers functionalities such as cloning repositories, selecting repositories for focused queries, and extracting relevant code snippets and providing you solutions to your queries.

Features

  • Repository Cloning: Easily clone GitHub repositories directly from the command line.
  • Repository Selection: Select repositories to work with, enabling focused queries and interactions.
  • Code Querying: Query repositories for specific code issues or information using natural language queries.
  • Function-based Queries: Narrow down queries by specifying function names to focus on.
  • Intelligent Answer Generation: Utilize AI to extract and provide intelligent answers to code-related queries.

Usage

Before using Leya, you need to set up your environment variables for the OpenAI API key and Pinecone API key:

Option 1: Export Environment Variables (Linux and macOS)

Open your terminal and export the environment variables using the following commands:

    $ export OPENAI_API_KEY=<your_openai_api_key>
    $ export PINECONE_KEY=<your_pinecone_api_key>

Option 2: Export Environment Variables (Windows)

For Windows users, you can set the environment variables using the following commands in PowerShell bash $ $env:OPENAI_API_KEY="<your_openai_api_key>" $ $env:PINECONE_KEY="<your_pinecone_api_key>" Option 3: Add Environment Variables (Manual)

Alternatively, you can manually add the environment variables through your system settings:

OpenAI API Key: Add a new environment variable named OPENAI_API_KEY with your OpenAI API key as the value. Pinecone API Key: Add a new environment variable named PINECONE_KEY with your Pinecone API key as the value. After setting up the environment variables, Leya will be able to access your API keys for authentication

After Environment Variable setup

  1. Downloading the package:
    $ pip install leya
    
  2. Cloning Repositories and uploading repo chunks to pinecone:
    $ leya -r <repository_url>
    
  3. Selecting Repositories:
    $ leya -s
    
  4. Querying Repositories:
    $ leya -q "<query>" 
    
  5. Optional addition of Function-based Queries:
    $ leya -q "<query>" -f <function_name_1> <function_name_2> ...
    

Contributing

Fork the repository. Create a new branch (git checkout -b feature-branch). Make your changes. Commit your changes (git commit -am 'Add new feature'). Push to the branch (git push origin feature-branch). Create a new Pull Request.

Credits

Developed by: PranavN1234

Working

Store repositories

Screenshot 2024-04-24 125402

Swap between stored repositories

Screenshot 2024-04-24 125420

Sample queries

** Query without functional parameters **

Screenshot 2024-04-24 125501

** Query with functions appended to narrow scope of search ** Screenshot 2024-04-24 125642

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

leya-0.1.5.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

leya-0.1.5-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file leya-0.1.5.tar.gz.

File metadata

  • Download URL: leya-0.1.5.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for leya-0.1.5.tar.gz
Algorithm Hash digest
SHA256 49c7ac053ba879f721cbf6ca9afebff372ff9c9d50c69a2930cca432b5abcc97
MD5 1c70aba6f428f12693e85faaa4556633
BLAKE2b-256 b3a0fb2ce900abc31922b506edeefed7999c4427a2767f5283612f9949a36ca1

See more details on using hashes here.

File details

Details for the file leya-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: leya-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for leya-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 38f55ee83c9354a55721d80b215ba738f1b4622e0cae5565ff28754e75937c2b
MD5 eb33a36b3c786d00ac8986b8b8901126
BLAKE2b-256 ad522d27dc71e4675d3782eec43beface02f3dfe901b7876fb4a1c3ed14cdb7c

See more details on using hashes here.

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