This guide walks you through setting up GitHub for the autonomous dev team agents.
- GitHub CLI (
gh) installed:brew install ghor see cli.github.com - A GitHub account with repository access
Create a new repository for your project:
gh repo create my-project --public --clone
cd my-projectOr use an existing repository.
- Go to GitHub Settings > Developer settings > Personal access tokens > Tokens (classic)
- Click "Generate new token (classic)"
- Name: "Agent Dev Crew"
- Expiration: Set as needed (recommend 90 days minimum)
- Select scopes:
repo(Full control of private repositories)project(Full control of projects)read:org(Read org membership, if using organization)
- Click "Generate token"
- Copy and save the token securely
Authenticate the gh CLI with your token:
gh auth loginOr set the token as an environment variable:
export GH_TOKEN=ghp_your_token_hereCreate a project board for task management:
# Create a new project
gh project create --owner YOUR_USERNAME --title "Dev Team Board"
# Note the project number from the outputOr use the GitHub UI:
- Go to your profile or organization
- Click "Projects" tab
- Click "New project"
- Choose "Board" template
- Name it "Dev Team Board"
The project should have these status columns:
| Status | Purpose |
|---|---|
| Backlog | New items not yet prioritized |
| Ready for Dev | Prioritized and ready for development |
| In Progress | Currently being worked on |
| In Review | PR created, awaiting review |
| Done | Completed and merged |
To add/configure columns via CLI:
# List existing fields
gh project field-list PROJECT_NUMBER --owner OWNER
# The Status field should already exist with Single Select type
# You can add options via the GitHub UICreate labels for categorizing issues:
# Feature label
gh label create feature --color 0E8A16 --description "New feature or enhancement"
# Bug label
gh label create bug --color D73A4A --description "Something isn't working"
# Priority labels
gh label create p1 --color B60205 --description "Critical priority"
gh label create p2 --color FBCA04 --description "High priority"
gh label create p3 --color 0E8A16 --description "Normal priority"
# Urgent label
gh label create urgent --color D93F0B --description "Needs immediate attention"Test the GitHub integration:
# Test issue creation
gh issue create --title "Test issue" --body "Testing agent setup" --label "feature"
# List issues
gh issue list --json number,title,state
# Test project access
gh project item-list PROJECT_NUMBER --owner OWNER --format json
# Clean up test issue
gh issue close ISSUE_NUMBER
gh issue delete ISSUE_NUMBER --yesTo move items between columns, you need the project ID and field option IDs:
# Get project ID
gh project list --owner OWNER --format json
# Get field IDs
gh project field-list PROJECT_NUMBER --owner OWNER --format jsonSave these IDs for reference when moving items programmatically.
# Create issue
gh issue create --title "Title" --body "Body" --label "feature"
# List issues
gh issue list --json number,title,state,labels
# View issue
gh issue view 123 --json body,comments
# Comment on issue
gh issue comment 123 --body "Comment text"
# Close issue
gh issue close 123# Create PR
gh pr create --title "Title" --body "Body" --head feature-branch
# List PRs
gh pr list --json number,title,state
# View PR
gh pr view 123 --json additions,deletions,files
# Merge PR
gh pr merge 123 --squash# List items
gh project item-list PROJECT_NUMBER --owner OWNER --format json
# Add issue to project
gh project item-add PROJECT_NUMBER --owner OWNER --url https://github.com/OWNER/REPO/issues/123
# Edit item (move to different status)
gh project item-edit --project-id PROJECT_ID --id ITEM_ID --field-id FIELD_ID --single-select-option-id OPTION_ID- Verify token has correct scopes (
repo,project) - Check token hasn't expired
- Ensure you have write access to the repository
- Check project permissions allow the token to modify items
- Use
gh project viewto verify access
# Check authentication status
gh auth status
# Re-authenticate if needed
gh auth login