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
- Downloading the package:
$ pip install leya
- Cloning Repositories and uploading repo chunks to pinecone:
$ leya -r <repository_url>
- Selecting Repositories:
$ leya -s
- Querying Repositories:
$ leya -q "<query>"
- 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
Swap between stored repositories
Sample queries
** Query without functional parameters **
** Query with functions appended to narrow scope of search **
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.