{"id":15563477,"url":"https://github.com/aspiers/github-notifications","last_synced_at":"2026-04-28T17:32:28.969Z","repository":{"id":66899532,"uuid":"83324427","full_name":"aspiers/github-notifications","owner":"aspiers","description":"Utility for marking github notifications as read via mail clients","archived":false,"fork":false,"pushed_at":"2020-12-31T11:49:23.000Z","size":23,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-11T21:08:55.397Z","etag":null,"topics":["email","email-notification","github","github-notifications","mua","mutt"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aspiers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-27T15:17:32.000Z","updated_at":"2025-01-06T23:19:55.000Z","dependencies_parsed_at":"2023-05-13T06:45:24.484Z","dependency_job_id":null,"html_url":"https://github.com/aspiers/github-notifications","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aspiers/github-notifications","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspiers%2Fgithub-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspiers%2Fgithub-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspiers%2Fgithub-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspiers%2Fgithub-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aspiers","download_url":"https://codeload.github.com/aspiers/github-notifications/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspiers%2Fgithub-notifications/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32392292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","email-notification","github","github-notifications","mua","mutt"],"created_at":"2024-10-02T16:23:02.611Z","updated_at":"2026-04-28T17:32:28.953Z","avatar_url":"https://github.com/aspiers.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"github-notification\n===================\n\nThis utility prevents your notifications inbox on github.com from\nfilling up if you read GitHub's email-based notifications from a\ntext-based mail client such as [mutt](http://mutt.org/).\n\nBackground and motivation\n-------------------------\n\nLike many [F/OSS](http://en.wikipedia.org/wiki/Free_and_open-source_software)\ndevelopers, I'm a [heavy user](https://github.com/aspiers)\nof [GitHub](https://github.com/).  This means I interact with other\ndevelopers via GitHub multiple times a day.  GitHub has a very\nnice [notifications system](https://help.github.com/articles/about-notifications/)\nwhich lets me know when there has been some activity on a project I'm\ncollaborating on.\n\nI'm a fan of David Allen's\n[GTD (\"Getting Things Done\") system](http://gettingthingsdone.com/),\nand in my experience I get the best results by minimising the number\nof inboxes I have to look at every day.  So I use another great\nfeature of GitHub, which is the ability to have\n[notification emails delivered directly to your email inbox](https://help.github.com/articles/configuring-notification-emails/).\nThis means I don't have to keep checking\nhttps://github.com/notifications in addition to my email inbox.\n\nHowever, this means that I receive GitHub notifications in two places.\nWouldn't it be nice if when I read them in my email inbox, GitHub\ncould somehow realise and mark them read at\nhttps://github.com/notifications too, so that when I look there, I\ndon't end up getting reminded about notifications I've already seen in\nmy inbox?  Happily the folks at GitHub already thought of this too,\nand came up with a solution, which used to be explained\nat the bottom of\n[GitHub's article on notification emails](https://help.github.com/articles/configuring-notification-emails/):\n\n\u003e Shared read state\n\u003e -----------------\n\u003e\n\u003e If you read a notification email, it'll automatically be marked as\n\u003e read in the Notifications section. An invisible image is embedded\n\u003e in each mail message to enable this, which means that you must\n\u003e allow viewing images from notifications@github.com in order for\n\u003e this feature to work.\n\nGitHub has since removed this info from that page, but it's still\ntrue.\n\nBut there's a catch!  Like many Linux geeks, I\nuse [mutt](http://www.mutt.org/) for reading and writing email.  (In\nfact, I've been using it since 1997 and I'm still waiting for\nanother [MUA](http://en.wikipedia.org/wiki/Email_client) to appear\nwhich is more powerful and lets me crunch through email faster.)\nHowever mutt is primarily text-based, which means by default it\ndoesn't download images when displaying HTML-based email.  Of course,\nit *can*.  But do I want it to automatically open a new tab in my\nbrowser every time I encounter an HTML attachment?  No!  That would\nslow me down horribly.  Even launching a terminal-based HTML viewer\nsuch as [w3m](http://w3m.sourceforge.net/)\nor [links](http://links.twibright.com/)\nor [lynx](http://lynx.browser.org/) would be too slow.\n\nThat means my GitHub account's notification tray keeps filling up\nforever and does not accurately reflect which notifications I've\nread via my mail client.\n\nSolution\n--------\n\nmutt has a nice `message-hook` feature where you can execute mutt\nfunctions for messages matching specific criteria.  So we can use that\nto pipe the whole email to this script whenever a message is being\nread for the first time:\n\n    message-hook \"(~N|~O) ~f notifications@github.com\" \\\n                 \"push '\u003cpipe-message\u003egithub-notification\\n'\"\n\nThis script reads the email on STDIN (or from a filename argument),\nextracts the URL of the 1-pixel read notification beacon `\u003cimg\u003e`, and\nsends an HTTP request for that image, so that GitHub knows the\nnotification has been read.\n\n### Disconnected operation\n\nThe flaw with the above approach is that it does not work if you are\nreading email on a laptop whilst disconnected from the internet.  To\naddress this, `github-notifications` supports two extra options:\n\n- `--push` means that instead of immediately requesting the URL, it\n  push it into a filesystem-backed queue under\n  `~/.config/github-notifications`.\n\n- `--daemon` forks a background process which periodically polls the\n  queue and sends HTTP requests for any URLs found in it, but only\n  when internet connectivity is detected (by\n  pinging\n  [Google's Public DNS at `8.8.8.8`](https://en.wikipedia.org/wiki/Google_Public_DNS)).\n\nSo to use `github-notifications` with support for disconnected operation\nenabled, simply use the `--push` option from your MUA, e.g. from mutt:\n\n    message-hook \"(~N|~O) ~f notifications@github.com\" \\\n                 \"push '\u003cpipe-message\u003egithub-notification --push\\n'\"\n\nand then launch the daemon via `github-notifications --daemon`.\n\nInstallation\n------------\n\n- Either `git clone` this repository or directly download\n  [the `github-notifications` script](https://raw.githubusercontent.com/aspiers/github-notifications/master/github-notifications).\n- Symlink or copy the `github-notifications` script to somewhere on\n  your `$PATH`, such as `~/bin`.\n- Configure your mail client so that it will pipe github notification\n  emails to the script according to the principles explained in the\n  above section.\n- If using `--push` for disconnected operation, additionally configure\n  your system to automatically launch the utility in `--daemon` mode.\n\nUsage\n-----\n\nIf everything is configured correctly, it will all happen automatically.\nThe daemon will log to `~/.log/github-notifications.log` so that you can\nmonitor its behaviour.\n\nDevelopment / support / feedback\n--------------------------------\n\nPlease see [the `CONTRIBUTING` file](CONTRIBUTING.md).\n\nHistory\n-------\n\nHere is [the original blog post I wrote about this tool](https://blog.adamspiers.org/2014/10/05/managing-your-github-notifications-inbox-with-mutt/) when I first announced it in 2014.\n\nLicense\n-------\n\nSee [`LICENSE.txt`](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspiers%2Fgithub-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faspiers%2Fgithub-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspiers%2Fgithub-notifications/lists"}