Creating a TUI for keeping an eye on GitHub Rate Limits

Featured image for sharing metadata for article

In the last week, I've been doing some work to sync Renovate's Discussions to a local SQLite database, so I can provide a better query layer for maintainers and contributors to see what's going on.

As part of this, I've been sending quite a few API requests to GitHub, and have naturally been eating up a fair bit of my API rate limits.

I wanted a refreshing view of the rate limits that the GitHub App I'm using is hitting, but as the App needs to authenticate with a JSON Web Token (JWT) it's not as straightforward.

To simplify this, I spent a bit of time writing a TUI using Charm's Bubble Tea library, which now gives me a handy updating view of all installations a given App has, and a visual cue when things are getting low:

You can find the source packaged inside my dotfiles.

At some point I may extend this to cover other rate limit resources and non-GitHub App authentication.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#blogumentation #github.

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.