{"id":15816327,"url":"https://github.com/hypnoglow/gomuche","last_synced_at":"2025-04-01T03:40:38.594Z","repository":{"id":57611822,"uuid":"71277843","full_name":"hypnoglow/gomuche","owner":"hypnoglow","description":"gomuche :incoming_envelope: - Google Mail unread count checker.","archived":false,"fork":false,"pushed_at":"2017-06-24T20:13:50.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-06T05:02:25.807Z","etag":null,"topics":["gmail","gmail-checker","mailchecker"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hypnoglow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-18T18:16:41.000Z","updated_at":"2017-07-06T20:59:58.000Z","dependencies_parsed_at":"2022-08-27T09:50:26.084Z","dependency_job_id":null,"html_url":"https://github.com/hypnoglow/gomuche","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoglow%2Fgomuche","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoglow%2Fgomuche/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoglow%2Fgomuche/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypnoglow%2Fgomuche/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hypnoglow","download_url":"https://codeload.github.com/hypnoglow/gomuche/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246580456,"owners_count":20800106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gmail","gmail-checker","mailchecker"],"created_at":"2024-10-05T05:02:35.059Z","updated_at":"2025-04-01T03:40:38.576Z","avatar_url":"https://github.com/hypnoglow.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gomuche\n\ngomuche stands for Google Mail unread count checker.\n\n## Motivation\n\nThis tool in fact does this:\n\n    curl -su $GMAIL_USER:$GMAIL_PASS https://mail.google.com/mail/feed/atom\n    # and parsing it further\n\nBut instead of user+pass authentication, this tool uses OAUTH2 which is way more secure.\nUnencrypted Google password stored in some plain text file (to use in ENV_VARIABLE like above) may be leaked.\nIn opposite, storing just an auth token is no big deal.\n\nThis tool was written mostly for demonstrational purposes,\nbut actually I use it for my [i3blocks](https://github.com/vivien/i3blocks/) mail checker \n[here](https://github.com/hypnoglow/dotfiles/blob/master/i3/i3blocks.conf#L206).\n\n## Installation\n\n    go get github.com/hypnoglow/gomuche\n\n## Usage\n\nGo to [Google Developers Console](https://console.developers.google.com/) and create your credentials:\nclient ID and client secret. For instance, consider the following steps:\n1. Create a new project.\n2. Navigate to \"credentials\".\n3. Click \"create credentials\".\n4. Select \"Help me choose\".\n5. **Which API are you using?** - Gmail API\n6. **Where will you be calling the API from?** - Other UI (CLI tool)\n7. **What data will you be accessing?** - User data.\n\nGet your credentials.\n\nRun:\n\n    gomuche auth --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET\n\nYour credentials will be saved in `$HOME/.gomuche/config.json` so you can run\n`gomuche auth` without arguments in the future.  \nThis command will print the link you need to open in your browser to authorize. You will be given a code.\nCopy it and run mail check passing this code:\n\n    gomuche check -c YOUR_CODE\n\nIt creates your auth token, which will be stored in `$HOME/.gomuche/token.json`. Next time you should\nrun mail check without passing the code:\n\n    gomuche check\n\nIt will use your stored token, and automatically refresh it when it expires.\n\nNote that you cannot use the same code again.\nYou must obtain a new one from `gomuche auth` to make a new token if you lose yours.\n\nFor any additional info, run:\n\n    gomuche --help\n\n## Issues\n\nIf you experience any problems (e.g. program exits with non-zero exit code),\nyou can add `-v` flag to `check` command to print output verbosely. Also, you can check error log,\nwhich is located in `$HOME/.gomuche/gomuche.log`.\n\nIf you found any bug, feel free to create a GitHub issue or/and submit a pull request.\n\n## License\n\n[MIT](https://github.com/hypnoglow/gomuche/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypnoglow%2Fgomuche","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypnoglow%2Fgomuche","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypnoglow%2Fgomuche/lists"}