Sync your GitHub starred repos into a Notion database. Every starred repo becomes a Notion page with rich metadata (description, stars, topics, languages, license, owner avatar) and the README rendered into the page body — fully searchable inside Notion. A daily delta sync picks up newly-starred repos automatically.
The worker also exposes two tools so a Notion AI agent can star and unstar repos on your behalf — useful for prompts like "unstar every archived repo" or "unstar all repos from owner X".
Runs on Notion Workers — no server, no cron.
Install the Notion CLI:
curl -fsSL https://ntn.dev | bashntn loginClone and run setup:
git clone https://github.com/brianlovin/github-stars-notion-sync.gitcd github-stars-notion-sync && npm install && npm run setupSetup asks for a Notion Personal Access Token, walks you through registering a GitHub OAuth app, creates the GitHub Stars database (with views for All Repos / Active / Archived / By Owner / By Language), deploys the worker, then runs an initial backfill of every starred repo.
For the GitHub OAuth app at github.com/settings/applications/new, the only field that matters is the Authorization callback URL: https://www.notion.so/workers/oauth/callback.
After deploy, two tools are available to any Notion AI agent connected to the worker:
- Star a GitHub repository — adds a star
- Unstar a GitHub repository — removes a star
Pair the agent with the GitHub Stars database and try prompts like:
- "Unstar every repo where Archived is true."
- "Unstar all repos from owner {owner}."
- "Star {owner/repo}."
The agent finds candidates in Notion and calls the tools. Each action goes through GitHub's API using the same OAuth grant the sync uses.
npm run backfill # idempotent full re-sync
npm run dedup # archive duplicate rows (recovery only)
ntn workers sync trigger githubStarsDelta # force a delta sync now
ntn workers sync status # health check
ntn workers runs list # recent runs + audit detailChange schedule: "1d" in src/index.ts (valid 5m … 7d) and run ntn workers deploy to adjust the cadence.
npm run check # type-check (no emit)
npm test # unit tests (~200ms, no network)MIT — see LICENSE.