Skip to main content

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

Metadata

Release files for orchard-litchi 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orchard-litchi 0.1.2
File Size Uploaded Provenance
orchard_litchi-0.1.2.tar.gz 25.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for orchard-litchi 0.1.2
File Interpreter ABI Platform
orchard_litchi-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 59.2 kB

Release files / orchard_litchi-0.1.2.tar.gz

Download URL orchard_litchi-0.1.2.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
44d6115eb5e0a075790acc665dd4b0e9260e451c48038bc2aabd1f97c8f29998
BLAKE2b-256 checksum
How to use checksums
5df8f7c32a1f68a4c6bf7d61c8ac30b703ccc069fd96b95fbb1d14fe6bd95405
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Release files / orchard_litchi-0.1.2-py3-none-any.whl

Download URL orchard_litchi-0.1.2-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2db31f6fcee082b447576cb4564c1412dc73588dc6fd6c7c67ca48c5cd453568
BLAKE2b-256 checksum
How to use checksums
a64570b00b65a4bfe062664a90a863bfaad012731e310b4191465d05831c2592
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Security for orchard-litchi 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page