Automate your GitHub repository tagging process with a single command!
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! π
- β 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
.envfiles 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.
Install the tool directly from PyPI:
pip install add-github-topicsCreate a .env file in your project root or home directory to store your GitHub token:
ADMIN_TOKEN=your_personal_access_token_hereRun the command from within any git repository:
add-github-topic pythonadd-github-topic <topic> [options]| Option | Shortcut | Description | Default |
|---|---|---|---|
topic |
- | (Mandatory) The topic string to add. | - |
--token |
- | Your GitHub Personal Access Token. | ADMIN_TOKEN from .env |
--username |
- | Your GitHub username. | Detected from git config |
--reponame |
- | Target repository name. | Current folder name |
Add multiple tags sequentially:
add-github-topic automation
add-github-topic cli-toolTarget a specific repository and user:
add-github-topic machine-learning --username ishandutta2007 --reponame awesome-ml-projectContributions are welcome! If you'd like to improve this tool:
- Clone the repo:
git clone https://github.com/ishandutta2007/add-github-topics.git - Install in editable mode:
pip install -e . - Submit a Pull Request!
Made with β€οΈ by Ishan Dutta