@fnndsc/chili

中文文档
3.9.5发布于 2026/11/15MITTypeScriptES Module近 30 天下载 5992

ChILI handles Intelligent Line Interactions: A CLI and library for ChRIS, acting as the controller layer for business logic and user presentation.

原始使用文档
文档目录8 节
  1. Installation
  2. Abstract
  3. Architecture: The Sandwich Model
  4. Development
  5. Individual steps (run from the repo root)
  6. Core Features
  7. Quick Start
  8. License
  ____ _     ___ _     ___
 / ___| |__ |_ _| |   |_ _|
| |   | '_ \ | || |    | |
| |___| | | || || |___ | |
 \____|_| |_|___|_____|___|

ChILI handles Intelligent Line Interactions

chili is both a standalone CLI and a reusable library for interacting with the ChRIS ecosystem. It serves as the controller layer in the ChRIS interface stack, bridging raw business logic (salsa) and user presentation.

Installation

Install globally to use the chili command:

npm install -g @fnndsc/chili
chili --help

Requires Node.js ≥ 20.12. See Quick Start for usage.

chili is also consumed as a library (e.g. by chell): its headless Commands return typed Models, free of presentation concerns.

npm install @fnndsc/chili

Abstract

Designed for developers and power-users who want to script and control a ChRIS instance from the terminal. Maintains a persistent local context: connection details, active user, and current ChRIS working directory survive across invocations.

Architecture: The Sandwich Model

chili implements the controller layer:

  1. chili (Library & CLI):
    • Commands (src/commands): Headless controllers that execute logic via salsa and return typed Models. Consumed directly by chell.
    • Models (src/models): Explicit interfaces (Plugin, Feed, ListingItem, etc.) defining data structures.
    • Views (src/views): Pure functions that render Models into formatted strings and tables.
    • CLI (src/index.ts): Commander.js entry point orchestrating Commands and Views.
  2. salsa (Logic): Shared Application Logic and Service Assets — high-level business intents.
  3. cumin (Infrastructure): State and connection layer — authentication, context persistence, low-level API.

Development

chili lives in the mise monorepo alongside cumin, salsa, and chell. Build the whole stack from the repository root — npm workspaces links the four packages together, so there is nothing to clone or hand-link:

git clone https://github.com/HARBOR-Medical-AI/mise
cd mise
make taco            # scrub → prep → cook → taste → serve (the full course)

Individual steps (run from the repo root)

TargetAction
make prepnpm install — install deps and link all four workspaces
make cookBuild (compile TypeScript) all packages in dependency order
make tasteRun the full test suite
make serveLink chell globally
make scrubClean build artifacts and node_modules

To build or test just this package: npm run build -w @fnndsc/chili / npm test -w @fnndsc/chili.

Use NVM and Node 22.x to avoid needing sudo for the global link in make serve.

Core Features

  • Context-Aware: Remembers active server, user, and working directory between invocations.
  • Library Mode: Exports strictly-typed commands and views consumed by chell and other frontends.
  • Resource Commands: Full CRUD for plugins, feeds, files, links, pipelines, compute resources, groups, tags, and more.
  • Plugin Management: Search, install (from peer store or Docker), and register plugins.
  • Feed Sub-resources: Notes and comments on feeds (create, read, update, delete).

Quick Start

Connect to ChRIS:

chili connect <URL> --user <USERNAME> --password <PASSWORD>

Plugins:

chili plugins list
chili plugins list --search "name:pl-dircopy"
chili plugin run pl-dircopy-v2.1.0 --args "..."

Feeds:

chili feeds list
chili feeds list --user rudolphpienaar
chili feed note 42
chili feed comments 42

Store / plugin install:

chili plugins add pl-fshack               # auto-discovers compute resources
chili plugins add pl-fshack --compute ares,argentum

Files:

chili files list --path /home/user/uploads

License

MIT — part of the ChRIS Project.


-30-

版本与发布记录

@fnndsc/chili 共发布 43 个版本,首次发布于 2026/06/20;过去 12 个月发布了 43 个版本。

版本发布日期距今
3.9.5latest2026/11/15今天
3.9.42026/11/15今天
3.9.32026/11/105 天前
3.9.22026/11/087 天前
3.9.12026/11/088 天前
3.9.02026/11/069 天前

关于 @fnndsc/chili 的常见问题

@fnndsc/chili 是什么?

ChILI handles Intelligent Line Interactions: A CLI and library for ChRIS, acting as the controller layer for business logic and user presentation.

如何安装 @fnndsc/chili?

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

@fnndsc/chili 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fnndsc/chili 支持 ESM 还是 CommonJS?

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

@fnndsc/chili 可以商用吗?

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

@fnndsc/chili 的下载量有多少?

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

@fnndsc/chili 还在维护吗?

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