Git Commit Chart (AI written)
99% AI (cursor) without any actual programming.
A web application that visualizes commit history for GitHub repositories using interactive charts. The application shows commit patterns over the last 30 days of any public GitHub repository, with both overall commit trends and per-user contribution breakdowns.
Features
- View total commits per day with a line chart
- Analyze commits by user with a stacked bar chart
- Interactive GitHub-styled legend with user filtering
- Responsive design that works on all devices
- Easy navigation between different views
- URL sharing support for specific repositories
- Dark mode by default
Installation
pipx install git-commit-chart
Run:
git-commit-chart --host 0.0.0.0 --port 8000 --production
Screenshots
Total commits view
Commits by user view
Local Installation (Current Method)
- Clone the repository:
git clone https://github.com/yourusername/git-commit-chart.git
cd git-commit-chart
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the package:
pip install -e .
Development Installation
For development, install with additional development dependencies:
pip install -e ".[dev]"
Usage
Command Line Interface
After installation, you can run the application using the git-commit-chart command:
# Run in development mode (default)
git-commit-chart
# Run in production mode
git-commit-chart --production
# Specify host and port
git-commit-chart --host 0.0.0.0 --port 8000
Options
--port: Port to run the application on (default: 5000)--host: Host to run the application on (default: 127.0.0.1)--production/--development: Run in production mode with Waitress server (default: development)
Using the Web Interface
- Start the application using one of the methods above
- Open your web browser and navigate to the displayed URL (default: http://127.0.0.1:5000)
- Enter a GitHub repository owner and name (e.g., "facebook" and "react")
- Click "Generate Chart" to view the commit history
- Use the navigation links to switch between total commits and per-user views
URL Parameters
You can share specific repository visualizations by including the owner and repo in the URL:
http://localhost:5000/?owner=facebook&repo=react
http://localhost:5000/by-user?owner=facebook&repo=react
Development
Requirements
- Python 3.9 or higher
- pip (Python package installer)
Development Tools
The development installation includes:
- pytest: For running tests
- black: For code formatting
- flake8: For code linting
- build: For building distribution packages
- twine: For publishing to PyPI
Running Tests
The package includes comprehensive tests for all major components. To run the tests:
# Install development dependencies first
pip install -e ".[dev]"
# Run all tests
pytest
# Run tests with coverage report
pytest --cov=git_commit_chart
# Run specific test files
pytest tests/test_api.py
pytest tests/test_routes.py
pytest tests/test_cli.py
The tests cover:
- API Functions: Testing GitHub API integration
- Routes: Testing Flask endpoints and responses
- CLI: Testing command-line interface options
- Error Handling: Testing invalid inputs and error cases
Building the Package
To build the package for distribution:
python -m build
This will create both wheel and source distribution in the dist/ directory.
Docker Support
Build and run using Docker:
# Build the image
docker build -t git-commit-chart .
# Run the container
docker run -p 5000:5000 git-commit-chart
Kubernetes Deployment
Kubernetes manifests are provided in the k8s directory. Deploy using:
kubectl apply -f k8s/deployment.yaml
License
This project is licensed under the MIT License - see the LICENSE file for details.
Notes
- The application only shows commits from the last 30 days
- Only public repositories are supported
- GitHub API has rate limiting for unauthenticated requests # git-commit-chart
Metadata
Release files for git-commit-chart 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| git_commit_chart-0.1.4.tar.gz | 15.8 kB | Without provenance | Details for git_commit_chart-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| git_commit_chart-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for git_commit_chart-0.1.4-py3-none-any.whl |
Total release size: 31.7 kB
Release files / git_commit_chart-0.1.4.tar.gz
| Download URL | git_commit_chart-0.1.4.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1de7f7d258e18ca38f920b28e83f91dd66fbb86cbed20fd12b4e47d1f2a4d9c6
|
|
BLAKE2b-256 checksum How to use checksums |
dde256db13c1922eda56b67bd52de6104ed2b5e2ea127b6366707bd009eb2d29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / git_commit_chart-0.1.4-py3-none-any.whl
| Download URL | git_commit_chart-0.1.4-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65bc599ab6622d68720b6cd1e9ad27e14bcf636cbc38647bea697a2886370b1d
|
|
BLAKE2b-256 checksum How to use checksums |
6cd3a29c6fed256849b2969149a998af2c80d76c2f1986fa0dde061f84891d36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for git-commit-chart 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.