GitHub organization analytics CLI - Analyze PR cycle times and identify bottlenecks.
npm install -g gh-analytics# Download from https://github.com/eylulsenakumral/github-org-analyzer-cli/releases
# Then install locally
npm install -g ./gh-analytics-*.tgz- GitHub CLI installed and authenticated (
gh auth login) - Node.js 18+
gh-analytics pr-cycle-time --org=vercel --days=30gh-analytics pr-cycle-time --org=vercel --repo=vercel/next.js --days=30gh-analytics pr-cycle-time --org=facebook --days=7 --limit=50The command displays:
- Total PRs analyzed - Number of PRs in the time period
- Average cycle time - Mean time from PR creation to merge
- Breakdown by stage - Time spent in each stage:
- First response - Time to first reviewer comment
- Review time - Time from first response to merge
- Merge time - Time from approval to merge
- Bottleneck - Stage with the longest average time
- Top 5 stuck PRs - PRs with longest cycle times
# Install dependencies
npm install
# Build
npm run build
# Run locally (dev mode - uses TypeScript source)
npm run dev pr-cycle-time --org=vercel --days=30
# Or run after build (uses compiled JS)
npm run build && node ./bin/run pr-cycle-time --org=vercel --days=30
# Publish
npm publishMIT