gh) to perform a wide range of repository management tasks. By providing a GitHub token, you give your agent the ability to act on your behalf to manage code, issues, and automation.
Features
- Repository Management: Create, list, and explore repositories.
- Pull Requests: Create, review, merge, and list PRs.
- Issue Tracking: Manage issues and labels.
- GitHub Actions: Monitor and trigger workflow runs.
Prerequisites
To use this integration, you need:- The GitHub CLI (
gh) installed on your machine. - A GitHub Personal Access Token (PAT) with appropriate scopes (e.g.,
repo,workflow,write:packages).
Configuration
You can configure the GitHub integration by adding your token to the xCommand configuration file.Step 1: Migration
If you are already using xCommand, running the CLI will automatically update your~/.xcommand/config.json with a placeholder field:
Step 2: Authentication
Uncomment thegithub_token line and add your token:
GITHUB_TOKEN environment variable whenever it executes a GitHub command.