{"id":21656707,"url":"https://github.com/genericerror000/gdbg","last_synced_at":"2026-05-03T22:34:00.776Z","repository":{"id":260218647,"uuid":"880645491","full_name":"GENERICERROR000/gdbg","owner":"GENERICERROR000","description":"get dexcom blood glucose","archived":false,"fork":false,"pushed_at":"2024-11-18T22:10:19.000Z","size":12726,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-04T10:43:16.633Z","etag":null,"topics":["dexcom","gnome-shell-extension","macos","pydexcom"],"latest_commit_sha":null,"homepage":"","language":"Python","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/GENERICERROR000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-10-30T04:51:11.000Z","updated_at":"2024-11-18T22:10:22.000Z","dependencies_parsed_at":"2024-11-18T22:45:11.366Z","dependency_job_id":"e2bec29b-372f-4fe0-97c5-3838edca4ea4","html_url":"https://github.com/GENERICERROR000/gdbg","commit_stats":null,"previous_names":["genericerror000/gdbg"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/GENERICERROR000/gdbg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GENERICERROR000%2Fgdbg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GENERICERROR000%2Fgdbg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GENERICERROR000%2Fgdbg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GENERICERROR000%2Fgdbg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GENERICERROR000","download_url":"https://codeload.github.com/GENERICERROR000/gdbg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GENERICERROR000%2Fgdbg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271923834,"owners_count":24844265,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dexcom","gnome-shell-extension","macos","pydexcom"],"created_at":"2024-11-25T09:16:20.462Z","updated_at":"2026-05-03T22:34:00.772Z","avatar_url":"https://github.com/GENERICERROR000.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gdbg  \n\n\u003cimg \n  title=\"gdbg logo\"\n  alt=\"red blood drop with text 'gdbg' centered\"\n  src=\"assets/gdbg_logo.png\" \n  width=\"80\"\n/\u003e\n\n## overview\n\n\u003e gdbg: *get dexcom blood glucose*\n\na python service that retrieves/displays blood glucose from dexcom via the [pydexcom](https://github.com/gagebenne/pydexcom) library and writes it (and other info) to state file. the state file can then be used for displaying data in your terminal (or anything else you want).\n\nthis app was inspired by [kylebshr/luka-mini](https://github.com/kylebshr/luka-mini/tree/main). this is a *fantastic* app i and would recommend it for people who want a seamless app experience. i wanted to be able to access the blood glucose data outside of the app for other uses.\n\n\u003cimg \n  title=\"blood sugar in terminal prompt\"\n  alt=\"screenshot of blood sugar in terminal prompt\"\n  src=\"assets/terminal_prompt.png\" \n  width=500\n/\u003e\n\n## how to use\n\n1. clone repo\n\n2. set up environment\n\n```sh\npython3 -m venv gdbg\n\nsource gdbg/bin/activate\n```\n   \n3. install requirements\n\n```sh\npip install -r requirements.txt\n```\n\n4. setup credentials\n\n*__this file must be created manually__*\n\n`~/.dexcom/dexcom_credentials.json`\n\n```json\n{\n  \"username\" : \"\u003cdexcom_username\u003e\",\n  \"password\": \"\u003cdexcom_password\u003e\"\n}\n```\n\n5. run via cli\n\n```sh\npython cgm_service.py\n```\n\n## blood glucose state file\n\nthis file is generated by the app if set to write state\n\n* `~/.dexcom/bg_status.txt`\n\nformat of the status is: `[bg] [delta] [trend arrow] '[reading timestamp]'`\n\nthe delta starts at 0 and will show change after second reading is retrieved.\n\n### example usage in zsh $PROMPT\n\n```sh\n# ~/.zshrc\n\nfunction get_bg() {\n    RED='\\033[91m'\n    GREEN='\\033[92m'\n    YELLOW='\\033[93m'\n    END='\\033[0m'\n\n    state_file=$(cat $HOME/.dexcom/bg_status.txt)\n    value=$(echo \"$state_file\" | cut -d' ' -f1)\n    delta=$(echo \"$state_file\" | cut -d' ' -f2)\n    arrow=$(echo \"$state_file\" | cut -d' ' -f3)\n\n    if [[ $value -ge 80 \u0026\u0026 $value -le 180 ]]; then\n        color=\"$GREEN\"\n    elif [[ $value -gt 180 ]]; then\n        color=\"$YELLOW\"\n    elif [[ $value -lt 80 ]]; then\n        color=\"$RED\"\n    fi\n\n    echo \"${color}${value} (${delta}) ${arrow}${END}\"\n}\n\n# backslash in `\\$(...)` is required for the value to update every time \nexport PROMPT=\"$PROMPT\\$(get_bg)\"\n```\n\n## references\n\n* [kylebshr/luka-mini](https://github.com/kylebshr/luka-mini/tree/main)\n(https://camillovisini.com/coding/create-macos-menu-bar-app-pomodoro)\n* [Glucose Readings in a Terminal Prompt - Hart Hoover](https://harthoover.com/glucose-readings-in-a-terminal-prompt/)\n\n## credits\n\nassets\n\n* logo by [izzy bulling - @izval](https://www.instagram.com/izval/)\n* [modak](https://github.com/EkType/Modak) font used in logo\n\npackages\n\n* [gagebenne/pydexacom](https://github.com/gagebenne/pydexcom)\n\ncreated by\n\n* [GENERIC_ERROR](https://generic_error.xyz/)\n\n-//-\n\n## TODO:\n\n* [ ] testing","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenericerror000%2Fgdbg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenericerror000%2Fgdbg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenericerror000%2Fgdbg/lists"}