Batch setup GitHub repository labels with one command. Supports priority, status, type, and more categories.
- 🎨 Rich Label System - Priority, status, type, technical areas, and more
- 🧹 Auto Cleanup - Optional cleanup of existing labels to avoid duplicates
- ⚡ Lightning Fast - Powered by Bun for maximum speed
- 🔄 Batch Processing - Bulk create and delete labels efficiently
- 💫 Rate Limit Friendly - Built-in delays to respect GitHub API limits
bun install
const ghLabels = require('./index.js');
// Basic usage
await ghLabels({
username: 'your-username',
repo: 'your-repo',
token: 'your-github-token'
});
bun run your-script.js
Category | Description | Examples |
---|---|---|
🔴 Priority | Critical, High, Medium, Low | Priority: Critical |
📊 Status | Open, In Progress, Review Needed | Status: Open |
🔧 Type | Bug, Feature, Enhancement | Type: Bug |
🏗️ Area | Frontend, Backend, Database | Area: Frontend |
🚀 Version | Major, Minor, Patch | Version: Major |
Parameter | Type | Required | Description |
---|---|---|---|
username |
string | ✅ | GitHub username |
repo |
string | ✅ | Repository name |
token |
string | ✅ | GitHub access token |
cleanExisting |
boolean | ❌ | Clean existing labels first (default: true) |
userAgent |
string | ❌ | Custom user agent string |
- Go to GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Click "Generate new token"
- Configure:
- Repository access: Select specific repositories
- Permissions: Grant
Issues
(read and write) andMetadata
(read) permissions
- Copy the generated token
- Visit GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click "Generate new token (classic)"
- Select
repo
scope - Copy the generated token
💡 Pro tip: Fine-grained tokens are more secure as they provide repository-specific access and granular permissions.
- ⚡ Lightning Fast - 3-4x faster than Node.js
- 🔋 Built-in Everything - No extra configuration needed
- 🎯 Simple - One command to rule them all
# Install dependencies
bun install
# Run tests
bun test
# Run example
bun run example.js
MIT License
Run with Bun, make label management simple! 🚀