Skip to content
nerdstepPublic

About

Organize, prune and rediscover your GitHub stars. Runs on your own Cloudflare account.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StarTune: bring your stars into focus

StarTune sorts your GitHub stars into GitHub Lists, clears out the dead ones, shows what's taking off, finds the gems you forgot about, and tracks how your own repos are doing.

StarTune runs entirely on your own Cloudflare account: a single Worker with D1 for storage, Workers AI (Clef) for suggestions, and a daily cron for trending data.

StarTune's Overview: every star as a point in a 3D field, by year starred, popularity and how recently it was pushed, coloured by health class, beside readouts and a health-by-class panel

The Overview, shown with the built-in demo data.

Deploy to Cloudflare

Want to look around first? Run it locally and pick Explore with demo data, which starts where a new user does, with the first sync, or open /?demo=1 to go straight to a full library (/?demo=1&empty=1 replays the first sync). The demo uses generated sample data and never touches GitHub.

What it does

Overview Your stars as a 3D field you can turn by hand: when you starred each repo, how popular it is, and how recently it was pushed, colored by health class. Readouts for stars, Lists coverage, likely cruft, and growth this week; health by class; what's brightening; forgotten gems.
Stars Fast, virtualized library with search, list, language, health, and year filters. Shift-click range selection; bulk add to lists, keep, or unstar.
Triage A swipeable, keyboard-driven card deck (← unstar · → keep · A accept Clef's list · S snooze · J skip). Three queues: Cruft, Unlisted, and Rediscover.
Star map The full-page field. Drag or use the arrow keys to orbit, [ and ] to step through stars, color by health or language, and hide a class or language from the legend. A flat 2D view with zoom and pan is one toggle away. Click or press Enter to open a repo.
Trending Your stars ranked by 7- or 30-day growth (from daily snapshots), with a momentum plot whose pace trails show what's speeding up or slowing down. Plus fresh releases, and Discover: new repos in your most-starred topics.
Lists Create, edit, and delete GitHub Lists. List ideas come from topics shared by unlisted repos. Sort with Clef classifies unlisted repos and lets you apply its confident picks in bulk.
Your repos The public repos you own (forks behind a toggle): star history for each, 7- and 30-day growth, and weekly bars. What's waiting on you (PRs from others, issues without a reply) and what's worth a look (dormant repos still gaining stars, unreleased work, archive candidates, a missing description, license, or topics). Your latest and most-followed stargazers, and what they also star.
Safety Every unstar can be undone (from the toast or Settings), and the repo's lists come back too. JSON export is available.

How health is classed

Every repo gets a health class from the last commit on its default branch, named after star classes: O/B thriving (pushed in the last 3 months), A/F active (the last year), G quiet (1 to 3 years), K dormant (3+ years), and M archived. The class shows as a color and a letter wherever the repo appears. Pushes to other branches don't count: GitHub's own "pushed" date includes bot branches such as Dependabot's, which make long-abandoned repos look recently active.

How cruft is scored

Rules (archived; description says deprecated or moved; years since the last push; fork; small and inactive) give a probability, which is discounted when the repo still ships releases. When Clef has looked at a repo, its yes/no probability is blended in (55%). You can see the reasons on every card. Repos you own are never counted as cruft.

How star history is charted

GitHub doesn't keep a repo's star count over time, so Your repos rebuilds it from the stargazer list. The newest 100 stars are exact. For older ones, StarTune reads every page when a repo has up to about 1,000 stars and samples 9 pages across the rest for bigger ones; sampled stretches are marked ≈. GitHub only serves a repo's first 40,000 stargazers, so for bigger repos the stretch between those and the newest 100 is drawn as a straight line. Your repo list refreshes when you open the page and it's more than 6 hours old, and a chart less than a week old is extended with just the new stars.

How Clef is used

Each Workers AI request asks Clef up to 64 typed questions. For each of ~32 repos it asks two:

  • a choice question: which of your lists fits (or none);
  • a noul (yes/no) question: is this repo likely cruft?

Output tokens aren't billed, so classifying a thousand stars costs very little and often fits in the Workers AI free tier. Set CLEF_MODEL=clef to use the larger model.

Deploy

One click

  1. Create a GitHub OAuth app at github.com/settings/developers.
    • Homepage URL: https://startune.<your-subdomain>.workers.dev
    • Callback URL: https://startune.<your-subdomain>.workers.dev/auth/callback
    • Leave Expire user access tokens checked. StarTune refreshes the 8-hour tokens itself, so a leaked token stops working within hours.
  2. Click Deploy to Cloudflare above. It forks the repo, creates the D1 database, and asks for:
    • GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET: from step 1. If you'd rather sign in with a personal access token, enter none for both.
    • SESSION_SECRET: any long random string (openssl rand -base64 32).
    • ALLOWED_USERS: your GitHub username. Only these accounts can sign in; comma-separate several (alice,bob) to let others in.
  3. Open the Worker URL and sign in.

Manually

The project uses Bun for installs and scripts.

bun install
bunx wrangler login
bunx wrangler secret put GITHUB_CLIENT_ID
bunx wrangler secret put GITHUB_CLIENT_SECRET
bunx wrangler secret put SESSION_SECRET
bunx wrangler secret put ALLOWED_USERS     # your GitHub username
bun run deploy   # build → deploy (auto-provisions D1) → apply migrations

Signing in with a token

If you sign in with a classic personal access token, it needs the user and public_repo scopes. GitHub requires public_repo for starring and unstarring, and user for Lists (its UserList mutations need it, and nothing narrower works). user also lets an app edit your profile; StarTune only uses it for Lists.

Organizations that restrict OAuth apps: some organizations block third-party OAuth apps from changing their repos, so starring or unstarring those repos through an OAuth sign-in fails. StarTune says which organization and offers to open the repo on GitHub. A classic personal access token isn't affected.

Configuration

Name Kind Default
GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET secret — OAuth app credentials, or none
SESSION_SECRET secret — Encrypts GitHub tokens at rest (AES-GCM, HKDF). Changing it signs everyone out.
ALLOWED_USERS secret — Comma-separated GitHub logins allowed to sign in. Required: with it unset, nobody new can sign in (except in local development). Removing a login signs it out.
CLEF_MODEL var clef-flash clef-flash or clef
GITHUB_SCOPES var user public_repo OAuth scopes requested at sign-in

The cron (17 9 * * * UTC) refreshes repo metadata and records a star-count snapshot for up to 3,000 repos per run, your stars and your own repos together, oldest-fetched first. That keeps it under the Workers free-plan subrequest limit. Trending starts working once there are a few days of snapshots; until then, it falls back to stars per day since each repo was created.

Local development

Needs Bun (bun install first).

cp .dev.vars.example .dev.vars          # set SESSION_SECRET; "none" for OAuth is fine locally
bun run db:migrate:local
bun run dev                              # Workers AI is remote, so this needs `wrangler login`
CF_LOCAL_ONLY=1 bun run dev              # fully offline (Clef calls will fail)
bun run seed:local                       # fake signed-in user; cookie st_session=local-test-session-cookie
bunx playwright install chromium         # once, for the browser tests
bun run test                             # vitest: unit tests, plus component tests in headless Chromium
bun run test:unit                        # unit tests only: scoring, own-repo rules, Clef request building, crypto
bun run lint                             # typecheck, oxfmt check, oxlint (+ type-aware rules), markdownlint
bun run lint:md                          # markdownlint only
bun run lint:fix                         # oxlint fixes, oxfmt, markdownlint fixes

Formatting is oxfmt and linting is Oxlint with the @shadcn/lint design-token rules; VS Code applies both on save with the recommended Oxc extension. Markdown is checked by markdownlint, with rules in .markdownlint.jsonc that the recommended markdownlint extension also reads.

Architecture

worker/        Hono API on Workers
  auth.ts      GitHub OAuth + PAT sign-in, sessions (hashed ids), encrypted tokens
  github.ts    GraphQL + REST: stars, lists (UserList), mutations, topic search, your repos, star history
  api.ts       /api/*: library, client-driven sync, lists, unstar/restar, review, Clef, discover, export, your repos (/mine)
  ai.ts        Clef request builder/parser (64-question batches)
  cron.ts      daily metadata refresh + snapshots + cleanup
  db.ts        D1 queries
shared/        zod schemas + pure scoring (health, cruft, growth, rediscover, list ideas, your-repo signals)
src/           React 19 + TanStack Router/Query/Virtual + shadcn/ui on Base UI + Tailwind v4
migrations/    D1 schema
brand/         logo files and the script that generates them
docs/          README screenshot

The browser calls the Worker through Hono's typed RPC client, so each request and response type comes straight from its route in worker/, and request bodies are validated with the zod schemas in shared/.

Sync is driven by the client: the browser calls /api/sync page by page, 100 stars per request. That way even a library of 10k stars never runs into Worker CPU or subrequest limits, and you get a live progress bar. A star that GitHub no longer reports is removed at the end of a full sync.

Chart colors come from a palette validated for color-vision deficiency on the dark surface (see src/lib/palette.ts). Colors are never the only signal: every chart has a legend, labels, and hover tooltips, health colors always come with a class letter, and the star map also uses hollow and faded marks.

License

MIT

About

Organize, prune and rediscover your GitHub stars. Runs on your own Cloudflare account.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages