@ghxstship/xos-cli

中文文档
4.16.0发布于 2026/11/15MITES Module近 30 天下载 2943

xos: the command line for the XOS public API. Sign in, choose an organization, call any operation, import, export, validate canon codes and test webhooks.

原始使用文档
文档目录3 节
  1. Sign in and call operations
  2. Documentation
  3. License

@ghxstship/xos-cli

xos, the command line for the XOS public API. Every operation in the API reference is a command; output is a table in a terminal and JSON in scripts. Built on @ghxstship/xos-sdk. Requires Node.js 22.12 or later.

npm install --global @ghxstship/xos-cli
xos --version

Sign in and call operations

export XOS_API_KEY="xos_live_..."
xos auth login --base-url https://api.ghxstship.tech/v1 --profile northwind
xos projects list --filter project_state.eq=Active --sort -created_at --limit 20
xos projects update <id> --data '{"name":"Fall Series"}' --if-match auto
xos call purchaseOrders.approve <id> --data @approval.json

The key is read from XOS_API_KEY or --key-stdin, never from a flag, and profiles are saved to ~/.config/xos/config.json, readable only by you. In CI, set XOS_API_KEY and XOS_BASE_URL and skip auth login.

Other commands: xos org (profiles and organizations), xos resources and xos ops (discover operations), xos import and xos export (CSV and JSON), xos canon (validate canon codes) and xos webhooks (sign and verify test deliveries). Run xos --help for the full list.

Documentation

Guide: The xos CLI.

License

MIT. See LICENSE. The XOS platform itself is AGPL-3.0-only.

版本与发布记录

@ghxstship/xos-cli 共发布 17 个版本,首次发布于 2026/11/01;过去 12 个月发布了 17 个版本。

版本发布日期距今
4.16.0latest2026/11/15今天
4.15.02026/11/141 天前
4.14.02026/11/142 天前
4.13.02026/11/142 天前
4.12.02026/11/142 天前
4.11.02026/11/132 天前

关于 @ghxstship/xos-cli 的常见问题

@ghxstship/xos-cli 是什么?

xos: the command line for the XOS public API. Sign in, choose an organization, call any operation, import, export, validate canon codes and test webhooks.

如何安装 @ghxstship/xos-cli?

在项目目录运行 npm install @ghxstship/xos-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 xos,可以用 npx xos 直接运行。

@ghxstship/xos-cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ghxstship__xos-cli 是否存在。

@ghxstship/xos-cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ghxstship/xos-cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.12.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ghxstship/xos-cli 可以商用吗?

@ghxstship/xos-cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ghxstship/xos-cli 的下载量有多少?

根据 npm 官方下载统计,@ghxstship/xos-cli 在 2026/10/17 – 2026/11/15 这 30 天内被下载 2,943 次,日均约 98 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ghxstship/xos-cli 还在维护吗?

最新版本 4.16.0 发布于 2026/11/15(今天);至今共发布 17 个版本,其中过去 12 个月发布了 17 个;首次发布于 2026/11/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。