Skip to main content

GitHub Integration

Wunderland includes 26 GitHub tools that give agents full repository management capabilities directly from the terminal. All tools are available in wunderland chat and can be composed into workflows with wunderland emergent.


Setup

Set your GitHub personal access token:

export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The token requires these scopes:

ScopeRequired For
repoRepository read/write, issues, pull requests
workflowGitHub Actions triggers
read:orgListing organization repos (optional)

Verify the token is detected:

wunderland doctor

The doctor output shows GitHub tool availability under the "Tools" section.


Available Tools (26)

Repository Management

ToolDescription
github_repo_listList repos for the authenticated user or an organization
github_repo_createCreate a new repository
github_repo_infoGet detailed info about a specific repo
github_repo_deleteDelete a repository (requires admin scope)
github_repo_cloneClone a repo to the agent's workspace

Pull Requests

ToolDescription
github_pr_listList open/closed/all PRs for a repo
github_pr_createCreate a new pull request
github_pr_reviewSubmit a review (approve, request changes, comment)
github_pr_mergeMerge a pull request
github_pr_closeClose a pull request without merging
github_pr_diffGet the diff for a pull request
github_pr_commentsList or add comments on a pull request

Issues

ToolDescription
github_issue_listList issues with label/state/assignee filters
github_issue_createCreate a new issue
github_issue_updateUpdate title, body, labels, or assignees
github_issue_closeClose an issue
github_issue_commentAdd a comment to an issue

Branches and Commits

ToolDescription
github_branch_listList branches for a repo
github_branch_createCreate a new branch from a ref
github_branch_deleteDelete a branch
github_commit_listList commits on a branch
github_commit_infoGet details for a specific commit

Actions and Releases

ToolDescription
github_actions_listList workflow runs for a repo
github_actions_triggerTrigger a workflow dispatch event
github_release_listList releases for a repo
github_release_createCreate a new release with tag

Usage in Chat

wunderland chat
> List my open pull requests on jddunn/wunderland
> Review PR #42 -- check for security issues and suggest improvements
> Create an issue titled "Add retry logic to video generation" with label "enhancement"
> Show me the last 5 commits on the master branch

The agent selects the appropriate GitHub tool, constructs the API call, and returns structured results.


Forged Tool Workflows

Use wunderland emergent to create reusable GitHub automation:

wunderland chat
> Create a workflow that reviews all open PRs on a repo, posts review comments,
> and merges any that pass all checks

wunderland emergent list --seed my-agent
# Shows the forged "pr-review-and-merge" workflow

wunderland emergent export pr-review-and-merge --seed my-agent --output ./pr-bot.emergent-tool.yaml

Forged tools that use GitHub are portable -- export them and import into other agents:

wunderland emergent import ./pr-bot.emergent-tool.yaml --seed another-agent

Security Considerations

  • GitHub tools are risk tier 2 (async review). In default security mode, the agent requests approval before mutating operations (create, merge, delete).
  • Use --overdrive to auto-approve tool calls for trusted automation.
  • The github_repo_delete and github_branch_delete tools are risk tier 3 and always require explicit confirmation unless --dangerously-skip-permissions is set.
  • All GitHub API calls are logged in the session log at ./logs/YYYY-MM-DD/*.log.