Skip to content

Latest commit

 

History

History
83 lines (56 loc) · 1.63 KB

File metadata and controls

83 lines (56 loc) · 1.63 KB

🚀 HAI Code Generator

HAI Code Generator is a powerful CLI-based chat application designed to streamline development workflows with advanced conversational capabilities and seamless task execution. It offers features like intelligent file identification and robust functionality, with Aider integrated to further enhance its efficiency and usability.

Table of Contents

🛠 Setup and Build

Prerequisites

  • Python == 3.9.6
  • pip package manager
  • Virtual environment tool

Step-by-Step Guide

1️⃣ Create Virtual Environment

# MacOS/Linux
python3 -m venv env 

# Windows
py -m venv env

2️⃣ Activate Virtual Environment

# MacOS/Linux
source env/bin/activate

# Windows
.\env\Scripts\activate

💡 Tip: Verify activation by checking Python interpreter location:

# MacOS/Linux
which python

# Windows
where python

3️⃣ Install Dependencies

pip3 install -e ../coder

pip3 install -r requirements.txt

4️⃣ Run Application

cd src

python3 cli.py --api-key <OPENAI_API_KEY>

5️⃣ Build Application

chmod +x build.sh

BINARY_PATH="../../env/lib/python3.9/site-packages/tree_sitter_languages/languages.so" ./build.sh

6️⃣ Validate Build

cd dist

./cli-1.9.3-darwin-arm64 --api-key <OPENAI_API_KEY>

🛠️ Troubleshooting

  • Issue: Invalid API key.
    • Solution: Ensure the Valid API key is either passed directly or set in the environment and then accessed through the corresponding environment variable.