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

@renxqoo/rxcordys-cli

v1.2.0

Published

rxcordys — Cordys CRM full Lead-to-Cash (L2C) agent CLI (leads, accounts, opportunities, contracts, payments, invoices, orders, approvals, stats), built on @renxqoo/agent-data-cli

Downloads

1,852

Readme

@renxqoo/rxcordys-cli (rxcordys)

Cordys CRM L2C 全链路 agent 命令行工具 —— 基于 @renxqoo/agent-data-cli 框架,全量覆盖 CordysCRM 接口。

English · 中文

快速开始

一键安装(推荐)

npx @renxqoo/rxcordys-cli install

自动完成三步:① 全局安装 CLI → ② 安装 Skill 到你的 AI 工具发现目录(~/.agents 始终写 + 已装工具 ~/.claude/~/.codex/~/.cursor/~/.zcode/~/.openclaw/~/.pi 自动探测)→ ③ 凭证配置。需 Node ≥ 20。

npx 无需预装,跑完即得全局 rxcordys 命令 + 已就位的 skill。

手动安装(分步,等价于一键安装)

如果一键安装某步失败或想单独执行:

第 1 步:安装 CLI

npm install -g @renxqoo/rxcordys-cli

安装后跑 rxcordys --help 确认可用。不想全局装?用 npx @renxqoo/rxcordys-cli <命令> 临时执行。

第 2 步:安装 Skill(让 AI 工具发现)

把 skill 同步到你的 AI 工具发现目录(~/.agents 始终写 + 已装工具如 ~/.claude/~/.cursor/~/.zcode 自动探测——覆盖 Claude Code / Cursor / Codex / ZCode / OpenClaw / Pi / Trae):

rxcordys skills sync

同步后 AI 工具即可在用户提到线索/客户/商机/合同等关键词时自动触发本 skill。验证:

rxcordys skills list                # 列出已装的 skill
ls ~/.agents/skills/rxcordys-cli/   # 确认 skill 文件就位

第 3 步:配置凭证

凭证从 Cordys 管理后台「个人中心 → API Keys」获取,两种方式任选:

# 方式 A:持久化(推荐,写 ~/.rxcli/credentials/cordys.json)
rxcordys auth login --accessKey <AccessKey> --secretKey <SecretKey>

# 方式 B:环境变量(CI / 临时)
export CORDYS_ACCESS_KEY=<AccessKey>
export CORDYS_SECRET_KEY=<SecretKey>
# 自部署:export CORDYS_CRM_DOMAIN=https://你的地址

验证:rxcordys whoami 返回用户信息即凭证有效。

功能

覆盖线索 → 客户 → 商机 → 合同 → 回款 → 发票 → 订单的 L2C 全流程:

| 模块 | 说明 | |------|------| | leads | 线索 CRUD + 转客户(transition)/ 转商机(transform) | | accounts | 客户 CRUD + 客户 360(合同/商机/订单/回款/发票子资源 + 统计) | | opportunities | 商机 CRUD + 报价单(quotation) | | contacts | 联系人 CRUD | | contracts | 合同 + 回款计划/记录 + 工商抬头 + 统计 | | invoices | 发票 | | orders | 订单 + 统计 | | follows | 跟进计划/记录(跨 lead/account/opportunity) | | approvals | 审批待办/动作/资源/流程配置 | | stats | 模块金额统计 + 首页看板 | | records | 跨模块通用(view/get/page/search/contact/product/form) | | util | whoami/org/members/glocount/raw 透传 |

常用命令

rxcordys leads page --json                              # 查询线索(分页)
rxcordys accounts page "张三"                           # 搜客户
rxcordys accounts sub contract <customerId>            # 某客户名下的合同
rxcordys contracts stat                                # 合同金额统计
rxcordys accounts add '{"name":"客户A"}' --yes         # 新增客户(高危需 --yes)
rxcordys leads transition '{"clueId":"L1","name":"X"}' --yes  # 线索转客户
rxcordys approvals todo pending                        # 待我审批
rxcordys util raw GET /lead/view/view                  # 透传未覆盖端点

--dryRun 仅校验不提交;完整命令见 rxcordys --help

输出契约

遵循 agent-data-cli 统一输出格式:{ ok, source, data, meta }。列表命令自动计算 meta.pagination.complete

开发

pnpm --filter @renxqoo/rxcordys-cli build       # 编译
pnpm --filter @renxqoo/rxcordys-cli test         # 测试(64 用例)
pnpm --filter @renxqoo/rxcordys-cli typecheck    # 类型检查

Skill 文档:skills/rxcordys-cli/SKILL.md(手写维护,决策信息前置)。

技术决策

  • 命名:npm 包 @renxqoo/rxcordys-cli / bin 命令 rxcordys / skill rxcordys-cli / 凭证 namespace cordys
  • 手写 auth plugin(非 defineAuth):Cordys 用静态双 header,框架 injectAuthHeader 只支持单 header,故手写 beforeRequest 注入。
  • 业务码解包:Cordys 业务错误可能 HTTP 200 + code≠100200,所有命令经 unwrap() 解包校验。
  • credentialNamespace = cordys:避免与 apps/crmcrm namespace 撞名共用凭证。