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

@ghx-dev/core

v0.4.4

Published

Route GitHub operations through deterministic adapters instead of fragile shell scraping. 70+ capabilities covering issues, PRs, repos, releases, and projects — each with validated input, normalized output, and automatic fallback routing.

Readme

npm version npm downloads CI (main) codecov License

Why ghx?

When AI agents use the gh CLI directly, they waste thousands of tokens on research, trial-and-error formatting, and guessing JSON parsing paths. ghx eliminates this waste by providing a stable, structured execution layer.

100% success rate, 73% fewer tool calls, 18% fewer active tokens, 54% lower latency compared to raw CLI usage (measured across 30 runs on standard PR workflows with Codex 5.3).

Read the full motivation: AI Agents Shouldn't Relearn GitHub on Every Run

sequenceDiagram
    participant Agent
    participant ghx as ghx
    participant GH as GitHub API

    %% Agent requests a typed execution
    Agent->>ghx: executeTask("pr.view", { owner, name, prNumber })
    
    %% ghx routing engine takes over
    Note over ghx: 1. Validate input schema<br/>2. Select optimal route (GraphQL/CLI)<br/>3. Run preflight checks
    ghx->>GH: typed GraphQL request
    GH-->>ghx: response
    Note over ghx: normalize errors & structure
    
    %% Stable envelope returned
    ghx-->>Agent: ResultEnvelope { ok: true, data: { ... } }

Features

  • 70+ Declarative Capabilities: PRs, issues, labels, workflows, projects, releases — all defined by versioned YAML operation cards.
  • Deterministic Routing: The agent doesn't choose CLI vs. GraphQL. ghx evaluates suitability rules and picks the optimal route automatically, with built-in fallbacks.
  • Stable Result Envelope: No try/catch needed. Every execution returns { ok, data, error, meta }. Errors are mapped to standard codes (AUTH, RATE_LIMIT, NOT_FOUND, etc.).
  • Chaining & Batching: Execute multiple steps (add label, add assignee, comment) in one call. ghx resolves node IDs and batches them into a single network request.
  • Type Safety: Full TypeScript schemas for inputs and outputs (via generated GraphQL types).

Documentation

Comprehensive documentation is available in the docs/ directory:

Install

npm i -g @ghx-dev/core

This makes the ghx CLI available in your PATH. Then wire it into your agent (see Agent Integration below).

For library usage (TypeScript imports), install as a project dependency instead:

npm install @ghx-dev/core

Quick Start (Library)

import { createGithubClientFromToken, executeTask } from "@ghx-dev/core"

const token = process.env.GITHUB_TOKEN!
const githubClient = createGithubClientFromToken(token)

// Execute a task: input is validated, optimal route is chosen
const result = await executeTask(
  { task: "repo.view", input: { owner: "aryeko", name: "ghx" } },
  { githubClient, githubToken: token },
)

if (result.ok) {
  console.log("Success:", result.data.nameWithOwner)
  console.log("Route used:", result.meta.route_used) // e.g. "graphql"
} else {
  console.error("Failed:", result.error.code) // e.g. "NOT_FOUND"
  console.error("Retryable?", result.error.retryable)
}

Quick Start (CLI)

Use ghx directly from your terminal or add it as an agent skill.

# List all 70+ capabilities
ghx capabilities list

# Run a capability
ghx run pr.view --input '{"owner":"aryeko","name":"ghx","prNumber":42}'

# Output is a standard ResultEnvelope:
# {
#   "ok": true,
#   "data": { ... },
#   "meta": { "capability_id": "pr.view", "route_used": "graphql", ... }
# }

Agent Integration

Claude Code -- install from the plugin marketplace:

/plugin marketplace add aryeko/ghx
/plugin install ghx@ghx-dev

Cursor, Windsurf, Codex, other agents -- install the skill:

ghx setup --scope user --yes

This writes SKILL.md to ~/.agents/skills/using-ghx/ which teaches your agent how to use ghx for reliable GitHub interactions. See Agent Setup for platform-specific wiring.

License

MIT