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

@resourcexjs/cli

v2.22.0

Published

ResourceX CLI - rx command

Readme

@resourcexjs/cli

Command-line interface for ResourceX - the resource management protocol for AI Agents.

Installation

npm install -g @resourcexjs/cli

Or with other package managers:

# pnpm
pnpm add -g @resourcexjs/cli

# yarn
yarn global add @resourcexjs/cli

# bun
bun add -g @resourcexjs/cli

Quick Start

# Add a resource from local directory
rx add ./my-prompt

# Use a resource
rx use [email protected]

# List local resources
rx list

# Push to remote registry
rx config set registry https://registry.example.com
rx push [email protected]

Commands

Local Resource Management

rx add <path>

Add a resource from a local directory to local storage.

rx add ./my-prompt

The directory must contain a resource.json manifest file.

rx list [query]

List all local resources. Optionally filter by search query.

# List all resources
rx list

# Filter by name
rx list prompt

rx info <locator>

Show detailed information about a resource.

rx info [email protected]

Output includes locator, name, type, version, and file tree.

rx use <locator>

Execute a resource and output the result.

rx use [email protected]
  • String results are printed to stdout
  • Binary results are written to stdout
  • JSON/object results are pretty-printed

rx remove <locator>

Remove a resource from local storage.

rx remove [email protected]

Development

rx link <path>

Link a resource directory for development. Changes to the source are reflected immediately.

rx link ./dev-prompt

rx unlink <locator>

Remove a development link.

rx unlink [email protected]

Remote Registry

rx push <locator>

Push a local resource to a remote registry.

# Use configured registry
rx push [email protected]

# Override registry
rx push [email protected] --registry https://registry.example.com

Options:

  • -r, --registry <url> - Registry URL (overrides config)

rx pull <locator>

Pull a resource from a remote registry to local cache.

# Use configured registry
rx pull [email protected]

# Override registry
rx pull [email protected] --registry https://registry.example.com

Options:

  • -r, --registry <url> - Registry URL (overrides config)

rx search <query>

Search resources in a remote registry.

rx search prompt

# Limit results
rx search prompt --limit 10

Options:

  • --limit <n> - Maximum results (default: 20)

Cache Management

rx cache clear

Clear cached remote resources.

# Clear all cached resources
rx cache clear

# Clear resources from specific registry
rx cache clear --registry registry.example.com

Options:

  • -r, --registry <host> - Only clear resources from this registry

Configuration

rx config list

Display current configuration.

rx config list

rx config set <key> <value>

Set a configuration value.

# Set default registry
rx config set registry https://registry.example.com

# Set storage path
rx config set path /custom/path

Valid keys:

  • path - Local storage path (default: ~/.resourcex)
  • registry - Default registry URL

Server

rx server

Start a registry API server for hosting resources.

# Start with defaults (port 3000, storage ./data)
rx server

# Custom port and storage
rx server --port 8080 --storage /var/resourcex

Options:

  • --port <n> - Port to listen on (default: 3000)
  • --storage <path> - Storage path for resources (default: ./data)

Server endpoints:

  • GET /health - Health check
  • POST /publish - Publish resource
  • GET /resource/:loc - Get manifest
  • GET /content/:loc - Get content
  • GET /search - Search resources

Configuration

Config File

Configuration is stored at ~/.resourcex/config.json:

{
  "path": "~/.resourcex",
  "registry": "https://registry.example.com"
}

Environment Variables

Environment variables take precedence over config file:

  • RX_HOME - Override storage path
  • RX_REGISTRY - Override default registry

Directory Structure

~/.resourcex/
├── config.json     # CLI configuration
├── local/          # Local resources (rx add)
├── cache/          # Cached remote resources (rx pull)
└── linked/         # Development symlinks (rx link)

Locator Format

Resources use a Go-style locator format:

# Local resource (no registry)
name.type@version
[email protected]

# Remote resource (with registry)
registry/name.type@version
registry.example.com/[email protected]

License

Apache-2.0