@tpmjs/tools-github
List commits on a repository with optional path and author filters.
Test @tpmjs/tools-github (listCommits) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-githubpnpm add @tpmjs/tools-githubyarn add @tpmjs/tools-githubbun add @tpmjs/tools-githubdeno add npm:@tpmjs/tools-githubimport { listCommits } from '@tpmjs/tools-github';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { listCommits } from '@tpmjs/tools-github';
const result = await generateText({
model: openai('gpt-4o'),
tools: { listCommits },
prompt: 'Your prompt here...',
});
console.log(result.text);(repo: string, owner: string, sha?: string, path?: string, since?: string, until?: string, author?: string, per_page?: number) => Promise<unknown>Available configuration options
ownerstringRepository owner.
repostringRepository name.
shastringSHA or branch to start listing from (defaults to default branch).
pathstringOnly commits containing this file path.
authorstringGitHub username or email to filter by author.
sincestringOnly commits after this date (ISO 8601 timestamp).
untilstringOnly commits before this date (ISO 8601 timestamp).
per_pagenumberResults per page (1-100, default: 30).
Schema extracted: 2/28/2026, 4:00:20 AM
GitHub API tools for AI agents. Manage repos, issues, pull requests, commits, branches, releases, gists, and Actions workflows.
npm install @tpmjs/tools-github
Set your GitHub personal access token:
export GITHUB_TOKEN="ghp_..."
import { getRepo, listIssues, searchCode } from '@tpmjs/tools-github'; const repo = await getRepo.execute({ owner: 'vercel', repo: 'next.js' }); const issues = await listIssues.execute({ owner: 'vercel', repo: 'next.js', state: 'open', per_page: 5 }); const results = await searchCode.execute({ q: 'useState language:typescript', per_page: 10 });
| Tool | Description |
|---|---|
getRepo | Get details of a GitHub repository |
listRepos | List repositories for a user or organization |
searchRepositories | Search GitHub repositories by query |
createIssue | Create a new issue on a repository |
getIssue | Get details of a specific issue |
listIssues | List issues with state and label filters |
createIssueComment | Add a comment to an issue or PR |
getPullRequest | Get details of a specific pull request |
listPullRequests | List pull requests with filters |
getFileContent | Get file or directory contents from a repo |
searchCode | Search for code across GitHub |
listBranches | List branches on a repository |
getCommit | Get details of a specific commit |
listCommits | List commits with path and author filters |
listReleases | List releases on a repository |
getRelease | Get a specific release by tag name |
createGist | Create a new GitHub Gist |
listGists | List gists for a user |
listWorkflowRuns | List GitHub Actions workflow runs |
getWorkflowRun | Get details of a workflow run |
MIT
Downloads/month
200
GitHub Stars
15
Quality Score