Litchi is yet another coding assistant powered by LLM.
Project description
Litchi
Introduction
Litchi
is yet another coding assistant powered by LLM.
Unlike other programming assistants, litchi
supports global indexing across all source files in projects and code-based retrieval augmented generation. It makes features like chat-to-code and code-generation more effective and practical.
Features
Litchi
has more features than other coding assistants or copilot plugins because it is integrated with indexes which can be used as standalone tools.
- Support indexing source code files for the whole project.
- Manager any code index by creating, updating, showing, and searching.
- Retrieval augmented generation with source code for user's query.
- Addoc chat to code which will retrieval related source files to query LLM.
- Generate code based on user's query and related source files.
- One step to filter the source files which can be customed for different projects.
- Compatible with all large language models like ChatGPT and others.
- Compatible with public and private MaaS which can be deployed in local.
Use Cases
- Normal chat: chat with LLM without indexes which is useful for general purposes.
- Chat with file: use LLM to read and understand a local file.
- Chat with files: collect file names in index file and chat with all files.
- Generate code for user's query:
- Quickly generate python script like port detecting to execute.
- Generate code for user's query and source files:
- Rewrite the source code in different programming languages.
- Generate unit test cases for the source code.
- Run commands: generate the script and execute immediately
- Write requirements instead of coding: Edit local requirement file and automatically generating code
- Optimize code for user's query and source file:
- Add annotation for original source code.
- Format, refactor or optmize the source code with specified style.
- Inplace or ask permission to update the source code with optimized code.
- Implement the TODO functions in the source code.
Install
Install the litchi
command from PyPI.
pip install orchard-litchi
You can install from source by cloning the repository.
git clone https://github.com/OrchardUniverse/litchi.git
cd ./litchi/
python ./setup.py develop
Usage
Initialize the project and generate directory .litchi/
. You can input the language as "Chinese" so that it will create index and query in Chinese.
cd $PROJECT_PATH
litchi init .
litchi init --language Chinese ,
Go to the project directory and create source file .litchi/source_files.yaml
. You can edit .litchi/ignore_rules.yaml
to choose the expected source files.
litchi source create
Create the index for single file or all source files in project.
litchi index create $FILE_PATH
litchi index create --all
Show the detail of the index of single file or all indexes.
litchi index show $FILE_PATH
litchi index show --all
You can input a query and get the related indexes.
litchi index query $QUERY
If you want to read the source code with index, use the following commands which will copy the readable index file next to the source file.
litchi index copy-to-source
litchi index delete-from-source
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file orchard_litchi-0.1.2.tar.gz
.
File metadata
- Download URL: orchard_litchi-0.1.2.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44d6115eb5e0a075790acc665dd4b0e9260e451c48038bc2aabd1f97c8f29998 |
|
MD5 | 8f62e6f1b3847663b8b41ebfbe9d7880 |
|
BLAKE2b-256 | 5df8f7c32a1f68a4c6bf7d61c8ac30b703ccc069fd96b95fbb1d14fe6bd95405 |
File details
Details for the file orchard_litchi-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: orchard_litchi-0.1.2-py3-none-any.whl
- Upload date:
- Size: 33.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2db31f6fcee082b447576cb4564c1412dc73588dc6fd6c7c67ca48c5cd453568 |
|
MD5 | 0ffe5b6bf5f1105abafb95b81df0c6a6 |
|
BLAKE2b-256 | a64570b00b65a4bfe062664a90a863bfaad012731e310b4191465d05831c2592 |