AI-powered CLI tool for analyzing GitHub trending repositories and URL metadata
GhExplorer combines the power of AI with web scraping to give developers meaningful insights about URLs and GitHub repositories. Whether you need to quickly understand what a project is about or stay updated with trending repositories in your favorite technologies, GhExplorer simplifies the process through a clean CLI interface.
- GitHub Trends: Track trending repositories by language, time period, and topics
- URL Analysis: Extract metadata from any URL with optional AI-powered insights
- Multiple Output Formats: Support for JSON, Table, and Markdown formats
- Intelligent Filtering: Focus on repositories relevant to your interests
- AI-Powered Analysis: Generate summaries, extract key points, and categorize content
npm install -g gh-explorer
pnpm add -g gh-explorer
# Or with yarn
yarn global add gh-explorer
# Or use npx without installing
npx gh-explorer
# View today's trending repositories
gh-explorer
# Using npx
npx gh-explorer
# Filter by language and time period
gh-explorer trending --language javascript --since weekly
npx gh-explorer trending --language javascript --since weekly
# Get top 10 repositories only
gh-explorer trending --limit 10
# Focus on specific topics
gh-explorer trending --topics "machine-learning,ai"
# Save as markdown
gh-explorer trending --format markdown --output trends.md
# Basic URL analysis
gh-explorer url https://github.com/tj/commander.js
npx gh-explorer url https://github.com/tj/commander.js
# Get markdown output
gh-explorer url https://github.com/tj/commander.js --format markdown
# Save analysis to file
gh-explorer url https://github.com/tj/commander.js --output commander-analysis.json
# Deep analysis with AI enhancement
gh-explorer url https://github.com/tj/commander.js --depth deep --ai
GhExplorer supports a configuration file at ~/.gh-explorer/config.json
where you can set defaults:
{
"github": {
"defaultPeriod": "daily",
"defaultLimit": 25
},
"output": {
"defaultFormat": "table",
"colorEnabled": true
},
"ai": {
"enabled": true,
"apiKey": "your-api-key",
"baseURL": "https://api.openai.com/v1",
"defaultModel": "gpt-4o-mini",
"summaryLength": "medium"
},
"cache": {
"enabled": true,
"ttl": 3600,
"maxSize": 100
}
}
To use AI features, you need to set your OpenAI API key and enable AI:
# Set your OpenAI API key
gh-explorer config set ai.apiKey YOUR_API_KEY
# Enable AI features
gh-explorer config set ai.enabled true
# Optional: Set custom API endpoint
gh-explorer config set ai.baseURL https://your-api-endpoint
- Project structure with tsup
- GitHub trending page scraper
- URL metadata extraction service
- AI integration with multiple LLM providers
- CLI interface with Commander.js
- Multiple output formats (JSON, Table, Markdown)
- Configuration file support
- Caching system
- Documentation
- Repository comparison
- Cross-platform notifications
- Historical trends tracking
- Developer analytics
- Custom trend detection algorithms
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork it
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Built with Commander.js, Cheerio, Chalk, and Ora
- AI capabilities powered by Vercel AI SDK
git clone https://github.com/zjy365/gh-explorer.git
cd gh-explorer
pnpm install
pnpm run build
pnpm test
import { ghExplorer, ghExplorerFormatted, ghExplorerEnriched } from 'gh-explorer'
// Get trending repos as objects
const repos = await ghExplorer({ language: 'typescript', since: 'weekly' })
console.log(repos)
// Get formatted output
const markdown = await ghExplorerFormatted({ language: 'typescript' }, 'markdown')
console.log(markdown)
// Get repos with AI analysis
const enrichedRepos = await ghExplorerEnriched({ language: 'typescript' })
console.log(enrichedRepos)