A toolkit for fetching and displaying GitHub Trending Weekly repositories, featuring both a Node.js CLI script and a modern React web tool.
- Node.js Script: Fetches top 20 trending GitHub repositories created in the last week, saves data as Markdown, JSON, and CSV. Can be automated via cron.
- Web Tool (React + Ant Design): Interactive web UI for fetching, viewing, selecting, exporting, and copying trending repositories. Customizable fields and export formats.
- Install dependencies
npm install
- Start the development server
npm run dev
- Open your browser Visit http://localhost:5173
npm run build
- Set up your environment
- Create a
.env
file in the project root:GITHUB_TOKEN=your_github_token
- Create a
- Run the script manually
node index.js
- Trending data will be saved in the
docs/
directory as Markdown, JSON, and CSV files.
- Trending data will be saved in the
- (Optional) Automate with cron
- Set up a cron job to run the script daily for automated trending data collection.
- Node.js (CLI script)
- React 18, Ant Design 5, Vite (Web Tool)
- axios, file-saver, papaparse, react-copy-to-clipboard
index.js
— Node.js trending fetcher scriptsrc/components
— Web tool UI componentssrc/api
— Web tool API logicsrc/utils
— Utility functions (if needed)src/App.jsx
— Web tool main layoutdocs/
— Output directory for trending data (Node.js script)
- GitHub Token: Both the script and web tool require a GitHub Personal Access Token to avoid rate limits.
- Web Tool: Use the left panel to input your token and select fields. The right panel displays and exports data.
- Node.js Script: Outputs Markdown, JSON, and CSV files for archival or further processing.
- Web Tool: Edit
src/components/AttributeSelector.jsx
to change selectable fields. Extendsrc/api/github.js
for more API logic. - Node.js Script: Edit
index.js
to change output formats or fields.
Github-Trending is available as open source under the terms of the MIT License.