GitHub Token
This guide explains how to set up a GitHub Personal Access Token (PAT) for DAI so it can interact with your repositories.
Why do you need a GitHub token?
DAI uses the GitHub API to perform certain actions, such as:
- Creating issues directly from the CLI
- Adding default labels to issues
- Checking repository information
Without a GitHub token, these features will be disabled.
Creating a GitHub Personal Access Token
- Go to GitHub Developer Settings
- Click "Generate new token" β "Generate new token (classic)"
- Give your token a descriptive name (e.g.,
DAI CLI Tool
) - Set an expiration date (recommended: 90 days for security)
- Select the following scopes:
repo
β Full control of private repositories (required for issue creation)- Click Generate token and copy it β you will not be able to see it again!
Adding the token to DAI
You can add the token by running:
dai github-token
Or by editing your configuration file manually:
# ~/.dai/config.yaml
github_token: ghp_yourtokenhere
Security tips
- Never share your token with anyone
- Treat it like a password
- Revoke it immediately if you suspect itβs been compromised: Revoke token
Next: Commands