Turn any GitHub repository into comprehensive code analysis with interactive call graphs and multi-language support.
- Multi-language Analysis: Support for Python, JavaScript, TypeScript, Rust, Go, C, and C++
- Tree-sitter Powered: Advanced syntax parsing with tree-sitter for accurate code analysis
- Call Graph Generation: Interactive visualizations showing function relationships
- Web API: RESTful API for integration with other tools and frontends
- Real-time Analysis: Live progress tracking and results
- Repository Insights: File structure, function counts, and relationship mapping
- LLM-Ready Output: Structured JSON optimized for AI analysis
GitProbe's interactive call graph visualization showing function relationships and code structure analysis
- Python 3.8+
- Git (for repository cloning)
- Internet access for GitHub repository analysis
# Clone the repository git clone https://github.com/your-org/gitprobe.git cd gitprobe # Create virtual environment python -m venv env source env/bin/activate # On Windows: env\Scripts\activate # Install dependencies pip install -r requirements.txt# Start GitProbe server ./gitprobe server # Server will be available at http://localhost:8000 # API documentation at http://localhost:8000/docs# Analyze a GitHub repository python -m gitprobe https://github.com/user/repository # With custom output directory python -m gitprobe https://github.com/user/repository --output ./analysis/# Start analysis curl -X POST "http://localhost:8000/analyze" \ -H "Content-Type: application/json" \ -d '{"github_url": "https://github.com/psf/requests"}'import requests # Analyze repository response = requests.post("http://localhost:8000/analyze", json={ "github_url": "https://github.com/psf/requests", "include_patterns": ["*.py"], "exclude_patterns": ["*test*", "docs/"] }) result = response.json() print(f"Found {result['data']['summary']['total_functions']} functions") print(f"Languages: {result['data']['summary']['languages_analyzed']}"){ "status": "success", "data": { "summary": { "total_functions": 235, "total_calls": 657, "languages_analyzed": ["python"], "files_analyzed": 45 }, "functions": [...], "relationships": [...], "visualization": { "cytoscape": {...} } } }GitProbe includes a comprehensive integration test suite that validates all language analyzers:
# Install test dependencies pip install rich # Run quick tests (1 repo per language) python tests/test_integration.py --quick # Test all languages comprehensive python tests/test_integration.py # Test specific language python tests/test_integration.py --language python # Verbose output with detailed progress python tests/test_integration.py --verbose # JSON output for CI/CD python tests/test_integration.py --json > results.json- Python: rich, requests, flask, cpython
- JavaScript: lodash, axios, express, node.js
- TypeScript: vscode, typescript, angular
- Rust: clap, ripgrep, rust compiler
- Go: cobra, hugo, kubernetes
- C: cJSON, libuv, curl
- C++: fmt, catch2, protobuf
gitprobe/ βββ src/gitprobe/ β βββ analysis/ # Core analysis engine β β βββ analysis_service.py β β βββ call_graph_analyzer.py β β βββ repo_analyzer.py β βββ analyzers/ # Language-specific parsers β β βββ python.py # Python tree-sitter analyzer β β βββ javascript.py # JavaScript/TypeScript analyzer β β βββ rust.py # Rust analyzer β β βββ go.py # Go analyzer β β βββ c_cpp.py # C/C++ analyzer β β βββ ... β βββ web/ # FastAPI web server β β βββ server.py β βββ models/ # Data models β βββ ... βββ tests/ # Integration test suite β βββ test_integration.py β βββ README.md βββ requirements.txt | Language | Functions | Calls | Classes | Imports | Status |
|---|---|---|---|---|---|
| Python | β | β | β | β | Stable |
| JavaScript | β | β | β | β | Stable |
| TypeScript | β | β | β | β | Stable |
| Rust | β | β | β | β | Stable |
| Go | β | β | β | β | Stable |
| C | β | β | β | β | Stable |
| C++ | β | β | β | β | Stable |
# Optional: Custom server configuration export GITPROBE_HOST=0.0.0.0 export GITPROBE_PORT=8000# Include/exclude patterns { "github_url": "https://github.com/user/repo", "include_patterns": ["*.py", "*.js"], "exclude_patterns": ["*test*", "node_modules/", "__pycache__/"] }# Start GitProbe server (in one terminal) ./gitprobe server # Run integration tests (in another terminal) python tests/test_integration.py --quick- Create analyzer in
src/gitprobe/analyzers/ - Add tree-sitter language dependency to
requirements.txt - Register analyzer in analysis service
- Add test repositories to
tests/test_integration.py
# Install in development mode pip install -e . # Install development dependencies pip install pytest black isort mypy # Run code formatting black . isort .- Tree-sitter - Syntax parsing and analysis
- FastAPI - Web API framework
- Pydantic - Data validation and modeling
- Rich - Beautiful terminal output
- Cytoscape.js - Graph visualization (frontend)
- Large repositories (>1000 functions) are limited to 900 functions for performance
- Some complex C++ template syntax may not parse correctly
- Private repositories require local cloning
This project is licensed under the MIT License - see the LICENSE file for details.
GitProbe - Comprehensive multi-language code analysis with interactive call graphs.
