{"id":13935519,"url":"https://github.com/interviewstreet/ghs","last_synced_at":"2025-04-06T09:11:20.265Z","repository":{"id":39978969,"uuid":"475250563","full_name":"interviewstreet/ghs","owner":"interviewstreet","description":"Cross-platform CLI tool to generate your Github profile's stats and summary.","archived":false,"fork":false,"pushed_at":"2022-11-07T20:30:41.000Z","size":37,"stargazers_count":137,"open_issues_count":3,"forks_count":88,"subscribers_count":40,"default_branch":"master","last_synced_at":"2024-04-23T23:58:44.759Z","etag":null,"topics":["cli","console-application","github","python3","utility"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interviewstreet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2022-03-29T02:24:11.000Z","updated_at":"2024-04-23T15:50:03.000Z","dependencies_parsed_at":"2022-09-16T10:00:35.705Z","dependency_job_id":null,"html_url":"https://github.com/interviewstreet/ghs","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interviewstreet%2Fghs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interviewstreet%2Fghs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interviewstreet%2Fghs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interviewstreet%2Fghs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interviewstreet","download_url":"https://codeload.github.com/interviewstreet/ghs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457803,"owners_count":20941906,"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","console-application","github","python3","utility"],"created_at":"2024-08-07T23:01:50.677Z","updated_at":"2025-04-06T09:11:20.246Z","avatar_url":"https://github.com/interviewstreet.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eghs\u003c/h2\u003e\n  \u003cp align=\"center\"\u003eCross-platform CLI tool to generate your Github profile's stats and summary.\u003cp\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/interviewstreet/ghs/blob/master/LICENSE\"\u003e\n      \u003cimg alt=\"MIT License\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/interviewstreet/ghs/pulls\"\u003e\n\t    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"prs welcome\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/interviewstreet/ghs\"\u003e\n    \t\u003cimg src=\"https://img.shields.io/badge/platform-Linux%20%7C%20Windows%20%7C%20macOS-blue.svg\" alt=\"platforms\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/ghs\"\u003e\n      \u003cimg src=\"https://img.shields.io/pypi/v/ghs.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/ghs\"\u003e\n      \u003cimg src=\"https://img.shields.io/pypi/pyversions/ghs.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/ghs\"\u003e\n      \u003cimg src=\"https://pepy.tech/badge/ghs\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/ghs\"\u003e\n      \u003cimg src=\"https://pepy.tech/badge/ghs/month\" /\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n# Preview\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asciinema.org/a/482833\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/482833.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nHop on to [examples](#examples) for other usecases.\n\n---\n\nJump to:\n\n- [Installation](#installation)\n  - [Using pip](#using-pip)\n  - [Using source code](#using-source-code)\n  - [Docker](#docker)\n- [Github PAT](#github-pat)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Installation Hiccups on Windows](#installation-hiccups-on-windows)\n  - [Environment error](#could-not-install-package-due-to-environment-error)\n  - [ghs command not found](#ghs-command-not-found-even-after-installing)\n- [How to contribute?](#how-to-contribute)\n- [Steps for pushing a new update](#steps-for-pushing-a-new-update)\n- [Changelog](#changelog)\n- [Privacy Notice](#privacy-notice)\n- [License](#license)\n\n## Installation\n\n### Using pip\n\nThe stable version of this package is maintained on pypi, install using pip:\n\n```bash\npip install ghs\n```\n\n### Using source code\n\nThis can be useful when you want to do a code contribution to this project. You can test and verify your local changes before submitting a Pull Request.\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/interviewstreet/ghs.git\n```\n\n2. Navigate to the project root and create a virtual environment\n\n```bash\npython -m venv venv\n```\n\n3. Activate the virtual environment\n   - For macOS and linux, run `source venv/bin/activate`\n   - For windows, run `.\\venv\\Scripts\\activate`\n4. Install the cli by running the following command while you are in the project root\n\n```bash\npip install .\n```\n\n_Note_: You need to reinstall by running the pip command if you want the cli to pick up your code changes.\n\n## Docker\n\n```bash\ndocker build -t ghs:latest .\ndocker run -it ghs ghs --help\n```\n\n## Github PAT\n\nGenerate a Github personal access token (https://github.com/settings/tokens) and use the `ghs -t` command to save it in the config file. This will be used to make the API requests to Github. A happy side-effect of this is that your private contributions are also considered while generating the stats and the summary of your username.\n\nPlease make sure that you give the following scopes to the token:\n\n- `repo`\n- `read:user`\n- `read:packages`\n\nPS: Your Github PAT is not compromised by ghs. Please read the [Privacy Notice](#privacy-notice) to know more.\n\n## Usage\n\n```bash\nghs [options]\n```\n\n| Option                     | Description                                                                         |\n| -------------------------- | ----------------------------------------------------------------------------------- |\n| `-v` `--version`           | Print the cli version                                                               |\n| `-t` `--token-update`      | Prompts the user for github PAT and saves it in the config file                     |\n| `-u \u003cusername\u003e`            | Print the general stats for the provided username                                   |\n| `-s` `--summary`           | Print the summary of the user. The username should be provided using the `-u` flag. |\n| `-c` `--copy-to-clipboard` | Copy the output to clipboard. Can be used with `-u` or `-s`.                        |\n| `-h` `--help`              | Show the help message of the cli                                                    |\n\n## Examples\n\n### `ghs -u \u003cusername\u003e`\n\nPrints the general Github stats for the given username.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asciinema.org/a/482898\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/482898.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### copy to clipboard\n\nProvide the `-c` flag to copy the output to your clipboard.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asciinema.org/a/482903\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/482903.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### Other options for summary\n\nIn addition to getting the Github summary from the beginning, you can also get the summary of the last 12 months or you can provide your own custom duration.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asciinema.org/a/482912\" target=\"_blank\"\u003e\u003cimg src=\"https://asciinema.org/a/482912.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation hiccups on windows\n\n### Could not install package due to Environment Error\n\nIt can be solved by scoping the installation. Add the flag `--user` to the pip command (`pip install --user ghs`).\n\nAlternatively, you can install the tool inside a virtual environment\n\n### ghs command not found even after installing\n\nMost likely the place where the command is installed is not in the system [PATH](\u003chttps://en.wikipedia.org/wiki/PATH_(variable)\u003e). On windows, there are [a few places](https://stackoverflow.com/questions/25522743/where-does-pip-store-save-python-3-modules-packages-on-windows-8) where the packages might be installed. After confirming the location, [add that directory](https://www.computerhope.com/issues/ch000549.htm) to the PATH.\n\n## How to contribute?\n\nPlease see [Contributing guidelines](https://github.com/interviewstreet/ghs/blob/master/CONTRIBUTING.md) for more information.\n\n## Steps for pushing a new update\n\n1. Bump the version in `ghs/__init__.py` (we follow semantic versioning).\n\n2. Create an annotated tag for this commit with the version name `git tag -a v1.2.3 -m \"v1.2.3\"`. You can use this to publish a new release on the project's github page and the same can be used for maintaining the changelog.\n\n3. Make sure you have [twine](https://pypi.org/project/twine/) and [build](https://pypi.org/project/build/) installed.\n\n```\npip install build twine\n```\n\n3. Build the package\n\n```\npython -m build\n```\n\nThis will create a source archive and a wheel inside the `dist` folder. You can inspect them to make sure that they contain the correct files.\n\n4. Run twine sanity on the build files\n\n```\ntwine check dist/*\n```\n\n5. First push the package on [TestPyPi](https://test.pypi.org/) so that you can test the updates without affecting the real PyPI index\n\n```\ntwine upload -r testpypi dist/*\n\n```\n\n\u003e Get the credentials for hackerrank dev PyPI account from karthik.\n\nTwine will list the package url on TestPyPI. You can test and confirm your changes by installing the package.\n\n6. Finally, run the following command to upload the package to PyPI\n\n```\ntwine upload dist/*\n```\n\n\u003e Get the credentials for hackerrank PyPI account from karthik.\n\n7. Treat yourself with a scoop of tender coconut.\n\n## Changelog\n\nYou can checkout [Releases](https://github.com/interviewstreet/ghs/releases) for the changelog.\n\n## Privacy Notice\n\nghs does not collect any data.\n\n- It has no home server. The Github PAT is stored locally in your machine.\n- It doesn't embed any kind of analytic hooks in its code.\n\nThe only time ghs connects to a remote server is when you want to generate the stats and summary of your github profile. The cli uses the [Github GraphQL](https://docs.github.com/en/graphql) and [Github Rest](https://docs.github.com/en/rest) APIs to do so. The data collected via the APIs is not sent anywhere. It's displayed in your terminal or copied to your clipboard (only if you explicitly tell the tool to do so by providing the `-c` or `--copy-to-clipboard` flag).\n\n## License\n\n[MIT](https://github.com/interviewstreet/ghs/blob/master/LICENSE) © HackerRank\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterviewstreet%2Fghs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterviewstreet%2Fghs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterviewstreet%2Fghs/lists"}