@cspell/cspell-tools

中文文档
10.4.1发布于 2026/11/07MITES Module构建来源已验证近 30 天下载 3476

Tools to assist with the development of cSpell

原始使用文档
文档目录3 节
  1. Install
  2. Usage
  3. CSpell for Enterprise

CSpell-Tools

Tools used to assist CSpell Development.

The Primary use of this tool is to build dictionaries used by cspell. This tool will convert a word list or a hunspell file into a file usable by cspell.

Install

npm install -g @cspell/cspell-tools

Usage

cspell-tools-cli --help

To create a word list.

cspell-tools-cli compile keywords.txt -o ./dictionaries/

This will filter the words from keywords.txt and write them to ./dictionaries/keywords.txt.gz.

To create a trie file from a hunspell file.

cspell-tools-cli compile-trie english.dic

This will read and expand the english.dic file based upon the rules in english.aff into a new file called english.trie.gz

For large files, this process can take a long time and us a lot of memory.

The tool cspell-trie can be used to read the contents of a .trie or .trie.gz file.

CSpell for Enterprise

Available as part of the Tidelift Subscription.

The maintainers of cspell and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. Learn more.



Brought to you byStreet Side Software Logo Street Side Software

版本与发布记录

@cspell/cspell-tools 共发布 319 个版本,首次发布于 2020/12/31;过去 12 个月发布了 39 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
10.4.1latest2026/11/074 天前
10.4.02026/10/1427 天前
10.4.0-alpha.1next2026/10/011 个月前
10.3.62026/09/291 个月前
10.3.52026/09/281 个月前
10.3.42026/09/251 个月前

其他发布通道:cspell5-next → 5.21.2-alpha.0,cspell5 → 5.21.2,next → 10.4.0-alpha.1。

关于 @cspell/cspell-tools 的常见问题

@cspell/cspell-tools 是什么?

Tools to assist with the development of cSpell

如何安装 @cspell/cspell-tools?

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

@cspell/cspell-tools 支持 TypeScript 吗?

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

@cspell/cspell-tools 支持 ESM 还是 CommonJS?

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

@cspell/cspell-tools 需要什么版本的 Node.js?

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

@cspell/cspell-tools 可以商用吗?

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

@cspell/cspell-tools 的下载量有多少?

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

@cspell/cspell-tools 还在维护吗?

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