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

@juxuos/cli

v0.1.0

Published

聚序统一 CLI 与模块化本地 MCP 服务

Readme

聚序统一 CLI / MCP

聚序独立 npm 组织使用包名 @juxuos/cli,基本命令为 juxu。原生 Node.js 22+,无需 Python。按 activity / credentials / competition / qihang 四条产品线组织;当前实现 activity 下的 Rundown 能力,其他产品登记为 planned。由聚序独立 npm 组织 juxuos 管理发布。

命令边界

juxu auth login|logout|tenants|product|profiles|use  共享身份与产品地址
juxu products                         查看已实现模块
juxu activity rundown <command>                整稿编排
juxu mcp --products activity           加载指定产品的 MCP 工具

产品一级命令是 activity(活动)、credentials(证件)、competition(赛事)、qihang(企航),资源/能力作为下一级命令。rundown 对应 activity 权限。juxu products --output json 返回产品、连接和能力状态;后三个产品只提供目录与帮助,业务操作尚未接入,MCP 选择它们会报错。

安装与登录

安装:

npm install -g @juxuos/cli
juxu auth login --url https://console.example.com --sso-url https://sso.example.com --identifier [email protected] --product activity

或 npx --yes --package @juxuos/cli juxu --help。本地开发可在包目录 npm pack,再 npm install -g ./juxuos-cli-0.1.0.tgz。

密码隐藏输入;自动化可显式用 --password-stdin,不要把密码写入命令行参数。配置默认 ~/.config/juxu/config.json,可用 JUXU_CONFIG 指定,Unix 权限 0600;Windows 放在仅本人可读的用户目录。配置保存 SSO 会话和各产品地址,不保存密码、百炼密钥。

会话只发给 SSO,业务请求按目标产品 origin 换取短期令牌。增加产品地址:

juxu auth product --product PRODUCT_KEY --url https://product.example.com
juxu auth tenants --product activity
juxu auth logout

服务端需允许相应 origin。同一 profile 中,相同账号、相同 SSO 重新登录保留产品地址;更换账号/SSO 会重建该 profile。其他 profile 不受影响。无 SSO 的认证不支持扩展多产品共享会话。过期后重新登录,logout 撤销共享会话。

Rundown

juxu activity rundown list --tenant TENANT_UUID --event EVENT_UUID --show SHOW_UUID
juxu activity rundown context --tenant TENANT_UUID --revision REVISION_UUID --output json > context.json
juxu activity rundown ask --tenant TENANT_UUID --revision REVISION_UUID --version 1 --prompt '根据材料编排整场活动' --file 方案.docx --request-id REQUEST_UUID
juxu activity rundown history --tenant TENANT_UUID --revision REVISION_UUID
juxu activity rundown task --tenant TENANT_UUID --revision REVISION_UUID --task TASK_UUID
juxu activity rundown apply --tenant TENANT_UUID --revision REVISION_UUID --task TASK_UUID --version 1

ask 使用平台模型,可能产生费用。多文件重复 --file;--reset-materials 清除先前材料。重试复用 request-id;未指定时失败输出会包含生成的 request_id。先读取 task 中完整候选、比较差异再 apply;版本冲突须重新读取编排。

本地智能体使用自身模型时,读取 context 的 contract.assistant_policy、know_how、document_schema 和岗位素材,再生成完整 JSON:

juxu activity rundown propose --tenant TENANT_UUID --revision REVISION_UUID --version 1 --contract CONTRACT_HASH --prompt '压缩至40分钟' --summary '压缩串场,保留颁奖' --file document.json --request-id REQUEST_UUID

此路径不调用平台模型;能力升级后旧 contract 会被拒绝,需读取最新结构。

MCP

先登录,再配置宿主:

{
  "mcpServers": {
    "juxu": {
      "command": "npx",
      "args": ["--yes", "--package", "@juxuos/[email protected]", "juxu", "mcp", "--products", "activity"],
      "env": {"JUXU_CONFIG": "/absolute/path/to/config.json"}
    }
  }
}

使用本地开发包时,command 使用安装本地 tarball 后的 juxu 绝对路径,args 为 ["mcp", "--products", "activity"];源码可用 node /absolute/path/packages/juxu-cli/src/cli.js mcp --products activity。

工具统一前缀:activity_rundown_context、activity_rundown_history、activity_rundown_task、activity_rundown_ask、activity_rundown_propose、activity_rundown_apply。只加载选中模块,stdout 专用于协议。修改须经用户审核采纳,无发布或现场 GO 工具。

材料可通过 juxu activity rundown material --tenant UUID --revision UUID --file 方案.pdf 提取成带来源的 name/text,或使用宿主已获授权的文件读取能力。

环境与机器输出

juxu auth login --profile local --url http://127.0.0.1:49720 --sso-url http://127.0.0.1:49760 --identifier [email protected]
juxu auth product --profile local --product credentials --url https://credentials.example.com
juxu auth product --profile local --product competition.jumprope --url https://rope.example.com
juxu auth product --profile local --product qihang --url https://account.example.com
juxu auth profiles
juxu auth use local
juxu activity rundown ask --help --output json
juxu mcp --products activity --profile local

Profile 选择:--profile > JUXU_PROFILE > 当前选中的 profile。环境与账号独立保存,各产品有独立地址。配置地址不授予权限、不表示该产品业务命令已实现。赛事按项目映射到 jumprope 等后端产品,企航连接键 qihang 不新增后端产品权益。MCP 启动时固定 profile。

默认人类摘要;自动化使用 --output json,特别是 context/task,需要完整稿件与 Schema 时不能读取摘要。--verbose 诊断和错误只写 stderr。失败任务 JSON 仍在 stdout 且退出 1;HTTP/参数错误 JSON 在 stderr。退出码:0 成功、1 一般/任务失败、2 参数/配置、3 认证/权限、4 不存在、5 冲突/限额、6 网络/超时。旧配置首次写入自动迁移为多 profile 格式。

monorepo 与产品扩展契约

本包是独立 pnpm workspace,可直接 npm 打包;CLI 与 MCP 同包发布。src/core 提供共享底座,src/products/registry.js 登记产品及连接映射,src/products/activity/rundown 是首个业务能力。未来增加 credentials、competition、qihang 的能力目录,无需更换总命令或登录配置。模块使用自己的连接,不回退到 activity。

业务模型、权限、Schema、know-how 保留在后端。各能力的 CLI 参数与离线帮助共用定义,MCP 使用 <product>_<capability>_<operation> 命名。未发布的旧顶层 rundown 命令不保留别名。

发布

npm run release:check → npm pack → 干净目录安装 tarball,验证命令、SSO 和 MCP。release:check 运行测试与 npm dry-run 文件白名单检查。确认 scope、版本和发布权限后,再由授权流程发布。

包仅包含 src 下的运行时 JS、README、CHANGELOG 和 package 元数据;不包含测试、登录配置或本地资料,没有安装钩子,不下载 Python。正式发布由组织维护者完成。

发布维护者:在 monorepo 根目录运行 pnpm release:prepare:cli,自动完成测试、包内容检查、publish dry-run、临时目录安装和 CLI/MCP 验收,候选包与校验清单保存在 .local-data/npm/candidate-*。该命令不会发布或上传暂存包。pnpm release:registry:cli 只读检查 npm 登录、聚序组织角色、2FA 与版本;身份不可验证时失败退出。完整流程见仓库 docs/development/juxu-cli-npm-release.md。