A user reached out asking if AskGit could export the GitHub profiles of everyone who starred their repository. Absolutely it can! 🎉
This is a pretty simple query 🙂. First, you’ll need to set the
GITHUB_TOKEN environment variable.
Then, you can run the following:
askgit "SELECT * FROM github_stargazers('askgitdev/askgit')"
And that’s it! You may want to add a
--format csv or
--format json to get your stargazers in a more usable output format (and pipe the results to a file).1
Some useful fields include:
company(what companies may be using your project?)
How many stars did I get this week?
Adding a filter (
WHERE) and an aggregation (
COUNT) to the above lets you find how many people starred a repo over a particular time period. For instance2:
askgit "SELECT count(*) FROM github_stargazers('askgitdev/askgit') WHERE starred_at > date('now', '-10 days') ORDER BY starred_at DESC"
Will calculate how many people starred your repo in the past 10 days. Check out the available date and time functions to try other ranges.
If you want to dig deeper, see this post from Cockroach Labs for inspiration.
An additional “metric” that could be interesting to see is “star throughput” over time - something like stars per day (the “velocity” of stargazer growth vs the total count), which may be a better indicator for project “popularity” at a moment in time.