Skip to main content

AI-Powered GitHub Repository Analyzer with multi-LLM support, caching, quality scoring, export formats, watch mode, and interactive dashboard

Project description

CodeSonor CLI ๐Ÿ”

AI-Powered GitHub Repository Analyzer with Multi-LLM Support

Python Version License: MIT

Analyze any GitHub repository with AI-powered insights. Choose from 5 different AI providers!

๐Ÿš€ Installation

Basic (includes Gemini)

pip install codesonor

With Specific Provider

pip install codesonor[openai]      # OpenAI GPT
pip install codesonor[anthropic]   # Anthropic Claude
pip install codesonor[mistral]     # Mistral AI
pip install codesonor[groq]        # Groq (fastest)
pip install codesonor[all-llm]     # All providers

๐Ÿค– Supported AI Providers

Provider Free Tier Speed Get API Key
Gemini โญ โœ… Yes Fast Get Key
OpenAI โŒ Paid Medium Get Key
Claude โŒ Paid Fast Get Key
Mistral โŒ Paid Fast Get Key
Groq โšก โœ… Yes Ultra-fast Get Key

โญ Default | โšก Fastest

โš™๏ธ Configuration

One-Time Setup (Recommended)

codesonor setup

This interactive wizard will:

  • โœ… Let you choose your AI provider
  • โœ… Guide you to get the API key
  • โœ… Save everything to ~/.codesonor/config.json
  • โœ… Never ask again!

Check Your Configuration

codesonor config

Alternative Methods

Environment Variables (if you prefer):

# Windows (PowerShell)
$env:GEMINI_API_KEY = "your_key"
$env:GITHUB_TOKEN = "your_token"

# Linux/Mac
export GEMINI_API_KEY="your_key"
export GITHUB_TOKEN="your_token"

Per-Command (override saved config):

codesonor analyze URL --gemini-key YOUR_KEY --github-token YOUR_TOKEN

๐Ÿ“– Usage

Full Analysis with AI

codesonor analyze https://github.com/owner/repo

Quick Summary (No AI)

codesonor summary https://github.com/owner/repo

Advanced Options

# Skip AI analysis (faster)
codesonor analyze https://github.com/owner/repo --no-ai

# Limit number of files analyzed
codesonor analyze https://github.com/owner/repo --max-files 200

# Export results as JSON
codesonor analyze https://github.com/owner/repo --json-output results.json

๐Ÿ“Š Example Output

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  CodeSonor Analysis: awesome-project            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Repository Information
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Field      โ”ƒ Value                          โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ Owner      โ”‚ awesome-owner                  โ”‚
โ”‚ Repository โ”‚ awesome-project                โ”‚
โ”‚ Stars      โ”‚ 1,234                          โ”‚
โ”‚ Forks      โ”‚ 567                            โ”‚
โ”‚ Language   โ”‚ Python                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Language Distribution
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Language   โ”ƒ Files    โ”ƒ %      โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ Python     โ”‚ 45       โ”‚ 78.5%  โ”‚
โ”‚ JavaScript โ”‚ 8        โ”‚ 14.0%  โ”‚
โ”‚ CSS        โ”‚ 4        โ”‚ 7.0%   โ”‚
โ”‚ HTML       โ”‚ 1        โ”‚ 0.5%   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿค– AI-Generated Summary
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
This repository implements a modern web application
framework with clean architecture and comprehensive
testing. Key features include...

๐ŸŽฏ Features

  • ๐Ÿค– AI Analysis: Get intelligent insights about repository purpose, architecture, and key features
  • ๐Ÿ“Š Language Stats: Detailed breakdown of programming languages used
  • ๐Ÿ“ Smart Filtering: Automatically skips common directories (node_modules, dist, build)
  • โšก Performance: File limits and optimizations for fast analysis
  • ๐ŸŽจ Beautiful Output: Rich terminal formatting with colors and tables
  • ๐Ÿ’พ Export Options: Save results as JSON for further processing

๐Ÿ› ๏ธ Development

Install with development dependencies:

pip install codesonor[dev]

Run tests:

pytest

๐Ÿ“ฆ Web App Version

CodeSonor also comes with a Flask web application. To use it:

# Install with web dependencies
pip install codesonor[web]

# Clone the repository for web app files
git clone https://github.com/farhanmir/CodeSonor.git
cd CodeSonor

# Run the web server
python app.py

Visit http://localhost:5000 in your browser.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘ค Author

Farhan Mir

๐Ÿ™ Acknowledgments

  • Powered by Google Gemini AI
  • Built with Python, Click, and Rich
  • GitHub REST API v3

Note: This tool analyzes public repositories. Ensure you have appropriate permissions before analyzing private repositories.

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

codesonor-0.4.0.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

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

codesonor-0.4.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file codesonor-0.4.0.tar.gz.

File metadata

  • Download URL: codesonor-0.4.0.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for codesonor-0.4.0.tar.gz
Algorithm Hash digest
SHA256 550a8f9e5d05545e1f110f89d9e3cfb899c5606ddf1a36f33e2589b0daf582fb
MD5 3a7f37b2b494afb4451a7c96328959cc
BLAKE2b-256 05a9a3a3750cf534b72557584133604be4518fae4959aad81a7154dd82bd7a3b

See more details on using hashes here.

File details

Details for the file codesonor-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: codesonor-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for codesonor-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbb2a043eb61a4ceeffb0ec44a419902e5e596692e55c4ad26186ed382cb32f8
MD5 2f2762374762619a5ff7704328f70650
BLAKE2b-256 1bcfb87bd1d4369129905056e0e375a5fd5e59e49eed56056be5b2deba803b39

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