{"id":25629711,"url":"https://github.com/ashtom/hadge","last_synced_at":"2026-06-10T14:30:15.987Z","repository":{"id":45996985,"uuid":"265077400","full_name":"ashtom/hadge","owner":"ashtom","description":"💪 Export workout data from Health.app on iOS to a GitHub repo","archived":false,"fork":false,"pushed_at":"2025-01-05T00:45:59.000Z","size":657,"stargazers_count":166,"open_issues_count":1,"forks_count":14,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-16T11:11:27.026Z","etag":null,"topics":["health","ios-app","pinned-gist","swift","workouts"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/ashtom.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}},"created_at":"2020-05-18T22:24:56.000Z","updated_at":"2025-02-14T10:39:52.000Z","dependencies_parsed_at":"2023-01-30T05:45:36.572Z","dependency_job_id":null,"html_url":"https://github.com/ashtom/hadge","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/ashtom%2Fhadge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashtom%2Fhadge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashtom%2Fhadge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashtom%2Fhadge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashtom","download_url":"https://codeload.github.com/ashtom/hadge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240222484,"owners_count":19767465,"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":["health","ios-app","pinned-gist","swift","workouts"],"created_at":"2025-02-22T19:17:36.884Z","updated_at":"2026-06-10T14:30:15.898Z","avatar_url":"https://github.com/ashtom.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# Hadge - Health.app Data Git Exporter (for iOS)\n\n[![Build App](https://github.com/ashtom/hadge/actions/workflows/build_app.yml/badge.svg)](https://github.com/ashtom/hadge/actions/workflows/build_app.yml)\n[![TestFlight](https://shields.io/static/v1?label=TestFlight\u0026message=Join%20Beta\u0026color=blue)](https://testflight.apple.com/join/rFLkfNSu)\n\nThis app serves one simple purpose: Exporting workout data from the Health.app on iOS to a git repo on GitHub. \n\nAt the first launch of the app, you can connect your GitHub account, then the app checks whether a repo with the name `health` exists and, if not, it automatically creates it as a private repo. The initial export dumps all workouts, distances, and daily activity data (the rings on Apple Watch) to .csv files, one per year. The app also registers a background task that gets activated whenever you finish a new workout and then updates the .csv files. \n\n## TestFlight Beta\n\nYou can join the TestFlight Beta [here](https://testflight.apple.com/join/rFLkfNSu). Note that you need to open the link on your iPhone, otherwise TestFlight will show `This beta isn't accepting any new testers right now.` 🙄\n\n## GitHub Actions Workflow\n\nOnce you have set up the app (and done some workouts), you can use an Actions workflow to generate workout stats on your GitHub profile. Here's the one from [mine](https://github.com/ashtom):\n\n\u003cimg width=\"445\" alt=\"CleanShot 2021-11-06 at 16 01 29@2x\" src=\"https://user-images.githubusercontent.com/70720/140626256-b84c9945-898e-4570-bbdb-deab1ec3ef18.png\"\u003e\n\nSteps:\n\n1. Create the file `.github/scripts/hadge.rb` with this [Ruby script](https://gist.github.com/ashtom/1cd9602b122082827b38eb79d605ca1a).\n2. Adjust the `DISPLAYED_ACTIVITIES` near the top of the script to match your top workouts. More than 5 won't fit into a pinned gist.\n3. Create the file `.github/workflows/hadge.yml` with this [workflow](https://gist.github.com/ashtom/0ca3193ce0ac76f9c6bf0b3aa9cad124).\n4. Enable Actions on your repo.\n5. Create a new public GitHub Gist [here](https://gist.github.com/).\n6. Create a personal access token with the gist scope [here](https://github.com/settings/tokens/new). Copy it.\n7. Go yo your repo settings, tab `Secrets`.\n8. Create a secret `GH_TOKEN` with the personal access token copied in step 6.\n9. Create a secret `GIST_ID` with the ID of the gist from step 5. The ID is the last part of the gist's URL.\n10. Trigger an Actions run, either by finished a workout 🙃 or by tapping on a workout in the app, then on the ⊕ icon in the bottom-right corner.\n\nFind other awesome pinned gists in matchai's [awesome-pinned-gists repo](https://github.com/matchai/awesome-pinned-gists).\n\n#### Building\n\nHadge relies on [swiftlint](https://realm.github.io/SwiftLint/) and \n[sourcery](https://github.com/krzysztofzablocki/Sourcery). They can be installed \nvia [homebrew](https://brew.sh) via the provided `Brewfile` by running `brew bundle`\nor manually.\n\nHadge requires a GitHub OAuth application. You will need to create an [OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps) \nto test and build a version of the application. Once you have your App, you will need to create a `Secrets.xcconfig`\nfile  locally at the appropriate path that contains the Client ID and Client Secret.\n\nYou can locally override the Xcode settings for code signing\nby creating a `DeveloperSettings.xcconfig` file locally at the appropriate path.\n\nThis allows for a pristine project with theis own OAuth App and code signing set up with the appropriate\ndeveloper ID and certificates, and for a developer to be able to have local settings\nwithout needing to check in anything into source control.\n\nYou can do this in one of two ways: using the included `setup.sh` script or the files manually.\n\n##### Using `setup.sh`\n\n- Open Terminal and `cd` into the project directory. \n- Run this command to ensure you have execution rights for the script: `chmod +x setup.sh`\n- Execute the script with the following command: `./setup.sh` and complete the answers.\n\n##### Manually \n\nCreate a plain text file at the root of the project directory named `DeveloperSettings.xcconfig` and\ngive it the contents:\n\n```\nCODE_SIGN_IDENTITY = Apple Development\nDEVELOPMENT_TEAM = \u003cYour Team ID\u003e\nCODE_SIGN_STYLE = Automatic\nORGANIZATION_IDENTIFIER = \u003cYour Domain Name Reversed\u003e\n```\n\nSet `DEVELOPMENT_TEAM` to your Apple supplied development team.  You can use Keychain\nAccess to [find your development team ID](/Technotes/FindingYourDevelopmentTeamID.md).\nSet `ORGANIZATION_IDENTIFIER` to a reversed domain name that you control or have made up.\n\nCreate a plain text file at the root of the project directory named `Hadge/Secrets.xcconfig` and\ngive it the contents:\n\n```\nGITHUB_CLIENT_ID = \"\u003cYour GitHub App Client ID\u003e\"\nGITHUB_CLIENT_SECRET = \"\u003cYour GitHub App Client Secrent\u003e\"\n```\n\nSet `GITHUB_CLIENT_ID` to your GitHub App Client ID and `GITHUB_CLIENT_SECRET` to your \nGitHub App Client Secret.\n\nNow you should be able to build without code signing errors and without modifying\nthe project\n\n## Privacy Policy\n\nThis Privacy Policy describes how your personal information is handled in Hadge for iOS.\n\nWe do not collect, use, save, or shared any of your personal data. Hadge exports your workout data to a private GitHub repository in your personal GitHub account. To do this, the app needs access to your Health data. You can choose to disable this at any time in the Health app or by deinstalling Hadge app.\n\nHadge does not collect any data for any other purposes, and does not send any data to any service other than GitHub. The connection between Hadge and GitHub is directly established through the GitHub API, secured by SSL, and authenticated through your GitHub user. You can delete this connection at any time by revoking the token in your GitHub account settings or by deinstalling Hadge app.\n\nWe don’t collect personal information from anyone, including children under the age of 13.\n\n## License\n\nHadge is published under the MIT License.\n\nCopyright (c) 2020-2021 Thomas Dohmke\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashtom%2Fhadge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashtom%2Fhadge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashtom%2Fhadge/lists"}