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

@effiprint-nomi/auto-nomi-cli

v0.3.3

Published

Auto Nomi Developer API command-line tool

Downloads

435

Readme

@effiprint-nomi/auto-nomi-cli

Auto Nomi Developer API 命令行工具。Node.js 版本要求为 20 或更高。

npm config set @effiprint-nomi:registry https://registry.npmjs.org/
npm install -g @effiprint-nomi/auto-nomi-cli

auto-nomi auth login \
  --web-url https://wh.indexcb.com/developer-api \
  --profile prod

auto-nomi auth whoami --profile prod
auto-nomi auth logout --profile prod

@effiprint-nomi 的包使用 npm 官方 registry。若安装日志访问 cdn.npmmirror.com 并返回 404,说明镜像尚未同步;上述 scope 配置只影响 @effiprint-nomi,不会改变其他 npm 包使用的 registry。

登录命令会在终端显示 8 位 JCode 并打开浏览器。浏览器 URL 只包含 session ID;开发人员使用 Auto Nomi 独立账号登录后,手动输入终端中的 JCode。新用户先在该页面使用管理员生成的邀请码注册。

如果当前终端不适合持续等待:

auto-nomi auth login \
  --web-url https://wh.indexcb.com/developer-api \
  --profile prod \
  --no-wait

auto-nomi auth login finish --profile prod

查询开放数据表

查询能力只访问管理员已全局启用并分配给当前账号的安全资源。CLI 支持本地受限 SQL, 但不会把原始 SQL 发送给服务端或数据库。查看当前开放资源:

auto-nomi tables list --profile prod
auto-nomi tables describe sla_node_status --profile prod

按允许字段执行简单等值过滤:

auto-nomi tables query sla_node_status \
  --where entity_type=workorder \
  --where entity_id=EF260817000001 \
  --limit 20 \
  --profile prod

响应中的 has_more=true 时,将 next_before_id 传入下一页:

auto-nomi tables query sla_node_status \
  --before-id 12345 \
  --limit 20 \
  --profile prod

复杂查询写入 JSON 文件,例如 sla-query.json

{
  "select": ["id", "entity_type", "entity_id", "sla_status", "started_at"],
  "where": {
    "and": [
      {"field": "entity_type", "op": "in", "value": ["order", "workorder"]},
      {
        "or": [
          {"field": "sla_status", "op": "in", "value": [1, 2]},
          {"field": "started_at", "op": "between", "value": [1785513600, 1788191999]}
        ]
      }
    ]
  },
  "limit": 50
}
auto-nomi tables query sla_node_status \
  --query-file ./sla-query.json \
  --profile prod

--query-file 不能与 --where--limit--before-id 混用。查询树最多嵌套 3 层、最多 20 个条件,单个 in 最多 100 个值;选择字段时必须包含 id,用于稳定 分页。具体字段允许的操作符以 tables describe 返回结果为准。

单次最多返回 100 行,固定按 id DESC 排序。管理员可以从独立查询账号已获得列级 SELECT 的安全目录中勾选全局资源,再按邀请码或账号分配;CLI 不能自行扩大权限。

CLI 0.3.3 起自动使用 node --tls-max-v1.2 启动实际命令,以兼容当前 wh.indexcb.com CDN 在部分 Node.js 机器上的 TLS 握手行为;使用者不需要设置 NODE_OPTIONS=--tls-max-v1.2。证书校验保持开启。

使用受限 SQL 查询

日常查询推荐使用 SQL 入口:

auto-nomi sql \
  "SELECT id, entity_id, sla_status FROM sla_node_status WHERE sla_status IN (1, 2) AND id > 100 ORDER BY id DESC LIMIT 20" \
  --profile prod

多行查询可以保存为 query.sql

SELECT id, entity_type, entity_id, sla_status
FROM sla_node_status
WHERE entity_type = 'workorder'
  AND (sla_status IN (1, 2) OR completed_at IS NULL)
ORDER BY id DESC
LIMIT 20;
auto-nomi sql --file ./query.sql --profile prod

也可以通过标准输入传入:

printf '%s\n' "SELECT * FROM sla_node_status LIMIT 20" |
  auto-nomi sql --profile prod

当前支持 SELECT、单表 FROM、括号、ANDOR=!=<>>>=<<=INBETWEENIS NULLORDER BY id DESC 和 1 至 100 的 LIMIT。显式选择字段时必须包含 idSELECT * 只返回服务端允许的字段。

不支持多语句、注释、别名、JOIN、子查询、函数、聚合、OFFSET、写入语句或数据库 管理语句。SQL 会在本地转换成现有结构化查询协议,最终表、字段、操作符和账号权限仍由 Developer API 校验。