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

@nkmc/cli

v0.5.5

Published

The gateway of internet for all agents — nkmc CLI

Downloads

822

Readme

@nkmc/cli

Command-line tool for the nkmc gateway. Scan your API, generate a skill.md, register it with the gateway, and interact with registered services as an agent.

Install

npm install -g @nkmc/cli

Quick Start

# Authenticate with the gateway (saves token to ~/.nkmc/credentials.json)
nkmc auth

# List services on the gateway
nkmc ls /

# Read a service's skill.md
nkmc cat /api.weather.gov/skill.md

Commands

nkmc auth

Authenticate with the gateway. Fetches a JWT token (valid 24h) and saves it locally.

nkmc auth
nkmc auth --gateway-url https://your-gateway.example.com

After authenticating, all ls/cat/grep/write/rm commands work without setting environment variables.

nkmc init [dir]

Detect your project's framework and generate a nkmc.config.ts configuration file.

nkmc init

Supports Hono, Express, Fastify, and Next.js. Detects Prisma and Drizzle ORMs.

nkmc generate [dir]

Scan your project and generate .well-known/skill.md.

nkmc generate
nkmc generate --register --gateway-url https://api.nkmc.ai --domain myapi.com

Options:

  • --register — Register with the gateway after generating
  • --gateway-url <url> — Gateway URL for registration
  • --token <token> — Auth token for registration
  • --domain <domain> — Domain name for the service

nkmc claim <domain>

Claim domain ownership via DNS TXT record verification.

# Step 1: Request a DNS challenge
nkmc claim myapi.com --gateway-url https://api.nkmc.ai

# Step 2: Add the TXT record to your DNS, then verify
nkmc claim myapi.com --gateway-url https://api.nkmc.ai --verify

On success, a publish token is saved to ~/.nkmc/credentials.json for that domain.

nkmc register

Register your skill.md with the gateway.

nkmc register --gateway-url https://api.nkmc.ai --domain myapi.com

The token is resolved in this order:

  1. --token flag
  2. NKMC_PUBLISH_TOKEN env var
  3. Saved publish token from nkmc claim

nkmc ls <path>

List files/services on the gateway.

nkmc ls /                          # List all services
nkmc ls /api.weather.gov/          # List contents of a service

nkmc cat <path>

Read a file from the gateway.

nkmc cat /api.weather.gov/skill.md
nkmc cat /api.weather.gov/alerts/active

nkmc grep <pattern> <path>

Search across services on the gateway.

nkmc grep "weather" /
nkmc grep "forecast" /api.weather.gov/

nkmc write <path> <data>

Write data to a path on the gateway.

nkmc rm <path>

Remove a file on the gateway.

Authentication

The CLI resolves credentials in this order:

  1. NKMC_TOKEN / NKMC_GATEWAY_URL environment variables
  2. Saved agent token from nkmc auth (~/.nkmc/credentials.json)
  3. Default gateway URL: https://api.nkmc.ai

Configuration Directory

Credentials are stored in ~/.nkmc/credentials.json (permissions 0600). Override the directory with the NKMC_HOME environment variable.

Workflow: Registering Your API

# 1. Initialize config
nkmc init

# 2. Generate skill.md
nkmc generate

# 3. Claim your domain
nkmc claim myapi.com --gateway-url https://api.nkmc.ai
# ... add DNS TXT record ...
nkmc claim myapi.com --gateway-url https://api.nkmc.ai --verify

# 4. Register with the gateway
nkmc register --gateway-url https://api.nkmc.ai --domain myapi.com

License

MIT