Skip to main content

Add GitHub Topics Banner

🚀 Add GitHub Topics CLI 🏷️

Automate your GitHub repository tagging process with a single command!

PyPI version Python versions License: MIT GitHub stars GitHub followers


🌟 Overview

add-github-topics is a powerful and lightweight Python CLI tool designed to help developers and maintainers programmatically manage their GitHub repository topics. Whether you are managing a single project or automating a large-scale migration, this tool simplifies the process of adding descriptive tags to your repositories.

Topics are essential for SEO on GitHub, making your projects more discoverable to the community! 🔍

✨ Key Features

  • ✅ Smart Appending: Fetches existing topics first to avoid accidental overwrites.
  • ✅ Zero Config Defaults: Automatically detects username and repository name from your local git environment.
  • ✅ Secure Token Handling: Supports .env files for managing your GitHub Personal Access Token (PAT).
  • ✅ Global CLI: Once installed, use it from any directory in your terminal.
  • ✅ Cross-Platform: Works seamlessly on Windows, macOS, and Linux.

🚀 Quick Start

1. Installation 📦

Install the tool directly from PyPI:

pip install add-github-topics

2. Configuration ⚙️

Set your GitHub token in any of the following ways (in order of priority):

  1. CLI Argument:

    add-github-topic python --token ghp_your_token_here
    
  2. Environment Variable:

    • Bash / Zsh:
      export GITHUB_TOKEN=ghp_your_token_here
      
    • PowerShell:
      $env:GITHUB_TOKEN = "ghp_your_token_here"
      
  3. .env File: Create a .env file in your repository or home directory:

    GITHUB_TOKEN=ghp_your_token_here
    

    (Also supports GH_TOKEN and legacy ADMIN_TOKEN)

  4. GitHub CLI (gh): If you already have GitHub CLI installed and logged in (gh auth login), the CLI will automatically fallback to gh auth token with zero manual configuration!

3. Basic Usage 🛠️

Run the command from within any git repository:

add-github-topic python

📖 Detailed Usage Guide

add-github-topic <topic> [options]

Options Explained

Option Shortcut Description Default
topics - One or more topics to add (space- or comma-separated). -
--token -t Your GitHub Personal Access Token. GITHUB_TOKEN, GH_TOKEN, ADMIN_TOKEN (environment / .env), or gh auth token
--username, --owner -u Your GitHub username / organization. Auto-detected from git remote origin
--reponame, --repo -r Target repository name. Auto-detected from git remote origin
--list -l List all current topics for the repository. false
--remove -d Remove the specified topic(s) instead of adding. false

Examples 📝

Add a single topic:

add-github-topic python

Add multiple topics in one go:

add-github-topic automation cli-tool devops
# or comma-separated
add-github-topic python,fastapi,docker

List current topics:

add-github-topic --list

Remove topics:

add-github-topic --remove cli-tool

Target a specific repository and user/org:

add-github-topic machine-learning --username ishandutta2007 --reponame awesome-ml-project

🛠️ Development & Contributions

Contributions are welcome! If you'd like to improve this tool:

  1. Clone the repo: git clone https://github.com/ishandutta2007/add-github-topics.git
  2. Install in editable mode: pip install -e .
  3. Submit a Pull Request!

🛠️ Publish to PYPI

git tag v0.2.0 && git push origin v0.2.0

📈 Star History


Made with ❤️ by Ishan Dutta

Release files for add-github-topics 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for add-github-topics 0.2.1
File Size Uploaded
add_github_topics-0.2.1.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for add-github-topics 0.2.1
File Interpreter ABI Platform
add_github_topics-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / add_github_topics-0.2.1.tar.gz

Download URL add_github_topics-0.2.1.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4346d375ed155e204e5998d7bce6a15ad3cdafe44cdb18164d3242e8aa241909
BLAKE2b-256 checksum
How to use checksums
039b06363979b808da8737c8ff90af43630b2f4e0944c4e25dee60492cf1b278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.

Transparency log

Release files / add_github_topics-0.2.1-py3-none-any.whl

Download URL add_github_topics-0.2.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fd4c684a651c8c4ff5419c1c2d8f1945a5ed1737820a5debc36e37fd7baa981
BLAKE2b-256 checksum
How to use checksums
819211c8df45d3c2d315e23b062c9a02a3376c205a575b700edf2babd4da2758
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page