A local page listing every repository you starred on GitHub, with a topic, its star count and how alive it is (date of the last commit on the default branch). You can search, filter, sort, edit the topic and add notes.
- Node.js 20 or later. No dependencies to install.
- The GitHub CLI, logged in (
gh auth login). Its token is used to call the GitHub API; setGITHUB_TOKENto use another token instead.
npm start # start the server on http://127.0.0.1:7178 and open the page
npm run refresh # fetch all stars into the cache, without the pageRunning npm start again while the server runs just opens the page. To get a
github-stars command available everywhere, run npm link once.
Nothing is stored in this repository.
| File | Content |
|---|---|
~/.cache/github-stars/stars.json |
Your stars as last fetched from GitHub. Safe to delete. |
~/.local/share/github-stars/edits.json |
Your Topic and Notes edits. |
~/.local/share/github-stars/lists.json |
Optional: former GitHub star lists, { "List name": ["owner/repo"] }. Shown in the "Former lists" column. |
XDG_CACHE_HOME and XDG_DATA_HOME are honoured, and GITHUB_STARS_CACHE_DIR /
GITHUB_STARS_DATA_DIR override the folders. PORT changes the port.
- The page shows the cached stars right away. On the very first run there is no cache, so it waits for a full fetch (about a minute for 2,000 stars).
- It then asks the server to check GitHub. One small query compares your star count and most recent star with the cache.
- If they differ, or the cache is more than a day old (star counts and commit dates drift), the server fetches everything again and the page updates, saying which repositories were starred or unstarred.
The Refresh button forces a full fetch.
Topics are guessed from each repository's GitHub topics, then from words in its name
and description (rules in src/rows.js). Anything unmatched is
"Other"; your edits always win over the guess.
npm test| File | Role |
|---|---|
src/server.js |
HTTP server, cache check and refresh, CLI flags |
src/github.js |
GraphQL queries through the GitHub CLI's token |
src/rows.js |
Topic guessing, former lists, diff between two fetches |
src/store.js |
Cache and data folders, JSON read/write |
public/index.html |
The page (no build step; reload the browser after editing) |