A CLI tool to add topics to a GitHub repository
Project description
Add GitHub Topics
A CLI tool to add topics (tags) to a GitHub repository using the GitHub API.
Features
- Add a topic to any GitHub repository you have access to.
- Automatically fetches existing topics to avoid overwriting them.
- Defaults to current repository information if run within a git repo.
- Supports
.envfile for secure token management. - Installable via
pipand usable as a command-line tool.
Installation
You can install the package locally for development:
pip install .
Or install it directly from GitHub:
pip install git+https://github.com/ishandutta2007/add-github-topics.git
Setup
Create a .env file in your current directory and add your GitHub Personal Access Token:
ADMIN_TOKEN=your_github_token_here
Usage
After installation, you can use the add-github-topic command:
add-github-topic <topic> [options]
Arguments
topic: (Mandatory) The topic you want to add.
Options
--token: GitHub Access Token. If not provided, it usesADMIN_TOKENfrom.env.--username: GitHub username. If not provided, it attempts to detect it from the current git configuration.--reponame: GitHub repository name. If not provided, it uses the current folder name.
Example
add-github-topic python --username ishandutta2007 --reponame add-github-topics
If run inside a repository and .env is set up:
add-github-topic script
Development
To install dependencies for development:
pip install -e .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file add_github_topics-0.1.0.tar.gz.
File metadata
- Download URL: add_github_topics-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce4940ec7f3c0101faf6ea39843ad48f32408d04ed4323e4572f04c8b033ddc9
|
|
| MD5 |
2fdff7a62d7f949bd3d9f950c9dbf2a0
|
|
| BLAKE2b-256 |
731eee9d9c5aec2d883552024a880c384f21587bc3ffc431700dd6835af92421
|
File details
Details for the file add_github_topics-0.1.0-py3-none-any.whl.
File metadata
- Download URL: add_github_topics-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
996543d859d068e0f528091af561ca3d51c8371d0b5a7f5870d84e0cc47d6d33
|
|
| MD5 |
71577e3740b1bfcb21a0c24b28827e7b
|
|
| BLAKE2b-256 |
311b90962c3919633af184a65e928ca6921249429240f43d3180aa33dd74ac10
|