npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@loopstack/github-module

v0.2.3

Published

GitHub integration for the Loopstack automation framework. Provides a GitHub OAuth provider and tools for GitHub services such as repositories, issues, pull requests, actions, and more.

Downloads

565

Readme

@loopstack/github-module

GitHub integration for the Loopstack AI automation framework.

This module provides a GitHub OAuth 2.0 provider implementation and 25 tools across 7 domains for interacting with GitHub APIs. It registers a GitHub OAuth provider with @loopstack/oauth-module, enabling GitHub authentication in any Loopstack workflow, and provides tools for repositories, issues, pull requests, content/git ops, actions, search, and users/orgs.

Overview

The GitHub Module includes a provider implementation for @loopstack/oauth-module. It implements the OAuthProviderInterface and self-registers with the OAuthProviderRegistry on startup. Once registered, the generic OAuth workflow can handle provider: 'github' automatically.

By using this module, you'll be able to:

  • Authenticate users with their GitHub account via OAuth 2.0
  • Manage repositories, branches, issues, and pull requests programmatically
  • Read and write file content, list directories, and inspect commits
  • Trigger and monitor GitHub Actions workflow runs
  • Search code, repositories, and issues across GitHub
  • Access user profiles and organization memberships

Installation

See SETUP.md for installation and setup instructions.

This module requires @loopstack/oauth-module as a peer dependency.

How It Works

Provider Registration

The GitHubOAuthProvider implements OnModuleInit and registers itself with the OAuthProviderRegistry at startup:

onModuleInit(): void {
  this.providerRegistry.register(this);
}

After registration, the generic OAuthWorkflow from @loopstack/oauth-module can handle authentication for provider: 'github'.

Provider Details

| Property | Value | | --------------- | --------------------------------------------- | | providerId | 'github' | | defaultScopes | repo, user, workflow, read:org | | Auth endpoint | https://github.com/login/oauth/authorize | | Token endpoint | https://github.com/login/oauth/access_token |

Note: GitHub OAuth tokens do not expire and do not support refresh. The refreshToken() method throws an error.

Environment Variables

GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret
GITHUB_OAUTH_REDIRECT_URI=/oauth/callback

Tools

Repositories

  • GitHubListReposTool — List repositories for the authenticated user
  • GitHubGetRepoTool — Get detailed repository information
  • GitHubCreateRepoTool — Create a new repository
  • GitHubListBranchesTool — List branches for a repository

Issues

  • GitHubListIssuesTool — List issues for a repository
  • GitHubGetIssueTool — Get detailed issue information
  • GitHubCreateIssueTool — Create a new issue
  • GitHubCreateIssueCommentTool — Comment on an issue or pull request

Pull Requests

  • GitHubListPullRequestsTool — List pull requests for a repository
  • GitHubGetPullRequestTool — Get detailed pull request information
  • GitHubCreatePullRequestTool — Create a new pull request
  • GitHubMergePullRequestTool — Merge a pull request
  • GitHubListPrReviewsTool — List reviews on a pull request

Content / Git Ops

  • GitHubGetFileContentTool — Get file content (base64-decoded)
  • GitHubCreateOrUpdateFileTool — Create or update a file
  • GitHubListDirectoryTool — List directory contents
  • GitHubGetCommitTool — Get commit details

Actions

  • GitHubListWorkflowRunsTool — List workflow runs
  • GitHubTriggerWorkflowTool — Trigger a workflow dispatch
  • GitHubGetWorkflowRunTool — Get workflow run details

Search

  • GitHubSearchCodeTool — Search code across repositories
  • GitHubSearchReposTool — Search repositories
  • GitHubSearchIssuesTool — Search issues and pull requests

Users & Orgs

  • GitHubGetAuthenticatedUserTool — Get authenticated user profile
  • GitHubListUserOrgsTool — List user organizations

Usage in Workflows

Once registered, any workflow can trigger GitHub authentication by launching the OAuth workflow with provider: 'github':

@InjectWorkflow() oAuth: OAuthWorkflow;

// In a transition method:
const result = await this.oAuth.run(
  { provider: 'github', scopes: ['repo', 'read:org', 'workflow'] },
  { alias: 'oAuth', callback: { transition: 'authCompleted' } },
);

await this.repository.save(
  LinkDocument,
  {
    label: 'GitHub authentication required',
    workflowId: result.workflowId,
    embed: true,
    expanded: true,
  },
  { id: `link_${result.workflowId}` },
);

See @loopstack/oauth-module and @loopstack/github-oauth-example for complete usage examples.

Dependencies

  • @loopstack/oauth-module — Provides OAuthProviderRegistry, OAuthProviderInterface, and OAuthTokenSet

About

Author: Jakob Klippel

License: Apache-2.0

Additional Resources