@ferrlabs/lfsx

中文文档
1.26.54发布于 2026/11/11MPL-2.0ES Module零依赖构建来源已验证近 30 天下载 8158

Command line companion for the LFSX Git LFS server

原始使用文档

lfsx

Command line companion for a self-hosted LFSX Git LFS server.

npm install -g @ferrlabs/lfsx        # or: cargo install lfsx

lfsx --url https://lfs.example.com doctor --repo my-org/my-project
lfsx --url https://lfs.example.com gc --repo my-org/my-project --dry-run

The token comes from --token or LFSX_TOKEN, and only those: GITHUB_TOKEN is not read. A token is only sent over https, or http to localhost, 127.0.0.1 and [::1]; any other URL is refused. In GitHub Actions, pass the job token explicitly with LFSX_TOKEN: ${{ github.token }}.

doctor checks that the server is up, that its storage is writable, that your token is accepted, and — the one that matters — that the URL it advertises for transfers is the URL you reached it on. A mismatch there lets negotiation succeed while every transfer fails.

gc reads the objects the repository still references and asks the server to sweep the rest. It fetches every branch, tag and pull or merge request ref first (--no-review-refs skips the last), reads --url and --repo from git config lfs.url when not given, and refuses a shallow or --single-branch clone, or a --url or --repo that does not match lfs.url.

The server itself is lfsx-server.

版本与发布记录

@ferrlabs/lfsx 共发布 160 个版本,首次发布于 2026/08/15;过去 12 个月发布了 160 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.26.54latest2026/11/113 天前
1.26.532026/11/095 天前
1.26.522026/11/095 天前
1.26.502026/11/068 天前
1.26.492026/11/059 天前
1.26.482026/11/0410 天前

关于 @ferrlabs/lfsx 的常见问题

@ferrlabs/lfsx 是什么?

Command line companion for the LFSX Git LFS server

如何安装 @ferrlabs/lfsx?

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

@ferrlabs/lfsx 支持 TypeScript 吗?

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

@ferrlabs/lfsx 支持 ESM 还是 CommonJS?

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

@ferrlabs/lfsx 需要什么版本的 Node.js?

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

@ferrlabs/lfsx 可以商用吗?

@ferrlabs/lfsx 使用 MPL-2.0 许可。弱 Copyleft:可以商用,也可以和闭源代码一起使用;但如果分发时修改了 MPL 授权的文件,这些文件的修改需以 MPL 开源。以上为概括,不构成法律意见,请以许可原文为准。

@ferrlabs/lfsx 的下载量有多少?

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

@ferrlabs/lfsx 还在维护吗?

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