@knicola/gh-trends
v0.1.0
Published
Fetch trending GitHub repositories.
Maintainers
Readme
GitHub Trends
Fetch trending GitHub repositories.
CLI
Installation
npm install -g @knicola/gh-trendsUsage
$ gh-trends --help
GitHub Trends CLI
Usage: gh-trends [options]
Options:
-l, --language <lang> Programming language (default: all languages)
-p, --period <period> Time period: daily, weekly, or monthly (default: daily)
-s, --spokenLanguage <code> Spoken language code (default: all languages)
--json Output in JSON format
-h, --help Show this help
Examples:
gh-trends # All languages, default period
gh-trends --language javascript # JavaScript only, default period
gh-trends --period weekly # All languages, weekly
gh-trends -l python -p monthly -s en # Python, monthly, English
gh-trends --json # Output in JSON formatAPI
Installation
npm install @knicola/gh-trendsUsage
import { fetchGitHubTrends } from '@knicola/gh-trends'
const repos = await fetchGitHubTrends({
language: 'javascript',
period: 'weekly',
spokenLanguageCode: 'en'
})
repos.forEach(repo => {
console.log(`${repo.author}/${repo.name}`)
console.log(`Stars: ${repo.stars} (+${repo.newStars} this week)`)
console.log(`Language: ${repo.language}`)
console.log(`URL: ${repo.url}`)
})Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/your-feature. - Make your changes and ensure tests pass.
- Run
npm run lint:fixandnpm run format:fixto format code. - Commit your changes:
git commit -m "Add your feature". - Push to your branch:
git push origin feature/your-feature. - Open a pull request.
Please ensure your code adheres to the project's style guidelines and includes appropriate documentation.
Disclaimer
This tool scrapes public data from GitHub. Ensure compliance with GitHub's terms of service and rate limits. Use responsibly.
License
This project is open-sourced software licensed under the MIT license.
