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

neocrm-cli-client

v0.7.1

Published

NeoCRM CLI 客户端 - 基于 oclif 框架的命令行工具

Readme

neocrm-cli-client

NeoCRM 命令行工具,基于 oclif 框架构建,用于在终端中与 NeoCRM 平台进行交互。

安装

npm install -g neocrm-cli-client

要求 Node.js >= 18.0.0

快速开始

# 登录
neocrm auth:login --client-id your-client-id

# 查看当前用户
neocrm auth:whoami

# 查询数据
neocrm data:query -q "SELECT id,name FROM account LIMIT 10"

命令一览

neocrm auth:login

登录 NeoCRM(clawId 轮询认证)。

用法:
  neocrm auth:login -c <client-id>

选项:
  -c, --client-id=<value>  (必填) OAuth 2.0 客户端 ID

neocrm auth:logout

登出 NeoCRM 并清除本地凭证。

用法:
  neocrm auth:logout

neocrm auth:whoami

查看当前登录的用户 ID、姓名、租户、手机号等信息。

用法:
  neocrm auth:whoami

neocrm config:get KEY

获取指定配置项的当前值。

用法:
  neocrm config:get <key>

参数:
  key  (必填) 配置项名称

示例:
  neocrm config:get requestTimeout
  neocrm config:get authServerUrl
  neocrm config:get debug

neocrm config:set KEY VALUE

设置 CLI 配置项的值。

用法:
  neocrm config:set <key> <value>

参数:
  key    (必填) 配置项名称
  value  (必填) 配置项的值

示例:
  neocrm config:set requestTimeout 60
  neocrm config:set authServerUrl https://auth.neocrm.com
  neocrm config:set debug true

neocrm data:create

创建 CRM 记录。

用法:
  neocrm data:create -o <object> -n <name> --dim-depart <dept> --entity-type <type> --user-id <uid> --object-id <oid> [-v <json>]

选项:
  -o, --object=<value>       (必填) 对象 API Key
  -n, --name=<value>         (必填) 记录名称
      --dim-depart=<value>   (必填) 所属部门
      --entity-type=<value>  (必填) 实体类型
      --user-id=<value>      (必填) 用户 ID
      --object-id=<value>    (必填) 对象 ID
  -v, --values=<value>       额外字段数据(JSON 格式)

示例:
  neocrm data:create -o account -n "Acme Corp" --dim-depart dept1 --entity-type standard --user-id u001 --object-id obj001
  neocrm data:create -o contact -n "张三" --dim-depart dept1 --entity-type standard --user-id u001 --object-id obj001 -v '{"phone":"13800138000"}'

neocrm data:get

按 ID 获取 CRM 数据记录。

用法:
  neocrm data:get -o <object> -i <id>

选项:
  -o, --object=<value>  (必填) 对象 API Key
  -i, --id=<value>      (必填) 记录 ID

示例:
  neocrm data:get -o account -i 12345
  neocrm data:get -o contact -i 67890

neocrm data:update

更新 CRM 记录(PATCH 语义)。

用法:
  neocrm data:update -o <object> -i <id> -v <json>

选项:
  -o, --object=<value>  (必填) 对象 API Key
  -i, --id=<value>      (必填) 记录 ID
  -v, --values=<value>  (必填) 更新数据(JSON 格式)

示例:
  neocrm data:update -o account -i 12345 -v '{"name":"New Name"}'
  neocrm data:update -o contact -i 67890 -v '{"phone":"13900139000"}'

neocrm data:delete

删除 CRM 业务数据记录。

用法:
  neocrm data:delete -o <object> -i <id>

选项:
  -o, --object=<value>  (必填) 对象 API Key
  -i, --id=<value>      (必填) 要删除的业务数据 ID

示例:
  neocrm data:delete -o account -i 12345
  neocrm data:delete -o contact -i 67890

neocrm data:query

使用 XOQL 查询 CRM 数据。

用法:
  neocrm data:query -q <xoql>

选项:
  -q, --xoql=<value>  (必填) XOQL 查询语句(最多 20000 字符)

示例:
  neocrm data:query -q "SELECT id,name FROM account WHERE name LIKE '%销售易%'"
  neocrm data:query -q "SELECT id,name,phone FROM contact LIMIT 10"

neocrm data:lock

锁定对象数据。

用法:
  neocrm data:lock -o <object> -r <record-id>

选项:
  -o, --object=<value>     (必填) 对象 API Key
  -r, --record-id=<value>  (必填) 数据记录 ID

示例:
  neocrm data:lock -o account -r 12345

neocrm data:unlock

解锁对象数据。

用法:
  neocrm data:unlock -o <object> -r <record-id>

选项:
  -o, --object=<value>     (必填) 对象 API Key
  -r, --record-id=<value>  (必填) 数据记录 ID

示例:
  neocrm data:unlock -o account -r 12345

neocrm metadata:objects

获取当前租户下所有业务对象的列表信息。

用法:
  neocrm metadata:objects

neocrm metadata:describe

获取对象描述信息。

用法:
  neocrm metadata:describe -o <object>

选项:
  -o, --object=<value>  (必填) 对象 API Key

示例:
  neocrm metadata:describe -o account
  neocrm metadata:describe -o contact

neocrm metadata:busitype

获取对象业务类型列表。

用法:
  neocrm metadata:busitype -o <object>

选项:
  -o, --object=<value>  (必填) 对象 API Key

示例:
  neocrm metadata:busitype -o account
  neocrm metadata:busitype -o contact

neocrm api:get PATH

通过 BFF 代理发送 GET 请求到指定的 OpenAPI 路径。

用法:
  neocrm api:get <path> [-p <json>]

参数:
  path  (必填) OpenAPI 路径

选项:
  -p, --params=<value>  查询参数(JSON 格式)

示例:
  neocrm api:get /rest/data/v2.0/xobjects/account/12345
  neocrm api:get /rest/auc/v2.0/userInfo
  neocrm api:get /rest/data/v2.0/xobjects/account/description -p '{"includeFields":"true"}'

neocrm api:post PATH

通过 BFF 代理发送 POST 请求到指定的 OpenAPI 路径。

用法:
  neocrm api:post <path> [-d <json>] [-p <json>]

参数:
  path  (必填) OpenAPI 路径

选项:
  -d, --data=<value>    请求体数据(JSON 格式)
  -p, --params=<value>  查询参数(JSON 格式)

示例:
  neocrm api:post /rest/data/v2.0/xobjects/account -d '{"name":"新客户"}'
  neocrm api:post /rest/data/v2.0/query/xoql -d '{"xoql":"SELECT id FROM account"}'

neocrm api:patch PATH

通过 BFF 代理发送 PATCH 请求到指定的 OpenAPI 路径。

用法:
  neocrm api:patch <path> [-d <json>] [-p <json>]

参数:
  path  (必填) OpenAPI 路径

选项:
  -d, --data=<value>    请求体数据(JSON 格式)
  -p, --params=<value>  查询参数(JSON 格式)

示例:
  neocrm api:patch /rest/data/v2.0/xobjects/account/12345 -d '{"name":"更新客户名"}'

neocrm api:delete PATH

通过 BFF 代理发送 DELETE 请求到指定的 OpenAPI 路径。

用法:
  neocrm api:delete <path> [-p <json>]

参数:
  path  (必填) OpenAPI 路径

选项:
  -p, --params=<value>  查询参数(JSON 格式)

示例:
  neocrm api:delete /rest/data/v2.0/xobjects/account/12345

许可证

MIT