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

@vforsh/regru-cli

v0.1.0

Published

CLI for REG.RU API2 (non-reseller)

Readme

regru-cli

regru-cli is a Bun-based command line tool for REG.RU API2 focused on non-reseller workflows.

Official API docs: https://www.reg.ru/reseller/api2doc

Install

Requires Bun 1.4.3 or newer. Development uses native TypeScript 7.0.2 (tsc).

bun upgrade
bun add --global @vforsh/regru-cli
regru --help

From a local checkout:

cd ~/dev/regru-cli
bun install
bun link
regru --help

Development checks: bun run typecheck && bun test.

The published package includes the Bun entry point, TypeScript sources, and agent skill.

Auth and config

Secrets are never accepted in argv flags.

regru cfg set username your-username
printf 'your-password' | regru cfg set password -
regru cfg set endpoint=https://api.reg.ru/api/regru2 timeout=20000 retries=1

Config precedence: explicit CLI flags > environment variables > saved config > built-in defaults. Config files are saved with owner-only permissions (0600).

Environment variables:

  • REGRU_USERNAME
  • REGRU_PASSWORD
  • REGRU_ENDPOINT
  • REGRU_TIMEOUT
  • REGRU_RETRIES
  • REGRU_REGION

timeout must be an integer from 1 to 120000 milliseconds; retries must be an integer from 0 to 10. Endpoints must use HTTP or HTTPS. Invalid values exit with code 2. Retries apply to read-only nop and get_* calls after network failures or HTTP 408/429/5xx responses; write operations are sent once.

Quick examples

# Basic connectivity
regru nop

# List all services
regru services list

# List domains only
regru domains list

# Get zone records
regru zone records example.test

# Add DNS TXT record (non-reseller API)
regru zone add txt example.test subdomain=_acme-challenge text='token-value' ttl=300

# Batch DNS update (action_list is sent as structured JSON)
regru zone update example.test 'action_list=[{"action":"add_txt","subdomain":"_acme-challenge","text":"token-value"}]'

# Generic call for any non-reseller endpoint
regru do service/get_list servtype=domain

# Secret API parameters come from stdin
printf 'new-password' | regru do user/create user_login=new-user user_password=- [email protected]

Commands

  • cfg|config - config management (list|ls|path|get|set|unset|import|export)
  • doctor|check - read-only readiness checks
  • skill - prints skill install URL
  • nop - authenticated no-op check
  • services list
  • domains list
  • zone records|add|remove|update|clear
  • do|run|gen - generic non-reseller method call
  • result, wait - reserved; not supported for REG.RU synchronous API flow

Output modes

  • default: human output
  • --plain: stable line-oriented output
  • --json: single JSON object output

cfg path, cfg set, cfg unset, and skill also honor --json. Errors use { "error": { "message", "exitCode", "details" } } on stdout; a failed doctor --json places its check report in error.details. Usage errors exit with code 2; API/network failures exit with code 1, including per-domain and per-action failures inside a successful API envelope. zone records --plain prints one JSON record per line.

Notes

  • Reseller API methods are intentionally blocked in this CLI.
  • REG.RU can restrict API access by source IP. ACCESS_DENIED_FROM_IP means the request reached REG.RU but its API IP allowlist rejected the connection; check the API access settings and the VPN/direct public IP.
  • Read-only verification: regru doctor, regru nop, regru domains list, regru zone records <domain>.
  • REG.RU provides a test account: REGRU_USERNAME=test REGRU_PASSWORD=test regru --json nop. Test mode validates requests and returns simulated results without making real changes.
  • Full config roundtrip:
regru cfg export --json > cfg.json
regru cfg import --json < cfg.json