-
Notifications
You must be signed in to change notification settings - Fork 0
github setup
This guide explains how to set up GitHub CLI (gh) with the AI Agent Kit project.
Run the PowerShell script:
.\scripts\install-github-cli.ps1IMPORTANT: After installation, you must restart your terminal/IDE for the gh command to be available in the PATH. The installation succeeds but the command won't be recognized until you restart your terminal.
Or install manually:
- Download from GitHub CLI releases
- Run the Windows x64 MSI installer
- Restart your terminal
Run the shell script:
./scripts/install-github-cli.shInstall via Homebrew:
brew install ghAfter installation, authenticate with GitHub:
gh auth loginFollow the prompts to:
- Select GitHub.com (or GitHub Enterprise if applicable)
- Choose HTTPS as the preferred protocol
- Authenticate with your web browser
- Complete the authentication process
The project includes GitHub CLI integration through MCP (Model Context Protocol). The configuration is in .ai-agents/config/mcp.json:
"github": {
"type": "stdio",
"command": "gh",
"args": ["mcp-server"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
},
"description": "GitHub CLI integration for repository management, issues, and PRs"
}Set the GITHUB_TOKEN environment variable for automatic authentication:
$env:GITHUB_TOKEN = "your_token_here"
# Or add to profile for persistence:
echo '$env:GITHUB_TOKEN = "your_token_here"' >> $PROFILEexport GITHUB_TOKEN="your_token_here"
# Or add to ~/.bashrc or ~/.zshrc for persistence:
echo 'export GITHUB_TOKEN="your_token_here"' >> ~/.bashrcOnce configured, you can use GitHub CLI features through the AI Agent Kit:
- Repository management
- Issue tracking and creation
- Pull request operations
- Release management
- GitHub Actions workflows
- Code review automation
Verify the installation works:
gh --version
gh auth statusNote: If you get "command not found" errors, restart your terminal and try again. This is normal after installation on Windows.
- Command not found: Restart your terminal after installation - this is required on Windows for the PATH to update
- "gh: The term 'gh' is not recognized": This is the same issue - restart your IDE/terminal
-
Authentication failed: Run
gh auth loginagain - Permission denied: Ensure your GitHub token has the necessary scopes
- GitHub CLI documentation: https://cli.github.com/manual/
- AI Agent Kit issues: Create an issue in this repository
The GitHub CLI integration allows AI agents to:
- Create and manage repositories
- Handle issues and pull requests
- Interact with GitHub APIs
- Automate CI/CD workflows
- Generate code reviews
This enables powerful automation capabilities for development workflows.
Les contributions sont bienvenues ! Voir CONTRIBUTING.md
This documentation is automatically synced from the main repository.