Home/Tools/@tpmjs/tools-github

listGists

@tpmjs/tools-github

List gists for the authenticated user or a specific user.

Official
ops
v0.2.0
MIT

Interactive Playground

Test @tpmjs/tools-github (listGists) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-github
pnpm add @tpmjs/tools-github
yarn add @tpmjs/tools-github
bun add @tpmjs/tools-github
deno add npm:@tpmjs/tools-github

2. Import the tool

import { listGists } from '@tpmjs/tools-github';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { listGists } from '@tpmjs/tools-github';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { listGists },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Signature

(per_page?: number, username?: string) => Promise<unknown>

Tags

agent
authenticated
devops
gists
git
github
list
ops
specific
tpmjs
user

Parameters

Available configuration options

Auto-extracted
username
Optional
Type: string

GitHub username to list gists for. Omit to list all public gists.

per_page
Optional
Type: number

Results per page (1-100, default: 30).

Schema extracted: 2/27/2026, 4:20:27 AM

README

@tpmjs/tools-github

GitHub API tools for AI agents. Manage repos, issues, pull requests, commits, branches, releases, gists, and Actions workflows.

Installation

npm install @tpmjs/tools-github

Setup

Set your GitHub personal access token:

export GITHUB_TOKEN="ghp_..."

Usage

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 });

Tools

ToolDescription
getRepoGet details of a GitHub repository
listReposList repositories for a user or organization
searchRepositoriesSearch GitHub repositories by query
createIssueCreate a new issue on a repository
getIssueGet details of a specific issue
listIssuesList issues with state and label filters
createIssueCommentAdd a comment to an issue or PR
getPullRequestGet details of a specific pull request
listPullRequestsList pull requests with filters
getFileContentGet file or directory contents from a repo
searchCodeSearch for code across GitHub
listBranchesList branches on a repository
getCommitGet details of a specific commit
listCommitsList commits with path and author filters
listReleasesList releases on a repository
getReleaseGet a specific release by tag name
createGistCreate a new GitHub Gist
listGistsList gists for a user
listWorkflowRunsList GitHub Actions workflow runs
getWorkflowRunGet details of a workflow run

License

MIT

Statistics

Downloads/month

200

GitHub Stars

15

Quality Score

89%

Bundle Size

NPM Keywords

tpmjs
github
git
devops
agent

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai