A standardized system to package, present, and analyze project repositories.
RepoLens helps you gain insights into your software projects by analyzing repository structure, commit patterns, and codebase metrics. Whether you're evaluating project health, understanding contribution patterns, or extracting key metrics, RepoLens provides a standardized approach to repository analysis.
- Repository Analysis: Track file counts, commit history, branch structures
- File Type Analysis: Understand your codebase composition by file types
- Web Interface: Intuitive dashboard for viewing repository metrics
- API Access: Programmatic access to repository data and analysis
- Git 2.40 or newer. Enforced, not suggested: the app refuses to start on
anything older.
check-attr --sourcearrived in 2.40 and is how vendored and generated files are classified at a revision rather than at HEAD. Without it the answers get quietly worse, which is harder to notice than a crash. - uv — manages Python and dependencies. The
required version is declared as
required-versioninpyproject.tomland uv enforces it itself. - PostgreSQL, optional — falls back to SQLite when
DATABASE_URLis unset
-
Clone the repository:
git clone https://github.com/jwalsh/repolens.git cd repolens -
Install dependencies:
uv sync
uv provisions Python 3.11+ itself, so no separate interpreter setup is needed. If you would rather use pip,
requirements.txtis a hash-pinned export of the same lock:pip install -r requirements.txt
-
Set up environment variables (all optional in development):
export DATABASE_URL="postgresql://username:password@localhost/repolens" export REPOLENS_CLONE_ROOT=".clones" # where bare mirrors are kept export GITHUB_TOKEN="$(gh auth token)" # only for the forge client
-
Apply migrations and run the application:
uv run alembic upgrade head uv run python main.py
-
Access the web interface at http://localhost:5000
- Add repositories for analysis via the web interface
- View detailed metrics for each repository
- Export analysis data or access via API endpoints
We welcome contributions! Please see our DEVELOPER.md for guidelines on how to contribute to this project.
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub Repository: https://github.com/jwalsh/repolens