GitInsight is a CLI tool to analyze Git repositories and provide insights like commit frequency, contributor stats, and more.
- Commit frequency over time.
- Contributor statistics.
- Commit activity by hour of the day.
pip install -r requirements.txtgitinsight /path/to/repo --commit-frequency --contributor-stats --active-hoursContributor Commits
John Doe 10
Jane Smith 5
MIT
Run the CLI tool to analyze a Git repository:
gitinsight /path/to/repo --commit-frequency --contributor-stats --active-hoursSince you’re developing the package locally, you need to install it in "editable" mode. This allows you to make changes to the code without reinstalling it.
-
Navigate to the root of your
GitInsightproject (wheresetup.pyis located). -
Run the following command to install the package in editable mode:
pip install -e .This will install
GitInsightand make thegitinsightcommand available in your terminal.
After installing, verify that the gitinsight command is available:
which gitinsightThis should output the path to the gitinsight executable, e.g., /path/to/venv/bin/gitinsight.
Now you can run the gitinsight command:
gitinsight . --commit-frequency --contributor-stats --active-hoursIf the command is still not found, follow these steps:
-
Check
setup.py: Ensure that theentry_pointssection insetup.pyis correctly defined:entry_points={ 'console_scripts': [ 'gitinsight=gitinsight.cli:analyze', ], },
-
Reinstall the Package: Uninstall and reinstall the package:
pip uninstall GitInsight pip install -e . -
Check Your Virtual Environment: Ensure that your virtual environment is activated:
source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Check
PATH: Ensure that your virtual environment’sbin(orScriptson Windows) directory is in yourPATH. You can check this by running:echo $PATH
If the path to your virtual environment is missing, activate it again.
If everything is set up correctly, you can now test GitInsight on a Git repository. For example:
gitinsight /path/to/your/repo --commit-frequency --contributor-stats --active-hoursIf you run the command on a repository, you should see:
- A plot for commit frequency over time.
- A table of contributor statistics.
- A bar chart for commit activity by hour of the day.

