A Python-based CLI tool that analyzes codebases and generates detailed reports
Project description
Insight
Insight is a Python-based CLI tool that analyzes codebases and generates detailed reports. It provides both static analysis and AI-powered explanations (via Gemini API or local models).
Features
-
Analyze 30+ programming, web, and config file types.
-
Generate a
report/folder with:- One detailed
.mdfile per source file. - A
summary.mdoverview of the entire codebase.
- One detailed
-
Collect static metrics:
- Total lines
- Functions, classes, imports
- Number of comments
-
AI-powered insights:
- File explanations in plain language
- Probability score (1–10) for AI/LLM-generated code
Installation
Clone the repository:
git clone https://github.com/yourusername/insight.git
cd insight
Create a virtual environment and install dependencies:
python3 -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
pip install -r requirements.txt
pip install -e .
Setup
If using Gemini API, set your API key:
export GEMINI_API_KEY="your_api_key_here" # Mac/Linux
setx GEMINI_API_KEY "your_api_key_here" # Windows
Usage
Analyze the current directory:
insight .
Limit the number of files analyzed (useful for testing):
insight . --limit 5
Change output directory:
insight . -o my_reports
Reports will be saved in the specified folder, one Markdown file per source file plus a summary.md.
Supported File Types
- Programming:
.py,.js,.ts,.java,.cpp,.c,.cs,.go,.php,.rb,.rs,.swift,.kt,.scala,.dart,.m,.mm,.lua,.pl,.sh,.bat - Web:
.html,.htm,.css,.scss,.less,.ejs,.erb,.mustache - Config:
.json,.yaml,.yml,.toml,.ini,.cfg,.xml - Docs:
.md,.rst - Build/DevOps:
.gradle,.pom,.makefile,.cmake,.dockerfile - Database:
.sql
Roadmap
- Add
.insightignoresupport to skip specific files/folders. - Export reports in HTML and PDF formats.
- Support for local AI engines (Ollama, LM Studio).
- Interactive web dashboard for reports.
License
This project is licensed under the MIT License.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file insight_cli_sarang-0.2.1.tar.gz.
File metadata
- Download URL: insight_cli_sarang-0.2.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88ba0f2326b1bff885f3378fb1c18814cda2b7b99dd2407c9a6a5666ce0f9633
|
|
| MD5 |
f0dc02870c8068d17db49bf3d66eeb48
|
|
| BLAKE2b-256 |
fe49e3652049c198b30a3c4080e42c484cf19bcc08e5baa9fd610bbd059b0872
|
File details
Details for the file insight_cli_sarang-0.2.1-py3-none-any.whl.
File metadata
- Download URL: insight_cli_sarang-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e47da6b993262086c47b71f4428dc23a6f92c824f439047db1251c67a8830b58
|
|
| MD5 |
dcacd60ad2760395c9a23742468204a9
|
|
| BLAKE2b-256 |
e0213ef066ea4b3df0a5b5d8571d025f1a7d9e79ad8afd63a9483fddcdb83b50
|