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

@royaltyport/cli

v0.3.8

Published

Royaltyport CLI — authenticate, list projects, and connect to project file systems

Readme

@royaltyport/cli

Command-line interface for Royaltyport. Authenticate, browse projects, and execute commands in project sandboxes.

Documentation

Full CLI reference available at docs.royaltyport.com/cli-reference.

Requirements

  • Node.js >= 18.0.0

Installation

npm install -g @royaltyport/cli

Or install from source:

git clone https://github.com/royaltyport/royaltyport-cli.git
cd royaltyport-cli
npm install
npm link

Authentication

The CLI supports two authentication methods. Browser login is the default and recommended approach. API tokens are available for server-side and headless environments.

Browser login (default)

royaltyport login

Opens your browser where you sign in to Royaltyport and approve access via OAuth. Tokens are received automatically and stored locally — nothing to copy or paste. Sessions are refreshed automatically.

API token login

For CI/CD, automation, or environments without a browser, pass an API token directly:

royaltyport login --token rp_your_token_here

Tokens are created in Organizations > Settings > Tokens in the Royaltyport platform.

Environment variables

For CI/CD or AI agent integrations, set these environment variables instead of running login:

| Variable | Description | | -------------------- | -------------------------------------------------------- | | ROYALTYPORT_TOKEN | API token — overrides stored credentials | | ROYALTYPORT_API_URL| Custom API base URL (default: https://api.royaltyport.com) |

Custom API URL

royaltyport login --api-url https://your-api-url.com

Logout

royaltyport logout

Commands

royaltyport projects

List all accessible projects.

royaltyport projects
ID                                     Name                Created
─────────────────────────────────────  ──────────────────  ──────────
a1b2c3d4-...                           Record Label Ltd    1/15/2025
e5f6g7h8-...                           Publishing Co       3/22/2025

royaltyport project info <project_id>

Display the AGENTS.md from the project sandbox — a filesystem overview with instructions for navigating project data.

royaltyport project info a1b2c3d4-e5f6-7890-abcd-ef1234567890

royaltyport project exec <project_id> <commands...>

Execute one or more bash commands in the project sandbox. Commands run with the sandbox workspace root as the working directory.

# Single command
royaltyport project exec $PROJECT_ID "ls contracts/"

# Multiple commands in one call (faster — reuses the same sandbox connection)
royaltyport project exec $PROJECT_ID "ls contracts/" "cat stats.yaml"

# Search for an entity by name
royaltyport project exec $PROJECT_ID "grep -rl 'Sony Music' entities/"

# Read a contract's extracted royalties
royaltyport project exec $PROJECT_ID "cat contracts/contract_123/extracted/royalties.yaml"

stdout and stderr are written to their respective streams, and the process exits with the last non-zero exit code (or 0 if all succeed) — making it suitable for scripting and AI agent tool use.

royaltyport contracts upload <project_id> [file_path]

Upload a contract PDF to a project.

# Upload from file
royaltyport contracts upload $PROJECT_ID contract.pdf

# Upload with extractions
royaltyport contracts upload $PROJECT_ID contract.pdf --extractions extract-royalties,extract-splits

# Upload from base64
royaltyport contracts upload $PROJECT_ID --base64 "$BASE64" --file-name contract.pdf

royaltyport contracts status <project_id> <staging_id>

Check processing status for a contract.

# Check once
royaltyport contracts status $PROJECT_ID $STAGING_ID

# Watch until complete
royaltyport contracts status $PROJECT_ID $STAGING_ID --watch

royaltyport contracts list <project_id>

List contracts in a project.

royaltyport contracts list $PROJECT_ID
royaltyport contracts list $PROJECT_ID --page 2 --per-page 50

royaltyport contracts download <project_id> <contract_id>

Download a contract file.

royaltyport contracts download $PROJECT_ID $CONTRACT_ID
royaltyport contracts download $PROJECT_ID $CONTRACT_ID --output ./downloads/contract.pdf

royaltyport statements upload <project_id> [file_path]

Upload a statement PDF to a project.

royaltyport statements upload $PROJECT_ID statement.pdf

# Upload from base64
royaltyport statements upload $PROJECT_ID --base64 "$BASE64" --file-name statement.pdf

royaltyport statements status <project_id> <staging_id>

Check processing status for a statement.

royaltyport statements status $PROJECT_ID $STAGING_ID
royaltyport statements status $PROJECT_ID $STAGING_ID --watch

royaltyport statements list <project_id>

List statements in a project.

royaltyport statements list $PROJECT_ID
royaltyport statements list $PROJECT_ID --page 2 --per-page 50

royaltyport statements download <project_id> <statement_id>

Download a statement file.

royaltyport statements download $PROJECT_ID $STATEMENT_ID
royaltyport statements download $PROJECT_ID $STATEMENT_ID --output ./downloads/statement.pdf

Agent Skill

This repo includes a skills.sh-compatible skill that teaches AI agents how to use the CLI to explore and query Royaltyport project data.

Install it into your agent:

npx skills add royaltyport/royaltyport-cli

The skill covers authentication, project discovery, filesystem layout, and common data access patterns — everything an agent needs to send the right project exec commands.

Configuration

Credentials and settings are stored at ~/.config/royaltyport/config.json (managed by conf). Running royaltyport logout clears this file.

License

UNLICENSED