Insight CLI is a codebase explainer tool powered by Google Generative AI.
Follow the steps below to set it up and run it on your machine.
If you already have the project folder, skip this step.
Otherwise:
git clone <your-repo-url>
cd <project-folder>Inside the project directory:
python3 -m venv venvOn macOS/Linux:
source venv/bin/activateOn Windows (PowerShell):
venv\Scripts\Activate.ps1You should now see (venv) in your terminal prompt.
Install the published package:
pip install insight-cli-sarangThe tool requires a Google API Key for Generative AI.
Replace your_api_key_here with your actual key.
On macOS/Linux:
export GOOGLE_API_KEY="your_api_key_here"On Windows (PowerShell):
setx GOOGLE_API_KEY "your_api_key_here"Note: The export command only works for the current session.
If you want the key to be available permanently, add it to your shell profile (.zshrc, .bashrc, or PowerShell profile).
Basic usage:
insight-cli <path-to-codebase>Example: analyze the current folder and save reports in reports/:
insight-cli . -o reportsLimit the number of files analyzed (e.g., 10 files):
insight-cli . --limit 10For all available options:
insight-cli --help