Complete command-line interface reference for GitFlow Analytics.
# Simplified syntax (analyze is the default command)
gitflow-analytics [OPTIONS]
# Explicit analyze command (backward compatible)
gitflow-analytics analyze [OPTIONS]Examples:
# Basic analysis with configuration file
gitflow-analytics -c config.yaml
# Analyze last 8 weeks
gitflow-analytics -c config.yaml --weeks 8
# Clear cache and re-analyze
gitflow-analytics -c config.yaml --clear-cache-c, --config PATH- Path to YAML configuration file
--weeks INTEGER- Number of weeks to analyze (default: from config)--clear-cache- Clear analysis cache before running--skip-identity-analysis- Skip automatic identity resolution--validate-only- Validate configuration without running analysis
--format [csv,json,markdown,all]- Output format(s) to generate--output-dir PATH- Override output directory from config--quiet- Suppress progress output--verbose- Enable verbose logging
--version- Show version information--help- Show help message and exit
Run comprehensive repository analysis and generate reports.
gitflow-analytics analyze -c config.yaml [OPTIONS]Options:
- All global options apply
--repositories TEXT- Comma-separated list of repositories to analyze (overrides config)
Examples:
# Analyze specific repositories only
gitflow-analytics analyze -c config.yaml --repositories "repo1,repo2"
# Quick 2-week analysis with JSON output
gitflow-analytics analyze -c config.yaml --weeks 2 --format jsonManage developer identity resolution and consolidation.
gitflow-analytics identities -c config.yaml [OPTIONS]Options:
--interactive- Interactive identity resolution mode--auto-approve- Automatically approve suggested identity mappings--export PATH- Export identity mappings to YAML file--import PATH- Import identity mappings from YAML file
Examples:
# Run interactive identity analysis
gitflow-analytics identities -c config.yaml --interactive
# Export current identity mappings
gitflow-analytics identities -c config.yaml --export identity-mappings.yamlValidate configuration files and system setup.
gitflow-analytics validate -c config.yaml [OPTIONS]Options:
--check-tokens- Validate GitHub API tokens and permissions--check-repos- Verify repository access and cloning--check-ml- Validate ML model availability and setup
Examples:
# Comprehensive validation
gitflow-analytics validate -c config.yaml --check-tokens --check-repos --check-ml
# Quick config validation only
gitflow-analytics validate -c config.yamlManage analysis cache and performance optimization.
gitflow-analytics cache [SUBCOMMAND] [OPTIONS]Subcommands:
clear- Clear all cache databasesstatus- Show cache statistics and disk usageoptimize- Optimize cache databases (VACUUM)
Examples:
# Clear all caches
gitflow-analytics cache clear
# Show cache status
gitflow-analytics cache status
# Optimize cache performance
gitflow-analytics cache optimizeRename a developer's canonical display name in manual mappings.
gitflow-analytics alias-rename -c config.yaml \
--old-name "Current Name" \
--new-name "New Name" \
[OPTIONS]Required Options:
--old-name TEXT- Current canonical name to rename (must exist in manual_mappings)--new-name TEXT- New canonical display name to use in reports
Optional Flags:
--update-cache- Update cached database records with the new name--dry-run- Show what would be changed without applying changes
Examples:
# Preview changes with dry-run
gitflow-analytics alias-rename -c config.yaml \
--old-name "bianco-zaelot" \
--new-name "Emiliozzo Bianco" \
--dry-run
# Apply rename to config file only
gitflow-analytics alias-rename -c config.yaml \
--old-name "bianco-zaelot" \
--new-name "Emiliozzo Bianco"
# Update both config and database cache
gitflow-analytics alias-rename -c config.yaml \
--old-name "bianco-zaelot" \
--new-name "Emiliozzo Bianco" \
--update-cacheWhat It Does:
- Searches
analysis.identity.manual_mappingsfor the old name - Updates the
namefield to the new name - Preserves all other fields (primary_email, aliases)
- Optionally updates
developer_identitiesanddeveloper_aliasestables
Use Cases:
- Fix typos in developer names
- Use preferred names or nicknames
- Update names after marriage or legal name changes
- Standardize name formatting across team
Notes:
- Without
--update-cache, old name persists in cached data until next analysis - Always test with
--dry-runfirst to preview changes - See Managing Aliases Guide for detailed usage
Generates structured data files:
weekly_metrics_YYYYMMDD.csv- Weekly development metricsdevelopers_YYYYMMDD.csv- Developer profiles and statisticssummary_YYYYMMDD.csv- Project-wide summary statisticsuntracked_commits_YYYYMMDD.csv- Commits without ticket references
Generates comprehensive data export:
comprehensive_export_YYYYMMDD.json- Complete analysis data
Generates human-readable reports:
narrative_report_YYYYMMDD.md- Executive summary with insights
Generates all available output formats.
GitFlow Analytics uses standard exit codes:
- 0: Success - Analysis completed successfully
- 1: General error - Configuration or processing error
- 2: Configuration error - Invalid YAML or missing required fields
- 3: Authentication error - Invalid or missing GitHub token
- 4: Repository error - Repository access or cloning failed
- 5: Analysis error - Analysis processing failed
- 6: Output error - Report generation failed
GitFlow Analytics recognizes these environment variables:
GITHUB_TOKEN- GitHub personal access tokenJIRA_ACCESS_USER- JIRA username for API accessJIRA_ACCESS_TOKEN- JIRA API token or password
GITFLOW_CONFIG- Default configuration file pathGITFLOW_CACHE_DIR- Override default cache directoryGITFLOW_LOG_LEVEL- Set logging level (DEBUG, INFO, WARNING, ERROR)
GITFLOW_MAX_WORKERS- Maximum parallel processing workersGITFLOW_BATCH_SIZE- Commit processing batch sizeGITFLOW_TIMEOUT- Network request timeout in seconds
# Quick 1-week analysis for daily standup insights
gitflow-analytics -c config.yaml --weeks 1 --format markdown --quiet# 2-week analysis with comprehensive data
gitflow-analytics -c config.yaml --weeks 2 --format all# 4-week analysis with cache clearing for fresh data
gitflow-analytics -c config.yaml --weeks 4 --clear-cache --format all# 12-week comprehensive analysis
gitflow-analytics -c config.yaml --weeks 12 --format all --verbose# Automated analysis with JSON export for dashboard integration
gitflow-analytics -c config.yaml --weeks 4 --format json --quiet# Override output directory
gitflow-analytics -c config.yaml --output-dir /custom/reports/
# Analyze subset of repositories
gitflow-analytics -c config.yaml --repositories "critical-repo,main-app"# Use cached analysis for faster reporting
gitflow-analytics -c config.yaml --weeks 8
# Clear cache for fresh analysis (slower but current)
gitflow-analytics -c config.yaml --weeks 8 --clear-cache# Verbose output for debugging
gitflow-analytics -c config.yaml --verbose
# Validate configuration before running
gitflow-analytics validate -c config.yaml --check-tokens --check-repos
# Test configuration without full analysis
gitflow-analytics -c config.yaml --validate-only# Ensure GitFlow Analytics is installed and in PATH
pip show gitflow-analytics
which gitflow-analytics
# Install if missing
pip install gitflow-analytics# Provide absolute path to configuration
gitflow-analytics -c /full/path/to/config.yaml
# Check current directory for config file
ls -la *.yaml# Check token is set correctly
echo $GITHUB_TOKEN
# Validate token has necessary permissions
gitflow-analytics validate -c config.yaml --check-tokens# Verify repository names and permissions
gitflow-analytics validate -c config.yaml --check-repos
# Check GitHub token has access to repositories- Configuration Guide - Complete YAML configuration reference
- Getting Started - Installation and first steps
- Troubleshooting - Common issues and solutions
- Examples - Real-world usage scenarios
# Add to your .bashrc or .zshrc
alias gfa='gitflow-analytics'
alias gfa-weekly='gitflow-analytics -c config.yaml --weeks 1'
alias gfa-monthly='gitflow-analytics -c config.yaml --weeks 4 --clear-cache'
alias gfa-validate='gitflow-analytics validate -c config.yaml --check-all'GitFlow Analytics supports bash completion for commands and options:
# Enable bash completion (if supported)
eval "$(_GITFLOW_ANALYTICS_COMPLETE=bash_source gitflow-analytics)"