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

@patchops/cli

v0.1.0

Published

Command-line client for PatchOps MCP instance URLs.

Readme

PatchOps CLI

PatchOps CLI supports both of the main PatchOps execution surfaces:

  • direct invoke over /api/v1/invoke for automation-friendly connector + method + args
  • MCP over /api/mcp for tool discovery, raw MCP inspection, and sandboxed code execution

The CLI still starts from a PatchOps MCP URL such as:

https://patchops.ai/api/mcp/<instanceId>

It supports two auth modes:

  • PatchOps OAuth login against the shared MCP endpoint, https://patchops.ai/api/mcp
  • Personal access token auth against a direct instance URL such as https://patchops.ai/api/mcp/<instanceId>

That gives agents and local tools a normal CLI path without forcing them to speak MCP directly, while still leaving the MCP transport available when you need it.

Install

From npm, once the package is published:

npm install -g @patchops/cli
patchops help

From the repo:

npm install
npm run cli:build
node cli/dist/index.js help

To expose a global patchops command from a local checkout:

cd cli
npm link
patchops help

Build

From the repo root:

npm run cli:build

The compiled binary is written to cli/dist/index.js.

To produce the npm tarball locally:

npm run cli:pack

Configure

Log in with your PatchOps account through OAuth:

node cli/dist/index.js login

This stores a refreshable CLI session and points the CLI at the shared MCP endpoint.

Set both the direct MCP URL and a personal access token with environment variables:

export PATCHOPS_URL="https://patchops.ai/api/mcp/<instanceId>"
export PATCHOPS_TOKEN="po_pat_..."

Or store them locally:

node cli/dist/index.js config set-url "https://patchops.ai/api/mcp/<instanceId>"
node cli/dist/index.js config set-token "po_pat_..."

You can inspect the current config with:

node cli/dist/index.js config show

Sign out and remove the stored OAuth session:

node cli/dist/index.js logout

Commands

Direct invoke for automation:

node cli/dist/index.js invoke welldatabase getOperatorWells --input '{"county":"Loving","operator":"Mitsui"}'
node cli/dist/index.js invoke postgres query --input '{"sql":"select now() as ts"}' --json

List tools:

node cli/dist/index.js tools list
node cli/dist/index.js tools list corva

Call a built-in PatchOps tool over MCP:

node cli/dist/index.js call patchops_listSkills
node cli/dist/index.js call patchops_orgViewUsage --input '{"month":3,"year":2026}'

Agent-friendly JSON output:

node cli/dist/index.js tools list --json
node cli/dist/index.js call patchops_listSkills --json

Execute sandboxed connector code over MCP:

node cli/dist/index.js exec welldatabase ./examples/welldatabase.ts --timeout 60

Clear just the stored token:

node cli/dist/index.js config clear-token

Run a JSON-RPC batch file:

node cli/dist/index.js batch ./requests.json

Batch files can be either:

[
  {
    "tool": "patchops_listSkills",
    "input": {}
  },
  {
    "tool": "patchops_orgListMembers",
    "input": {}
  }
]

or raw JSON-RPC:

[
  {
    "jsonrpc": "2.0",
    "id": "members",
    "method": "tools/call",
    "params": {
      "name": "patchops_orgListMembers",
      "arguments": {}
    }
  }
]

Publish

Local publish:

cd cli
npm publish --access public

GitHub Actions publish:

  • add an NPM_TOKEN repository secret with publish access to the @patchops scope
  • run the Publish CLI workflow from main