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

@agency-lang/github

v0.1.0

Published

GitHub integration for Agency

Readme

@agency-lang/github

GitHub operations stdlib for Agency. Built on Octokit + the local git binary.

Install

npm install @agency-lang/github

Auth

  • GITHUB_TOKEN — preferred (auto-provided in egonSchiele/run-agency-action).
  • GH_TOKENgh CLI compatibility.
  • token argument on each call — explicit override.

Repo context

Auto-detected from git remote get-url origin (HTTPS or SSH form). Override per call with owner / repo arguments.

Functions

| Function | Read-only? | Description | |---|---|---| | createBranch | | Create a branch from another (default: default branch). | | deleteBranch | | Delete a branch. | | branchExists | ✓ | Check whether a branch exists. | | commitFiles | | Stage + commit local changes, optionally push. Adds a Generated-by-Agency-Action trailer. | | openPullRequest | | Open a PR. | | listPullRequests | ✓ | List PRs. | | commentOnPullRequest | | Comment on a PR. | | addLabel | | Add labels. | | requestReview | | Request reviewers. | | listIssues | ✓ | List issues (excludes PRs). | | commentOnIssue | | Comment on an issue. | | createIssue | | Create an issue. | | defaultBranch | ✓ | Get the repo's default branch. |

Read-only functions are marked safe so they're surfaced as readOnlyHint in agency serve mcp.

Security

  • Branch names are validated with a strict regex before being passed to git. Argument-injection patterns like --upload-pack=... are rejected.
  • File paths in git add are passed after a -- separator.
  • git push is never --force or --force-with-lease.
  • commitFiles does not modify global git config or write tokens to disk; auth uses whatever origin already has (e.g. actions/checkout's extraheader, or your local credential helper).

Example

import { commitFiles, openPullRequest } from "pkg::@agency-lang/github"

node main() {
  const commit = commitFiles(message: "agent: tidy", branch: "agent/tidy")
  openPullRequest(title: "Tidy", body: "Automated.", head: "agent/tidy")
}