Expansion of go-repo.
- Go 1.16 or higher
- GitHub Personal Access Token (Recommended)
- Google Gemini API Key (Required for sentiment analysis)
- Make sure you have Go 1.16 or higher installed
- Ensure your
GOPATH
is set up correctly (usually~/go
on Unix or%USERPROFILE%\go
on Windows) - Add
$GOPATH/bin
to your system'sPATH
environment variable
# Clone the repository
git clone https://github.com/w-nityammm/repo-doc.git
cd repo-doc
# Install the tool
go install
After installation, verify it works by running:
repo-doc version
If repo-doc
command is not found:
- Make sure
$GOPATH/bin
is in your system'sPATH
- On Unix/Linux:
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc source ~/.bashrc
- On Windows:
- Open System Properties > Advanced > Environment Variables
- Add or update the PATH variable to include
%USERPROFILE%\go\bin
To avoid GitHub API rate limits (60 requests/hour for unauthenticated requests), use a GitHub personal access token:
- Create a token at: https://github.com/settings/tokens
- Use it in two ways:
- Pass as a flag:
--token YOUR_TOKEN
or-t YOUR_TOKEN
- Set it as an environment variable:
Or create a# Windows set GITHUB_TOKEN=your_token_here # Linux/macOS export GITHUB_TOKEN=your_token_here
.env
file in the project root:GITHUB_TOKEN=your_token_here
- Pass as a flag:
For sentiment analysis features, you'll need a Google Gemini API key:
- Get an API key from Google AI Studio
- Set it as an environment variable:
Or add it to your
# Windows set GEMINI_API_KEY=your_api_key_here # Linux/macOS export GEMINI_API_KEY=your_api_key_here
.env
file:GEMINI_API_KEY=your_api_key_here
# Using owner/repo
repo-doc info golang/go
# Using full GitHub URL
repo-doc info https://github.com/golang/go
# Show specific number of pull requests (up to 100)
repo-doc info golang/go --prs 15
repo-doc info golang/go -p 15
# Table format (default)
repo-doc info golang/go --format table
repo-doc info golang/go -f table
# JSON format
repo-doc info golang/go --format json
repo-doc info golang/go -f json
View discussion threads from pull requests including comments and reviews:
# Show threads from 5 most recent PRs (default)
repo-doc pr-thread golang/go
# Show threads from specific number of PRs
repo-doc pr-thread golang/go --limit 3
# Using full GitHub URL
repo-doc pr-thread https://github.com/golang/go
Analyze the health of pull requests using sentiment analysis:
# Analyze health of last 5 PRs (default)
repo-doc health golang/go
# Analyze specific number of PRs
repo-doc health golang/go --limit 10
# Using full GitHub URL
repo-doc health https://github.com/golang/go
repo-doc --help
repo-doc info golang/go --prs 2
Example output:
================================================================================
π¦ golang/go
================================================================================
π The Go programming language
β Stars: 128418
π΄ Forks: 18139
π Open Issues: 9359
π» Language: Go
π
Created: 2014-08-19
π Updated: 2025-06-17
================================================================================
π Recent Pull Requests (2)
================================================================================
π’ #74251: net/http: reduce allocs in CrossOriginProtection.Check
π€ jub0bs
π΄ #74249: Victor001 hash patch 1
π€ victor001-hash
repo-doc health golang/go --limit 10
Example output:
π PR Health Report (10 PRs, 42 messages analyzed)
==================================================
π Sentiment Analysis:
β
Positive: 65.0%
π Neutral: 25.0%
β Negative: 10.0%
π Average Sentiment: 0.72/1.0
π¬ Sample Messages:
β
[0.85] This is an excellent contribution! Very clean implementation.
β [0.5] I've left some minor comments for improvement.
β [0.2] Bro what is this $hit.
π₯ Health Assessment:
π Good health - Generally positive discussions
==================================================