{"id":22541107,"url":"https://github.com/neal-c/ghpm","last_synced_at":"2025-03-28T07:22:13.655Z","repository":{"id":259068046,"uuid":"869665277","full_name":"Neal-C/ghpm","owner":"Neal-C","description":"Turn all your repositories private with 1 CLI command (but not the starred ones)","archived":false,"fork":false,"pushed_at":"2024-10-24T08:01:35.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T04:27:48.317Z","etag":null,"topics":["cli","github-api","go","golang","oauth2"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Neal-C.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}},"created_at":"2024-10-08T17:16:29.000Z","updated_at":"2024-10-24T16:02:03.000Z","dependencies_parsed_at":"2024-10-26T11:08:58.415Z","dependency_job_id":"784022b7-f15d-4d89-9eea-380d5ed0c76b","html_url":"https://github.com/Neal-C/ghpm","commit_stats":null,"previous_names":["neal-c/ghpm"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neal-C%2Fghpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neal-C%2Fghpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neal-C%2Fghpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neal-C%2Fghpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Neal-C","download_url":"https://codeload.github.com/Neal-C/ghpm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245985145,"owners_count":20704917,"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":["cli","github-api","go","golang","oauth2"],"created_at":"2024-12-07T12:13:47.115Z","updated_at":"2025-03-28T07:22:13.633Z","avatar_url":"https://github.com/Neal-C.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A tool to manage privacy on github\n\n\u003e [!WARNING]\n\u003e Turning a starred repository into a private repository will lose all the stars  \n\u003e Current forks will remain public and will be detached from the repository.\n\n\u003e [!IMPORTANT]\n\u003e if it has \u003e= 1 stars, ghpm does not turn a starred repository into a private repository.  \n\u003e It does not turn your README repository (username/username) private because it's a special repository meant for public display\n\n\u003e [!NOTE]\n\u003e I am not sponsored by github, nor affiliated, but you can change that by pinging them on social media\n\n\u003e [!NOTE]\n\u003e Also exists as github cli extension : https://github.com/Neal-C/gh-ghpm\n\n## Requirements \n\n- Go \u003e= 1.23 for go install and contributing\n- unix-like system for user installation\n\n## Installation\n\nwith go ( golang)\n\n```bash\ngo install github.com/Neal-C/ghpm/cmd/ghpm@latest\n```\n\nOne liner install command (Linux/amd64 \u0026 Linux/x86_64) :\n\n```bash\ncurl -s \"https://raw.githubusercontent.com/Neal-C/ghpm/main/docs/install.sh\" | bash\n```\n\nManual install  \n\nFor Linux/amd64 and Linux/x86_64   \n```bash\n# requires: curl\n# ~\ncurl -L -o ghpm https://github.com/Neal-C/ghpm/releases/latest/download/ghpm-linux-amd64\n```\n\ngive ghpm executable permissions  \n```bash\n# ~\nchmod +x ghpm\n```\n\nmove to /usr/local/bin/  \n```bash\n# ~\n# might require to be prefixed with sudo: sudo mv ghpm /usr/local/bin/\nmv ghpm /usr/local/bin/\n```\n\nUninstall :  \n```bash\n# ~\n# might require to be prefixed with sudo: sudo rm /usr/local/bin/ghpm\nrm /usr/local/bin/ghpm\n```\n\n## Usage\n\n```bash\n# prints help message\nghpm --help\n```\n\n```bash\n# turns all your repositories private \nghpm thanos_snap\n```\n\n## Roadmap\n\n- [ ] lobby github for ghpm features to included in gh CLI so that I don't have to maintain this repository for free forever\n\n- [ ] lobby github for a batch request endpoint, so that it can be only 1 HTTP call and not O(n) HTTP calls\n\n- [x] list your private repos\n\n- [x] list your public repos\n\n- [x] switch every repositories to private (excluding repos with \u003e= 1 stars)\n\n- [x] switch 1 repository to private\n\n- [x] switch 1 repository to public\n\n- [x] shell installation script\n\nif time and will :\n\n- [ ] persist auth to allow multiple successive commands\n\n## Contributing\n\nI am open to random pull requests that do at least 1 of the following :\n- cross items off the roadmap\n- fix typos\n- add tooling\n- add tests\n- add/improve documentation\n- improve CI/CD\n\nif you're thinking \"hmm... I could rewrite it in Rust\", I'm waaaay ahead of you : https://github.com/Neal-C/gh-ghpm-rs\n\n\n## How to permanently delete or hide data from a repository ?\n\nOnly sure way is to contact github support : https://support.github.com/\n\nWhen in doubt, revoke and rotate your keys. Or better yet, automate it.\n\n## Why didn't you just ... ?\n\n- use the official sdk : \n  - Because it's a codegen sdk and not human maintained. The code has been generated by Microsoft's kiota codegen framework with OpenAPI specs and the codebase is just unreadable. it also would require me to use kiota-abstractions in my code, you're free to go check out what they are but have a bucket nearby before you do that. \n  - also it's not stable yet and breaking changes may happen at any time (says their README)\n\n- use github.com/google/go-github/v66 :\n  - realized too late, that I could've. It was a legit option.\n  - I was never going to use all of their features, so that's 1 dependency avoided.\n  - it would have been a missed opportunity to learn device authentication, Oauth flow and the inners of github.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneal-c%2Fghpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneal-c%2Fghpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneal-c%2Fghpm/lists"}