npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

gh-explorer

v1.0.2

Published

AI-powered CLI tool for analyzing GitHub trending repositories and URL metadata

Readme

GhExplorer

AI-powered CLI tool for analyzing GitHub trending repositories and URL metadata

NPM Version License

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.

🚀 Core Features

  • 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

📦 Installation

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

📝 Usage

GitHub Trending

# 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

URL Analysis

# 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

🛠️ Configuration

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
  }
}

AI Configuration

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

🗺️ Roadmap

  • [x] Project structure with tsup
  • [x] GitHub trending page scraper
  • [x] URL metadata extraction service
  • [x] AI integration with multiple LLM providers
  • [x] CLI interface with Commander.js
  • [x] Multiple output formats (JSON, Table, Markdown)
  • [x] Configuration file support
  • [x] Caching system
  • [x] Documentation
  • [ ] Repository comparison
  • [ ] Cross-platform notifications
  • [ ] Historical trends tracking
  • [ ] Developer analytics
  • [ ] Custom trend detection algorithms

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork it
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

🙏 Acknowledgments


Development

git clone https://github.com/zjy365/gh-explorer.git
cd gh-explorer

pnpm install

pnpm run build

pnpm test

API Usage

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)