gh-inbox: clean up GitHub notifications in bulk from the command line
A GitHub CLI extension called gh-inbox allows users to efficiently manage their notifications from the command line. It can mark notifications as done or read, unsubscribe from them, or unsubscribe from them in bulk, based on various criteria such as repository, type, reason, age, state, or the people involved. To use it, one needs to install the gh-inbox binary and authenticate with their GitHub account.
The extension requires the notifications or repo scope token and read:org scope for filters on review requests that name a team or @me. It stores the record of notifications marked as done per host and provides options to list, triage, and clean them. The triage mode allows users to interact with notifications one by one by pressing different keys to open, mark as done, mark as read, unsubscribe, skip, or quit.
The unwatch command stops watching repositories, and threads you participate in or are mentioned in still notify you. Rules can be saved as a YAML file to automate the cleanup process, and they apply in the order of the file. Marking a notification as done removes it from the inbox, but it remains under the "Done" filter on GitHub and will return when there is new activity.
The API keeps listing done notifications, and the extension keeps a record of the notifications it marked as done to skip them until they have new activity. The extension caches API responses to improve performance and handles rate limits and transient server errors.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
