@atomic-chat/core

中文文档
0.22.0发布于 2026/11/07MITTypeScriptES Module构建来源已验证近 30 天下载 3931

Inference core of Atomic Chat: local llama.cpp/MLX/Foundation Models runtime, cloud providers, model router and the OpenAI-compatible server on :1337.

原始使用文档

atomic-chat-core

TypeScript inference core of Atomic Chat: local llama.cpp / MLX / Apple Foundation Models runtime, backend and model management, cloud providers, model router and the OpenAI-compatible server on http://localhost:1337/v1.

bun install
npm run verify

Phase-1 CLI examples:

atomic-chat-core serve owner/repository   # a model already on disk; the core does not download models
atomic-chat-core serve --model-path ./model.gguf --bin ./llama-server --port 6767
atomic-chat-core models list --json
atomic-chat-core shutdown

serve attaches to the one persistent owner for the selected data folder. The command can exit without unloading the model; shutdown explicitly stops that owner and its sessions.

Managed runtimes (Linux + NVIDIA)

On Linux with an NVIDIA GPU, the core can also run a model inside a container it manages itself — today tensorrt-llm, NVIDIA's inference engine — instead of spawning a local process the way llama.cpp and MLX do. It needs Docker and the NVIDIA Container Toolkit, which the core never installs on its own: setting one up computes a plan, asks for consent, and then runs the one privileged step (package install, docker group membership) through a helper the app or CLI runs as root — the core itself never gains elevated rights. A step that adds you to the docker group waits for your next sign-in before it can continue. See docs/contracts.md for the control routes, the host-step file protocol and exit codes, the on-disk layout, and the model.yml shape a managed model's directory needs.

Installing by hand runs the same steps the setup does: Docker Engine and the NVIDIA Container Toolkit from their vendors' own apt or dnf repositories, for the distributions the runtime descriptor qualifies (see atomic-chat-conf/runtimes/), then the NVIDIA runtime registered with Docker and the invoking user added to the docker group. Nothing is ever removed or upgraded on the host.

Live tests that actually install this on a real Linux VM are opt-in and change the machine — see docs/live-tests.md for what they do. They run only when ATOMIC_LIVE=1 and ATOMIC_LIVE_MANAGED=1 are both set; ATOMIC_RUNTIME_DESCRIPTOR_URL optionally points them at a local descriptor.

Releasing

The desktop app pins a core version (atomicCore.version in its package.json) and downloads that release's binaries, checking them against SHA256SUMS.

make release                 # patch; or VERSION=minor, major, or an explicit X.Y.Z

It bumps package.json and src/version.ts together, commits release: vX.Y.Z, tags it and pushes the branch and the tag (the current version, given explicitly, only tags HEAD). Without make: npm run release -- patch --push, or leave out --push to look before pushing. The tag runs the release workflow: the same gates as CI on macOS, Linux and Windows (Linux and Windows on x64 and arm64), both binaries cross-compiled for every target (macOS arm64 and x64, Windows x64 and arm64, Linux x64 and arm64), then vX.Y.Z published with the binaries and SHA256SUMS as the latest release.

The workflow can also be started by hand for the version already in package.json on a branch (Actions → release → Run workflow, or gh workflow run release.yml --ref <branch>); it creates the tag itself. A published version is never replaced: a second run for it fails, so bump first.

版本与发布记录

@atomic-chat/core 共发布 18 个版本,首次发布于 2026/09/24;过去 12 个月发布了 18 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.22.0latest2026/11/07今天
0.21.42026/11/052 天前
0.21.32026/11/043 天前
0.21.22026/11/043 天前
0.21.12026/11/043 天前
0.21.02026/11/044 天前

关于 @atomic-chat/core 的常见问题

@atomic-chat/core 是什么?

Inference core of Atomic Chat: local llama.cpp/MLX/Foundation Models runtime, cloud providers, model router and the OpenAI-compatible server on :1337.

如何安装 @atomic-chat/core?

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

@atomic-chat/core 支持 TypeScript 吗?

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

@atomic-chat/core 支持 ESM 还是 CommonJS?

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

@atomic-chat/core 需要什么版本的 Node.js?

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

@atomic-chat/core 可以商用吗?

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

@atomic-chat/core 的下载量有多少?

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

@atomic-chat/core 还在维护吗?

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