{"id":20288013,"url":"https://github.com/dopecodez/github-terminal","last_synced_at":"2025-10-12T10:08:30.521Z","repository":{"id":38142770,"uuid":"223953690","full_name":"dopecodez/github-terminal","owner":"dopecodez","description":"For searching and getting project details from Github","archived":false,"fork":false,"pushed_at":"2024-07-11T04:39:45.000Z","size":177,"stargazers_count":17,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T10:08:26.876Z","etag":null,"topics":["chai","cli","cli-app","cli-args","github-api","github-repository","github-repository-search","github-rest-v3","github-search","github-search-repository","github-user-repos","github-user-search","javascript","mocha","travis-ci"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dopecodez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-11-25T13:20:53.000Z","updated_at":"2025-10-04T13:57:33.000Z","dependencies_parsed_at":"2024-11-14T14:43:48.724Z","dependency_job_id":"de3ed0c4-5276-4233-a5e2-6e0f2928dfe1","html_url":"https://github.com/dopecodez/github-terminal","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dopecodez/github-terminal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecodez%2Fgithub-terminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecodez%2Fgithub-terminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecodez%2Fgithub-terminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecodez%2Fgithub-terminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dopecodez","download_url":"https://codeload.github.com/dopecodez/github-terminal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecodez%2Fgithub-terminal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011049,"owners_count":26084863,"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-10-12T02:00:06.719Z","response_time":53,"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":["chai","cli","cli-app","cli-args","github-api","github-repository","github-repository-search","github-rest-v3","github-search","github-search-repository","github-user-repos","github-user-search","javascript","mocha","travis-ci"],"created_at":"2024-11-14T14:43:41.777Z","updated_at":"2025-10-12T10:08:30.506Z","avatar_url":"https://github.com/dopecodez.png","language":"JavaScript","readme":"# github-terminal-cli [![Build Status](https://travis-ci.org/dopecodez/github-terminal.svg?branch=master)](https://travis-ci.org/dopecodez/github-terminal)\nA terminal cli app for searching and getting user repositories or search details from Github.It uses the Github V3 api's for getting results.For more information on the Github API, go to https://developer.github.com/v3/.\n\nIt's a basic cli with inputs that can be passed as arguments or as options. It will get all fields available in repository details which are defined in constants.js file and prints it out in the console. If you need a new field, just add it to the fields array in this file. Has tests with mocha and chai written on top of this.\n\nIf you have any doubts or clarifications on this code, hit me up and I'll try to help you guys out!\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. \n\n### Prerequisites\n\nYou'll need to install NodeJS for running this application. I'm on Node v11.3.0, you can find it at:\n```\nhttps://nodejs.org/en/download/\n```\nYou'll also need a code editor to see how the code goes. Use whichever editor which has JS support, I use Visual Studio Code on \nWindows 10.\n\n### Installing\n\nSimple steps to get the application running. Open the terminal to the folder containing github-terminal and just type:\n```\nnpm install\n```\nThis should install all the dependencies within package.json and create your package-lock.json and node modules.\n\nAfter the previous command completes successfully, open the terminal and type:\n```\nnpm link\n```\nThis is handy for installing your apps, so that you can work on it and test it iteratively without having to continually rebuild.\n\nTo run the tests, all you need to do is, type:\n```\nnpm test\n```\n## Usage\n\nOnce program has successfully completed the above commands, we can run our app from the cli. Go ahead and type this on cli:\n```\nght -u -k dopecodez -f -n 10\n```\nght should get the list of repos for user dopecodez and select the first one. If you just type:\n```\nght\n```\nght should prompt you for all the options and you can use them.\n\nThe arguments available are : -u or -s(--user or --search : Please note that using both these options will result in an error. Use either one)\n\n-k string: --keyword. -k should always be succeeded by a keyword or will throw an error. Keyword can be name of user or repo name for search.\n\nIf any of the above arguments are missing, ght will prompt you select one of these options.\n\n-f : --first. If specified, will select and display the first repo details returned by the API. If missing, will prompt user to select from repos returned.\n\n-n number: --number. -n should be succeeded by a number or it will throw an error. Number or repos to choose from.If missing, default is 5.Max is 100.\n\n## Built With\n\n* [NodeJS](https://nodejs.org/en/) - The language used\n* [Mocha](https://mochajs.org/) - Test framework for JS.\n* [Chai](https://www.chaijs.com/) - Assertion library for JS.\n* [Inquirer](https://www.npmjs.com/package/inquirer/v/0.2.3) - Package for interactive cli option choice.\n* [args](https://www.npmjs.com/package/args) - Package for parsing command line arguments.\n* [Chalk](https://www.npmjs.com/package/chalk) - Package for creating colorful console outputs.\n* [got](https://www.npmjs.com/package/got) - Human-friendly and powerful HTTP request library for Node.js.\n* [bdd-stdin](https://www.npmjs.com/package/bdd-stdin) - Used for easily mocking responses for BDD unit tests that ask user a question.\n\n## Contributing\n\nAnybody with ideas to genuinely improve the project are welcome. We use git flow, so just pull the repo, cut a branch on develop and put a pull request back to us. We will look through the PR as soon as possible.\n\n## Versioning\nFor the versions available, see the [tags on this repository](https://github.com/dopecodez/github-terminal/tags). \n\n## Authors\n\n* **Govind S** - *Initial work* - [dopecodez](https://github.com/dopecodez)\n\n## License\n\nThis project is free. Use it in whichever way you please.\n\n## Acknowledgments\n\n* Hat tip to anyone whose code was used.\n* [This medium article](https://medium.com/@zorrodg/integration-tests-on-node-js-cli-part-1-why-and-how-fa5b1ba552fe) for giving me ideas to e2e test my cli app.\n* [This artice](https://glebbahmutov.com/blog/unit-testing-cli-programs/) for giving me testing ideas which is incidently by the same contributor who maintains bdd-stdin.\n* [Twillio's article on CLI apps](https://www.twilio.com/blog/how-to-build-a-cli-with-node-js) for getting me started on the right direction.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdopecodez%2Fgithub-terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdopecodez%2Fgithub-terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdopecodez%2Fgithub-terminal/lists"}