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

@wangyjhh/msgr

v0.4.5

Published

This is A security group rule management tool for Alibaba Cloud ESC implemented based on the official SDK.

Readme

@wangyjhh/msgr

A security group rule management tool for Alibaba Cloud ESC implemented based on the official SDK.

Install

# npm
npm i @wangyjhh/msgr -g

# pnpm
pnpm add @wangyjhh/msgr -g

Usage

CLI

Usage: msgr [options] [command]

Alibaba Cloud security group rule management tool.

Options:
  -v, --version                      Output version number.
  -h, --help                         display help for command

Commands:
  config <tpye>                      Configuration
  list|ls                            Review the security group rules.
  add|ad                             Add the security group rules.
  remove|rm                          Remove the security group rules.
  modify|mo                          Modify the security group rules.
  help [command]                     display help for command

API

import MSGR from '@wangyjhh/msgr'

const region_msgr = new MSGR({
    regionId: 'your regionId',
    accessKeyId: 'your accessKeyId',
    accessKeySecret: 'your accessKeySecret',
})

regionId Supports values. For details, see regionIdMap

Example

Cli

Enter the command and fill in the necessary information according to the command line instructions

Get config

msgr config get

Set config

msgr config set

Default config

msgr config default

Remove config

msgr config remove

Clear config

msgr config clear

Get Security group rules list

msgr list
# The following commands will also work
msgr ls

Add Security group rules

msgr add
# The following commands will also work
msgr ad
msgr insert

Remove Security group rules

msgr remove
# The following commands will also work
msgr rm
msgr delete

Modify Security group rules

msgr modify
# The following commands will also work
msgr mo
msgr edit

API

import MSGR from '@wangyjhh/msgr'

const region_msgr = new MSGR({
    regionId: 'your regionId',
    accessKeyId: 'your accessKeyId',
    accessKeySecret: 'your accessKeySecret',
})

const main = async () => {
    // get security group id
    const security_group_id = (await region_msgr.getSecurityGroupId())[0]

    // get security group rules
    const security_group_test_rule_ifno = await region_msgr.getSecurityGroup(security_group_id, (item) => {
        return item.portRange === '80/80'
    })

    // get security group rule id
    const security_group_test_rule_id = security_group_test_rule_ifno[0].securityGroupRuleId

    // add security group rules
    await region_msgr.addSecurityGroup(security_group_id, {
        policy: 'accept',
        priority: '2',
        ipProtocol: 'TCP',
        portRange: '80/80',
        sourceCidrIp: '0.0.0.0/0',
        description: 'test',
    })

    // modify security group rules
    await region_msgr.modifySecurityGroup(security_group_id, security_group_test_rule_id, {
        policy: 'drop',
        priority: '2',
        ipProtocol: 'TCP',
        portRange: '80/80',
        sourceCidrIp: '0.0.0.0/0',
        description: 'test',
    })

    // delete security group rules
    await msgr.deleteSecurityGroup(security_group_id, security_group_test_rule_id)
}

main()