This guide walks you through installing GitFlow Analytics and setting up the basic requirements.
# Install the latest stable version
pip install gitflow-analytics
# Or install with pipx (recommended for CLI tools)
pipx install gitflow-analytics
# Verify installation
gitflow-analytics --version# Install latest development version
pip install git+https://github.com/bobmatnyc/gitflow-analytics.git
# Or clone and install locally
git clone https://github.com/bobmatnyc/gitflow-analytics.git
cd gitflow-analytics
pip install -e ".[dev]"- Python 3.9 or higher (3.11+ recommended)
- Check your version:
python --version
- ✅ Linux (Ubuntu 18.04+, CentOS 7+)
- ✅ macOS (10.14+)
- ✅ Windows (10+, PowerShell or WSL recommended)
- 4GB+ RAM (8GB+ recommended for large repositories)
- 2GB+ disk space for dependencies and cache
- Git 2.20+ for repository analysis
GitFlow Analytics will automatically install required dependencies:
PyGitHub- GitHub API integrationGitPython- Git repository analysispandas- Data processingpyyaml- Configuration handlingrich- Beautiful terminal outputclick- Command-line interface
-
Create a GitHub Token:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click "Generate new token (classic)"
- Select scopes:
repo,read:org(for organization analysis) - Copy the generated token
-
Set Environment Variable:
# Option 1: Set in your shell profile (.bashrc, .zshrc, etc.) export GITHUB_TOKEN="ghp_your_token_here" # Option 2: Create a .env file (recommended) echo "GITHUB_TOKEN=ghp_your_token_here" > .env
-
Verify Token:
# Test GitHub API access curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
GitFlow Analytics supports multiple project management platforms for enhanced ticket tracking:
- JIRA - Enterprise project management
- Linear - Modern issue tracking
- ClickUp - All-in-one productivity
- GitHub Issues - Native GitHub integration (auto-configured with GitHub token)
Quick Setup: Use the interactive launcher:
gitflow-analytics launcherSelect Profile 1 (Standard) and choose which PM platforms to configure.
Manual Setup: See the PM Platform Setup Guide for detailed instructions on obtaining and configuring credentials for each platform.
# Check version
gitflow-analytics --version
# View help
gitflow-analytics --help
# Test with a public repository (no token required)
gitflow-analytics --help analyze# Create a test configuration
cat > test-config.yaml << EOF
github:
token: "${GITHUB_TOKEN}"
repositories:
- owner: "octocat"
name: "Hello-World"
local_path: "./test-repo"
EOF
# Run a quick test analysis (this will clone Hello-World repo)
gitflow-analytics -c test-config.yaml --weeks 4 --validate-onlyIf you want to use machine learning categorization features:
# Install spaCy language model
python -m spacy download en_core_web_sm
# Verify spaCy installation
python -c "import spacy; print('spaCy installed successfully')"Set up a clean workspace:
# Create project directory
mkdir gitflow-analysis
cd gitflow-analysis
# Create subdirectories
mkdir config repos reports cache
# Your structure should look like:
# gitflow-analysis/
# ├── config/ # Configuration files
# ├── repos/ # Cloned repositories
# ├── reports/ # Generated reports
# └── cache/ # Analysis cache"Command not found: gitflow-analytics"
# If installed with pip, ensure pip binary location is in PATH
python -m pip show gitflow-analytics
# If installed with pipx, ensure pipx bin directory is in PATH
pipx list"Permission denied" errors
# On Unix systems, you might need to adjust permissions
chmod +x ~/.local/bin/gitflow-analytics
# Or install with --user flag
pip install --user gitflow-analytics"GitHub API rate limit exceeded"
- Ensure your GitHub token is set correctly
- Authenticated requests have higher rate limits (5000/hour vs 60/hour)
"SSL Certificate verification failed"
# Corporate networks might need certificate verification disabled
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org gitflow-analytics"dyld: Library not loaded" (macOS) or broken pipx installation
# This error occurs when Homebrew upgrades Python, breaking pipx virtual environments
# The error typically shows: "Library not loaded: /opt/homebrew/Cellar/python@3.12..."
# Solution 1: Recreate the pipx virtual environment (recommended)
pipx uninstall gitflow-analytics
pipx install gitflow-analytics
# Solution 2: If uninstall fails, force reinstall all pipx packages
pipx reinstall-all
# Solution 3: Manual cleanup if the above fail
rm -rf ~/.local/pipx/venvs/gitflow-analytics
rm -rf ~/.local/pipx/shared
pipx install gitflow-analytics
# Explanation: When Homebrew upgrades Python (e.g., 3.12.11_1 → 3.12.12),
# existing pipx virtual environments still reference the old Python version,
# causing dynamic library loading failures. Recreating the venv fixes this."No module named 'git'"
# Ensure Git is installed and accessible
git --version
# On Ubuntu/Debian
sudo apt-get install git
# On macOS with Homebrew
brew install gitspaCy model download fails
# Download model manually
python -m spacy download en_core_web_sm
# Or download alternative model
python -m spacy download en_core_web_mdWindows Users:
- Use PowerShell or Windows Subsystem for Linux (WSL)
- Ensure Python is in your PATH
- Use forward slashes in paths:
./repos/projectnot.\\repos\\project
macOS Users:
- You might need to install Xcode command line tools:
xcode-select --install - Consider using Homebrew for Python:
brew install python
Linux Users:
- Some distributions require separate
python3-devpackage - Ubuntu/Debian:
sudo apt-get install python3-dev - CentOS/RHEL:
sudo yum install python3-devel
You're ready to move on to the Quick Start Tutorial.
If you encountered any issues, please check our Troubleshooting Guide or file an issue.
- Quick Start Tutorial - 5-minute walkthrough
- Your First Analysis - Run your first repository analysis
- Configuration Guide - Learn about advanced configuration options