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

cyymall-cli

v0.1.10

Published

CyyMall / 菜洋洋商城 API CLI (per app-api-cli-spec)

Readme

cyymall-cli (cyy)

Node.js CLI for CyyMall / 菜洋洋商城 APIs. Spec: ../app-api-cli-spec.md.

Install from npm

npm install -g cyymall-cli
cyy --help

Package: cyymall-cli(发布后可用;首次发布前请用下方「本地开发」安装。)

Install (local dev)

cd cyymall-cli
npm install
npm link

Then run cyy --help.

Publish to npm (maintainers)

  1. npmjs.com 登录;发布策略若要求 2FA,必须先完成账号安全设置。
  2. 本机认证二选一(不要把 token 写进仓库或发给他人):
    • npm login(交互式);或
    • npm config set //registry.npmjs.org/:_authToken=<token>(仅本机 ~/.npmrc,勿提交 Git)。
  3. 在项目目录发布:
cd cyymall-cli
npm publish

若账号启用了 2FA 且发布时必须验证,仅配置 _authToken 仍可能 403,需带一次性密码:

npm publish --otp=123456

或使用 npm 后台生成的 Granular Access Token:权限包含 Publish,并在创建时勾选 Bypass two-factor authentication (2FA)(仅在你信任该 token 存放环境时使用;详见 npm 创建 token 页面说明)。

  1. 若出现 403 Forbidden … Two-factor authentication or granular access token with bypass 2fa:按上一步处理(--otp 或带 bypass 的 granular token),不是 package.json 或 tarball 的问题。
  2. 后续发版:修改 package.jsonversion,再执行 npm publish(必要时同样加 --otp)。

npm pack --dry-run 可预览将要上传的文件列表(由 files 字段控制)。

Requirements

  • Node.js >= 18

Quick commands

cyy config path
cyy auth send-code --phone <mobile>
cyy auth login --phone <mobile> --code <sms>
cyy auth import --token <appToken> [--member-id <id>] [--shop-id <id>] [--site-id <id>]
cyy auth whoami
cyy shop list
cyy shop sites --shop-id <门店ID>
cyy shop use --shop-id <门店ID>
cyy shop use-site --site-id <站点ID>
cyy product search --keyword 牛奶
cyy product category-list
cyy product zone-tags --group-id <二级分组id>
cyy product category-skus --group-id <同上> [--zone-key <k>] [--after-key <k>]
cyy product skus-by-category --group-id <同上>
cyy api call --method POST --module PRODUCT --path /app/product/getSkuList --body-file body.json
cyy order quick --keyword 牛奶 --quantity 1 --unit 袋
cyy serve --port 8787

Session vs bootstrap env

After cyy auth login or cyy auth import succeeds, session fields live under ~/.cyymall/config.json (token, member_id, shop_id, site_id, version_code, …). api callproduct searchorder quick 等命令读取有效会话:先合并配置文件,再用下表 CYY_* 覆盖(适合 Gateway / MCP 子进程注入、不落盘)。

External token (skip SMS login):

cyy auth import --token "<appToken>" --member-id "<id>" --shop-id "<id>"
# or ephemeral for one process:
export CYY_TOKEN="<appToken>"
export CYY_SHOP_ID="<id>"

CYY_BOOTSTRAP_* 仅用于「尚未登录」时(无 saved token 且无 CYY_TOKEN)。已登录时业务请求优先使用配置文件 + CYY_TOKEN 等会话变量。

| Variable | Purpose | |----------|---------| | CYY_BASE_URL | Override API host (default https://dhcmall.ifoodbuy.com) | | CYY_TOKEN | Session token for current process (overrides saved config) | | CYY_MEMBER_ID | Override member_id header | | CYY_SHOP_ID | Override shop_id header | | CYY_SITE_ID | Override site_id header | | CYY_VERSION_CODE | Override version_code header | | CYY_PHONE | Optional label in config display | | CYY_ENCRYPT_OFF | 1 / true: disable hybrid crypto (plaintext sendCodeV2) | | CYY_ENCRYPT_DEBUG | 1 / true: print RSA/AES diagnostics for hybrid decrypt failures | | CYY_BOOTSTRAP_TOKEN | Optional - only before login, gateway may expect placeholder token | | CYY_BOOTSTRAP_SHOP_ID | Optional - only before login | | CYY_BOOTSTRAP_SITE_ID | Default 1 when bootstrapping | | CYY_BOOTSTRAP_MEMBER_ID | Optional - only before login | | CYY_BOOTSTRAP_VERSION_CODE | App version header when bootstrapping / fallback (22118) |

sendCodeV2 固定使用 src/embeddedCyyKeys.js 中与 Android cyy_native_key.cpp 一致的内置密钥,不再支持从环境变量或文件覆盖公私钥。

权威规格(含请求体附录)建议以 Android 工程内的 docs/app-api-cli-spec.md 为准;若与本仓库根目录同名文档不一致,以该版本为准。

Implementation phases

See ../README_CLI.md for staged rollout and acceptance notes.