โก Lightning-fast GitHub repository analysis without cloning
Git Seer is a powerful CLI tool that provides instant insights into any public GitHub repository. Get comprehensive overviews of project structure, dependencies, languages, and potential security concernsโall without downloading a single file.
- ๐ Repository Analytics - Stars, forks, issues, and description at a glance
- ๐๏ธ Project Structure Analysis - Detect monorepos, Django projects, Docker setups
- ๐ Language Detection - Identify primary programming languages and file counts
- ๐ฆ Dependency Scanning - Find package.json, requirements.txt, and other dependency files
- ๐ฉ Security Insights - Flag potential secrets, credentials, and sensitive files
- โก Zero Clone Required - Leverages GitHub API for instant analysis
Clean, formatted terminal output with rich tables and panels
python seer.py owner/repository
Full-featured terminal user interface with expandable file tree navigation
python seer-tui.py owner/repository
- Python 3.8 or higher
- Internet connection (for GitHub API access)
-
Clone the repository
git clone https://github.com/LMLK-Seal/git-seer.git cd git-seer
-
Install dependencies
pip install -r requirements.txt
# Analyze any public GitHub repository
python seer.py microsoft/vscode
python seer.py facebook/react
python seer.py your-username/your-repo
Example Output:
โโ Oracle Report for microsoft/vscode โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โญ 162,847 โ ๐ด 28,234 โ ๐ 6,543 issues โ
โ Visual Studio Code โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฃ๏ธ Top Languages TypeScript (2,847 files), JavaScript (1,234 files)
๐๏ธ Architecture ๐ฆ 'src' layout detected
๐ณ Dockerized environment
๐ CI/CD configured (GitHub Actions)
๐ฆ Dependencies Found: package.json, yarn.lock
๐ฉ Red Flags โ
No obvious secret files found.
# Launch interactive file explorer
python seer-tui.py microsoft/vscode
TUI Features:
- ๐ Expandable file tree - Navigate repository structure visually
- โจ๏ธ Keyboard shortcuts -
q
to quit,t
to toggle theme - ๐จ Dark/Light themes - Toggle between visual modes
- ๐ Real-time loading - Asynchronous data fetching with status updates
- GitHub REST API - Repository metadata and file tree retrieval
- Rate Limiting Aware - Handles API limits gracefully
- Fallback Logic - Attempts both
main
andmaster
branches
# Smart project detection
def analyze_project_structure(tree: list) -> list:
# Detects: src/ layouts, monorepos, Django, Docker, CI/CD
- Rich Library - Beautiful tables, panels, and progress indicators
- Textual Framework - Interactive TUI components and widgets
- Typer CLI - Type-safe command-line argument parsing
git-seer/
โโโ seer.py # Standard CLI interface
โโโ seer-tui.py # Interactive TUI interface
โโโ requirements.txt # Python dependencies
โโโ README.md # This documentation
Package | Purpose | Version |
---|---|---|
requests |
GitHub API communication | Latest |
typer |
CLI framework | Latest |
rich |
Terminal formatting | Latest |
textual |
TUI framework | Latest |
Install all dependencies:
pip install requests typer rich textual
- โ
Source Layouts -
src/
directory organization - โ
Monorepos -
packages/
orapps/
structure - โ
Framework Detection - Django (
manage.py
), etc. - โ Containerization - Docker and docker-compose files
- โ CI/CD Pipelines - GitHub Actions workflows
Supports detection of:
- ๐ Python
- ๐จ JavaScript/TypeScript
- ๐ฆ Rust
- โ Java
- ๐ Ruby
- ๐น Go
- โก C/C++
- ๐ Markdown, HTML, CSS, YAML, JSON
Flags potentially sensitive files:
- ๐
.env
files - ๐ Credential files
- ๐๏ธ SSH keys (
id_rsa
,.pem
) - ๐ซ Other secret-containing files
- Quick Repository Assessment - Understand project structure before cloning
- Technology Stack Discovery - Identify languages and frameworks used
- Security Auditing - Spot potential security issues in public repos
- Code Review Preparation - Get context before reviewing PRs
- Architecture Analysis - Understand project organization patterns
- Dependency Auditing - Identify package managers and dependency files
- Open Source Exploration - Study popular repositories without downloading
- Best Practices - Learn from well-structured projects
- Technology Research - Discover how different tools are organized
# Optional: GitHub Personal Access Token for higher API limits
export GITHUB_TOKEN=your_personal_access_token
- Unauthenticated: 60 requests/hour
- Authenticated: 5,000 requests/hour
Git Seer works seamlessly without any configuration, but adding a GitHub Personal Access Token dramatically improves your experience by increasing API rate limits from 60 to 5,000 requests per hour.
# Set your GitHub token (optional but recommended)
export GITHUB_TOKEN=your_personal_access_token
To enable token authentication, you need to modify both seer.py and seer-tui.py. Here are the required changes:
Step 1: Add import at the top of both files
import os # Add this import if not already present
Step 2: Update the request functions in seer.py
Current Code (Anonymous):
def get_repo_metadata(repo_owner: str, repo_name: str) -> dict | None:
api_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}"
try:
response = requests.get(api_url) # โ No authentication
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException:
return None
Updated Code (With Token Support):
def get_repo_metadata(repo_owner: str, repo_name: str) -> dict | None:
api_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}"
# Check for GitHub token and set up headers
token = os.getenv("GITHUB_TOKEN")
headers = {}
if token:
headers["Authorization"] = f"token {token}"
try:
response = requests.get(api_url, headers=headers) # โ Now with auth
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException:
return None
Step 3: Update the get_repo_tree function in seer.py
Current Code:
def get_repo_tree(repo_owner: str, repo_name: str, branch: str = "main") -> list | None:
api_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/git/trees/{branch}?recursive=1"
try:
response = requests.get(api_url) # โ No authentication
# ... rest of function
Updated Code:
def get_repo_tree(repo_owner: str, repo_name: str, branch: str = "main") -> list | None:
api_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/git/trees/{branch}?recursive=1"
# Check for GitHub token and set up headers
token = os.getenv("GITHUB_TOKEN")
headers = {}
if token:
headers["Authorization"] = f"token {token}"
try:
response = requests.get(api_url, headers=headers) # โ Now with auth
# ... rest of function remains the same
Step 4: Update the get_tree function in seer-tui.py
Current Code:
def get_tree(branch: str = "main") -> list | None:
api_url = f"https://api.github.com/repos/{owner}/{name}/git/trees/{branch}?recursive=1"
try:
response = requests.get(api_url, timeout=10) # โ No authentication
# ... rest of function
Updated Code:
def get_tree(branch: str = "main") -> list | None:
api_url = f"https://api.github.com/repos/{owner}/{name}/git/trees/{branch}?recursive=1"
# Check for GitHub token and set up headers
token = os.getenv("GITHUB_TOKEN")
headers = {}
if token:
headers["Authorization"] = f"token {token}"
try:
response = requests.get(api_url, headers=headers, timeout=10) # โ Now with auth
# ... rest of function remains the same
The requests.get()
function sends standard HTTP requests with no inherent knowledge of GitHub's authentication system:
Without Token (Anonymous Requests):
- GitHub API receives unauthenticated request
- Counts against public rate limit (60 requests/hour per IP)
- โก Analysis Capacity: ~30-60 repositories/hour
With Token (Authenticated Requests):
- Authorization header identifies you to GitHub API
- Counts against your personal rate limit (5,000 requests/hour)
- ๐ Analysis Capacity: ~2,500-5,000 repositories/hour
Each Git Seer analysis makes 1-2 API calls per repository:
- 1 call for repository metadata (stars, forks, description)
- 1 call for complete file tree structure
Authentication | Rate Limit | Repos/Hour | Use Case |
---|---|---|---|
None | 60 requests/hour | 30-60 repos | Quick checks, demos |
Token | 5,000 requests/hour | 2,500-5,000 repos | Development, batch analysis |
-
Go to GitHub Settings โ Personal Access Tokens
-
Click "Generate new token" โ Choose "Personal access tokens (classic)"
-
Set Token Name:
git-seer-cli
-
Select Scopes:
- โ
public_repo
(for public repository access) - โ
repo
(only if you need private repository access)
- โ
-
Generate Token and copy it immediately
-
Set Environment Variable:
# Linux/macOS
echo 'export GITHUB_TOKEN=your_token_here' >> ~/.bashrc
source ~/.bashrc
# Windows PowerShell
$env:GITHUB_TOKEN="your_token_here"
# Windows Command Prompt
set GITHUB_TOKEN=your_token_here
- ๐ Never commit tokens to version control
- ๐ Rotate tokens regularly (every 6-12 months)
- ๐ Use minimal scopes required for your use case
- ๐๏ธ Delete unused tokens from GitHub settings
- ๐พ Store securely using environment variables or secret managers
- ๐ Commit Analysis - Activity patterns and contributor insights
- ๐ Real-time Updates - Live repository monitoring
- ๐พ Caching Layer - Local storage for faster repeated analysis
- ๐ Web Interface - Browser-based repository explorer
- ๐ Export Options - JSON, CSV, and PDF report generation
- ๐ Private Repository Support - GitHub token integration
We welcome contributions! Here's how you can help:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch
- โ๏ธ Make your changes
- โ Add tests if applicable
- ๐ค Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐จ Rich - For beautiful terminal formatting
- ๐ฅ๏ธ Textual - For powerful TUI capabilities
- โก Typer - For elegant CLI interfaces
- ๐ GitHub API - For making repository data accessible
โญ Star this repository if you find it useful!