Skip to main content

A terminal-based AI companion.

Project description

🧠 vorp

vorp logo

vorp is a terminal-based AI pair programmer. It indexes your codebase, allowing you to ask context-aware questions and retrieve relevant code snippets without leaving your command line environment.

Note: This project is under active development.

🚀 Key Features

  • RAG (Chat with Codebase): Index any project folder to enable context-aware queries.
    • Project Isolation: Uses a global vector database with metadata filtering. Context from Project A will never leak into Project B.
    • Local Storage: All embeddings are stored locally in ~/.vorp_rag_db.
  • Multi-Model Support: Integrates with Groq and Google Gemini to provide access to models like Llama 3.3, DeepSeek R1, and Gemini 2.5 Pro.
  • Session Persistence: Chat history is saved locally, allowing you to resume sessions later.
  • Context Management: Manually inject specific files into the context window for targeted assistance.
  • Cross-Platform: Designed to work consistently on Windows, macOS, and Linux.

🛠️ Installation

Prerequisites

  • Python 3.10+
  • Git

Steps

  1. Clone the repository:

    git clone https://github.com/SiddharthBayapureddy/vorp.git
    cd vorp
    

    (Note: If the repository is renamed to vorp, clone that instead.)

  2. Create a virtual environment:

    • Windows:
      python -m venv venv
      .\venv\Scripts\activate
      
    • macOS/Linux:
      python3 -m venv venv
      source venv/bin/activate
      
  3. Install dependencies:

    pip install -e .
    
  4. Configure API Keys: Create a .env file in the root directory and add your keys:

    GROQ_API_KEY=your_key_here
    GEMINI_API_KEY=your_key_here
    

🎮 Usage

Start the application:

vorp

Interactive Commands

Command Description
/index <path> Scans and indexes the specified directory. This creates a searchable vector index for RAG.
/rag Toggles RAG mode on or off. When enabled, the assistant retrieves context from the indexed project.
/add <file> Loads the content of a specific file into the active chat context.
/context Displays a list of currently loaded files and the active RAG project path.
/clear Clears the terminal screen.
/exit-v Exits the application and saves the current chat history.
/exit Exits the application and deletes the current chat history.

CLI Arguments

You can configure vorp at startup using these flags:

Flag Description
--model <id> Starts the session with a specific model (e.g., groq/llama-3.3-70b-versatile).
--list Lists all supported models and their IDs, then exits.
--help Displays the help message.

Example:

vorp --model "gemini/gemini-2.5-pro"

🏗️ Architecture

The Retrieval-Augmented Generation (RAG) system in vorp is built for speed and privacy. Here is how it works under the hood:

  1. Ingestion & Chunking:

    • When you run /index, the system walks through your project directory.
    • Files are read and split into smaller segments using a Sliding Window approach (1000 characters with 200 character overlap). This ensures that context at the boundaries of chunks is preserved.
  2. Embedding Generation:

    • Each chunk is passed through the all-MiniLM-L6-v2 model. This is a lightweight, high-performance model that runs locally on your CPU.
    • The model converts the text code into a 384-dimensional vector (a list of numbers representing the semantic meaning).
  3. Vector Storage (ChromaDB):

    • These vectors are stored in ChromaDB, a persistent local vector database located at ~/.vorp_rag_db.
    • Isolation Layer: Every vector is tagged with a project_id metadata field (the absolute path of the project). This acts as a strict filter, ensuring that queries only search within the active project's scope.
  4. Retrieval (Cosine Similarity):

    • When you ask a question in RAG mode, your query is embedded using the same model.
    • The database performs a similarity search (using Cosine Similarity) to find the top 5 chunks that are mathematically closest to your query.
    • This retrieval is strictly filtered by the active project_id.
  5. Context Injection:

    • The retrieved code snippets are formatted and injected into the LLM's system prompt.
    • The LLM then generates an answer using this retrieved knowledge, allowing it to "see" your code.

🔮 Roadmap

  • File Editing: Capabilities for the agent to autonomously modify files.
  • Command Execution: Safe execution of shell commands for testing and linting.
  • Diff View: Enhanced visualization of code changes.

🤝 Contributing

Contributions are welcome. Please open an issue or submit a pull request for any improvements.

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

vorp-0.1.4.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

vorp-0.1.4-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file vorp-0.1.4.tar.gz.

File metadata

  • Download URL: vorp-0.1.4.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for vorp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 233532bb87b78dbd3af59b990954bc1dff1e32982b4cebf52fbbf1314fcfc6ec
MD5 622621a264e1d791b8d21ca82b58befe
BLAKE2b-256 078f34b8094a1bb20f5dc8fe3168ecd9224ff5ec75ef514816b1eadff28632ed

See more details on using hashes here.

File details

Details for the file vorp-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: vorp-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for vorp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e76ff34507e03fcdf4ec1e448aa2df0c9096afddcbb5e731767df7c2af5faf8b
MD5 8c1a381e18eee8989d7ad65ea3061ce9
BLAKE2b-256 4788764cafa46a8391a2591bda8e1f171ed4d7e7524a21c9947cf85e0cdf7228

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