A CLI tool to fetch and track GitHub release tags from repositories. Built with Go, featuring a plugin-based architecture for extensibility.
- Single Repository: Fetch the latest release tag for a specific repository
- Bulk Operations: Process multiple repositories from a file
- Flexible Output: Support for text (default) and JSON formats
- Plugin Architecture: Easily extensible with new commands
- No Database: Always fetches fresh data from GitHub API
- Concurrent Processing: Bulk operations process repositories concurrently
go build -o githubrel ./cmd/githubrelgo install github.com/vosiander/github-releases/cmd/githubrel@latestSet your GitHub token as an environment variable for higher API rate limits:
export GITHUB_TOKEN=your_token_hereWithout a token, you're limited to 60 requests per hour. With authentication, you get 5,000 requests per hour.
Fetch the latest release tag for a single repository:
# Text output (default)
githubrel get owner/repo
# JSON output
githubrel get owner/repo --output jsonExamples:
$ githubrel get spf13/cobra
v1.10.1
$ githubrel get spf13/cobra --output json
{
"repository": "spf13/cobra",
"tag_name": "v1.10.1",
"name": "v1.10.1",
"html_url": "https://github.com/spf13/cobra/releases/tag/v1.10.1",
"published_at": "2025-09-01T16:32:42Z"
}Process multiple repositories from a file:
# Text output (default)
githubrel bulk-get repos.txt
# JSON output
githubrel bulk-get repos.txt --output jsonFile Format:
Create a text file with one repository per line:
# repos.txt - Comments start with #
owner/repo1
owner/repo2
another-owner/repo3
Examples:
$ cat repos.txt
spf13/cobra
google/go-github
$ githubrel bulk-get repos.txt
spf13/cobra: v1.10.1
google/go-github: v76.0.0
$ githubrel bulk-get repos.txt --output json
[
{
"repository": "spf13/cobra",
"tag": "v1.10.1"
},
{
"repository": "google/go-github",
"tag": "v76.0.0"
}
]Compare historical versions with current releases to identify updates:
# Text output (default)
githubrel history history.txt
# JSON output
githubrel history history.txt --output jsonFile Format:
Create a text file with repository:version pairs (one per line):
# history.txt - Comments start with #
owner/repo1:v1.0.0
owner/repo2:v2.5.1
another-owner/repo3:v0.8.0
Examples:
$ cat history.txt
spf13/cobra:v1.10.0
google/go-github:v75.0.0
$ githubrel history history.txt
spf13/cobra: v1.10.0 -> v1.10.1 (UPDATE AVAILABLE)
google/go-github: v75.0.0 -> v76.0.0 (UPDATE AVAILABLE)
$ githubrel history history.txt --output json
[
{
"repository": "spf13/cobra",
"historical_version": "v1.10.0",
"current_version": "v1.10.1",
"has_update": true
},
{
"repository": "google/go-github",
"historical_version": "v75.0.0",
"current_version": "v76.0.0",
"has_update": true
}
]# Show version
githubrel version
# Show help
githubrel --help
githubrel get --help
githubrel bulk-get --helpThe tool uses a plugin-based architecture where each command is implemented as a plugin. This makes it easy to add new commands without modifying the core CLI framework.
Plugin Interface:
type Plugin interface {
Name() string
Description() string
Execute(args []string, outputFormat string) error
}Available Plugins:
get: Fetch latest release for a single repositorybulk-get: Process multiple repositories from a filehistory: Compare historical versions with current releases
githubrel/
├── cmd/githubrel/ # CLI entry point
│ └── main.go
├── pkg/github/ # GitHub API client
│ ├── client.go
│ ├── types.go
│ └── client_test.go
├── plugins/ # Plugin system
│ ├── plugin.go # Plugin interface
│ ├── registry.go # Plugin registry
│ ├── get/ # Get plugin
│ │ └── get.go
│ └── bulk/ # Bulk-get plugin
│ └── bulk.go
├── internal/output/ # Output formatting
│ ├── formatter.go
│ ├── types.go
│ └── formatter_test.go
└── testdata/ # Test data
└── repos.txt
- Go 1.21 or later
- GitHub personal access token (optional, for higher rate limits)
github.com/google/go-github/v58- GitHub API clientgithub.com/spf13/cobra- CLI frameworkgolang.org/x/oauth2- OAuth2 authentication
# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run tests with race detection
go test -race ./...# Build for current platform
go build -o githubrel ./cmd/githubrel
# Build for specific platforms
GOOS=linux GOARCH=amd64 go build -o githubrel-linux-amd64 ./cmd/githubrel
GOOS=darwin GOARCH=arm64 go build -o githubrel-darwin-arm64 ./cmd/githubrel
GOOS=windows GOARCH=amd64 go build -o githubrel-windows-amd64.exe ./cmd/githubrelThe tool provides clear error messages for common scenarios:
- Invalid repository format: Repository must be in
owner/repoformat - Repository not found: HTTP 404 errors from GitHub API
- Rate limit exceeded: Suggests setting
GITHUB_TOKENenvironment variable - File not found: Clear message when bulk-get file doesn't exist
- No releases: Repositories without releases show appropriate error
MIT License - see LICENSE file for details.
Contributions are welcome! To add a new plugin:
- Create a new package under
plugins/ - Implement the
Plugininterface - Register the plugin in
cmd/githubrel/main.go - Add tests for the new functionality
To create a new release with pre-built binaries:
- Create and push a git tag:
git tag v1.0.0
git push origin v1.0.0- GitHub Actions will automatically:
- Build binaries for multiple platforms (Linux, macOS, Windows)
- Support multiple architectures (amd64, arm64, arm)
- Generate SHA256 checksums for each binary
- Create a GitHub release with all artifacts
- Include auto-generated release notes
The release workflow builds the following binaries:
githubrel-linux-amd64githubrel-linux-arm64githubrel-linux-armv7githubrel-darwin-amd64(Intel Mac)githubrel-darwin-arm64(Apple Silicon)githubrel-windows-amd64.exegithubrel-windows-arm64.exe
Each binary includes a .sha256 file for integrity verification.
- Complete rewrite from Python to Go
- Plugin-based architecture
- Concurrent bulk processing
- JSON and text output formats
- No database dependencies
- Comprehensive error handling
- Automated release builds for multiple platforms