Installation
GitHub Labels CLI is designed to be run from source. Follow these steps to set up the project locally.
Prerequisites
Before you begin, make sure you have:
- Node.js (version 20 or higher)
- pnpm (version 9.12.3 or higher)
- A GitHub account
- A GitHub Personal Access Token with appropriate permissions
Setting Up the Project
- Clone the repository:
bash
git clone https://github.com/Shironex/gh-labels-cli.git
cd gh-labels-cli
- Install dependencies:
bash
pnpm install
- Run the CLI in development mode:
bash
pnpm dev
GitHub Token Setup
GitHub Labels CLI requires a Personal Access Token to access your repositories. You can set it up in two ways:
As an environment variable
GITHUB_TOKEN
:GITHUB_TOKEN=your_github_token
You can add this to a
.env
file in the project root:# .env file GITHUB_TOKEN=your_github_token
When prompted during interactive mode.
Creating a GitHub Token
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token" and select "Generate new token (classic)"
- Give your token a descriptive name
- Select the
repo
scope to allow managing repository labels - Click "Generate token" and copy the token