{"id":15426377,"url":"https://github.com/richardlitt/gh-topics","last_synced_at":"2026-04-13T16:36:08.450Z","repository":{"id":141498559,"uuid":"89604466","full_name":"RichardLitt/gh-topics","owner":"RichardLitt","description":"Set and get a GitHub repository's topics","archived":false,"fork":false,"pushed_at":"2017-10-14T17:34:44.000Z","size":4,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T07:55:31.230Z","etag":null,"topics":["cli","gh","github","repos","topic","topics"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/RichardLitt.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":"2017-04-27T14:08:11.000Z","updated_at":"2020-04-23T09:13:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6deff5e-f7b4-4660-a3f8-2adf8651e422","html_url":"https://github.com/RichardLitt/gh-topics","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/RichardLitt%2Fgh-topics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Fgh-topics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Fgh-topics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Fgh-topics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RichardLitt","download_url":"https://codeload.github.com/RichardLitt/gh-topics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246207492,"owners_count":20740723,"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","gh","github","repos","topic","topics"],"created_at":"2024-10-01T17:56:00.313Z","updated_at":"2026-04-13T16:36:08.415Z","avatar_url":"https://github.com/RichardLitt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-topics\n\n[![Build Status](https://travis-ci.org/RichardLitt/gh-topics.svg?branch=master)](https://travis-ci.org/RichardLitt/gh-topics)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n\u003e Set and get a GitHub repository topics\n\n**NOTE:** GitHub's API does not yet adequately return the `topics` tag. As such, this code will not work, at all. See the note [here](https://developer.github.com/v3/repos/).\n\n**If you think this is not true, ping me immediately by opening an issue. I will make this work.**\n\n## Install\n\n```\nnpm install --save gh-topics\n```\n\nor\n\n```\nnpm install --global gh-topics\n```\n\n## Usage\n\n```js\nconst ghTopics = require('gh-topics');\n\nghTopics('RichardLitt/gh-topics');\n//=\u003e 'Set and get a GitHub repository topics'\nghTopics('RichardLitt/gh-topics', 'unicorns \u0026 rainbows');\n//=\u003e 'unicorns \u0026 rainbows'\n```\n\n## API\n\n### ghTopics(repoName, topics, [options], token)\n\n#### repoName\n\nType: `string`\n\nThe name for the repository to test.\n\n#### topics\n\nType: `string`\n\nThe new topics to set. To set, you must also supply the repoName first.\n\n#### options\n\nNone.\n\n#### token\n\nYour GitHub access token, if not set as an env variable or supplied in the CLI.\n\n## CLI\n\nThe `gh-topics` command uses [ghauth](https://github.com/rvagg/ghauth) to generate and [locally store](https://github.com/LinusU/node-application-config#config-location) a GitHub API personal token.\n\nYou can skip this step by [manually generating a token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) and setting it as an environment variabled named `GH_DESCRIPTION_TOKEN`.\n\n```\n$ gh-topics --help\n\n  Usage\n    $ gh-topics\n\n  Examples\n    $ gh-topics\n    Current topics: Set and get a GitHub repository topics\n    $ gh-topics RichardLitt/gh-topics 'ponies and unicorns'\n    New topics: ponies and unicorns\n```\n\n## Contribute\n\nPRs and [issues](https://github.com/RichardLitt/gh-topics/issues) gladly accepted!\n\n## License\n\nMIT © [Richard Littauer](http://burntfen.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardlitt%2Fgh-topics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardlitt%2Fgh-topics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardlitt%2Fgh-topics/lists"}