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

opencode-cross-repo

v0.4.1

Published

OpenCode plugin for cross-repository operations with GitHub and GitLab support

Readme

opencode-cross-repo

An OpenCode plugin that adds a cross-repository operations tool. Clone repos, grep across codebases, open PRs/MRs, and coordinate changes across multiple repositories in a single session.

Install

Add the plugin to your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-cross-repo"]
}

OpenCode installs npm plugins automatically at startup. See the plugin docs.

You can also install from a local file — copy src/index.ts to .opencode/tool/cross-repo.ts with a shescape dependency. See the local file docs.

Example workflows

Coordinated multi-repo update:

User: Update the SDK and docs repos to use the new API endpoint

Agent:
1. clone owner=myorg repo=sdk
2. exec command="grep -r 'api.v1.example.com' --include='*.ts'"
3. write path=src/api.ts content="..."
4. branch name=update-api-endpoint
5. commit message="update API endpoint to v2"
6. push
7. pr title="update API endpoint" message="..."
8. clone owner=myorg repo=docs
9. write path=api/endpoints.md content="..."
10. branch name=update-api-docs
11. commit message="document new v2 endpoint"
12. push
13. pr title="document v2 endpoint" message="..."

Cross-repo code search:

User: Find all usages of the deprecated AuthService class across our repos

Agent:
1. clone owner=myorg repo=frontend
2. exec command="grep -rn 'AuthService' --include='*.ts' --include='*.tsx'"
3. clone owner=myorg repo=backend
4. exec command="grep -rn 'AuthService' --include='*.py'"

Operations

| Operation | Description | |---|---| | clone | Shallow clone to a session-scoped temp directory | | read | Read a file (path relative to repo root) | | write | Write a file (path relative to repo root) | | list | List files (optionally under a subpath) | | branch | Create and checkout a new branch | | commit | Stage all changes and commit | | push | Push current branch to remote | | pr | Create a PR (GitHub) or MR (GitLab) | | exec | Run a shell command in the repo directory |

Authentication

Works automatically in most cases:

  • Interactive — picks up gh auth login / glab auth login tokens, falls back to GH_TOKEN/GITHUB_TOKEN or GL_TOKEN/GITLAB_TOKEN env vars
  • CI — uses OIDC token exchange in GitHub Actions (preferred), or GITHUB_TOKEN / GL_TOKEN / GITLAB_TOKEN / CI_JOB_TOKEN env vars

Platform detection and configuration

The plugin detects GitHub vs. GitLab from the current repo's git remote. Hostnames containing github use gh, hostnames containing gitlab use glab, and unknown hosts default to GitHub.

Override with env vars when auto-detection doesn't work:

CROSS_REPO_PLATFORM=gitlab     # force gitlab
GITLAB_HOST=gitlab.corp.com    # self-hosted GitLab
GITHUB_HOST=github.corp.com    # GitHub Enterprise

For self-hosted instances, use the plugin factory:

// .opencode/plugins/cross-repo.ts
import { crossRepo } from "opencode-cross-repo/advanced"

export default crossRepo({
  platform: "gitlab",
  gitlabHost: "gitlab.corp.com"
})

Requirements

  • Bun runtime (OpenCode uses Bun)
  • gh CLI for GitHub, glab CLI for GitLab

Links

License

Apache-2.0