@antelopejs/core

中文文档
1.20.0发布于 2026/11/05Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 1.8万

TypeScript framework extending hexagonal architecture across your application and its ecosystem through explicit contracts and replaceable modules.

原始使用文档
文档目录10 节
  1. Why AntelopeJS
  2. Install
  3. Quick start
  4. Plugins
  5. Agent skills
  6. Documentation
  7. Compatibility
  8. Contributing
  9. License
  10. Requirements
AntelopeJS logo

AntelopeJS

Hexagonal architecture, beyond your own code.

npm License Discord Docs

Docs · Quick start · Discord

If AntelopeJS saves you work, a ⭐ helps other developers find it.

Screen recording from the AntelopeJS framework film. A hexagon labelled your code is surrounded by auth, mail, queue, database, payment and storage modules under the caption Hexagonal architecture, beyond your own code. In antelope.config.ts the nodemailer provider is replaced by brevo under the caption Change providers in one file. git diff --stat then reports 1 file changed, and a grid of the project's source files stays marked unchanged under the caption Your code stays the same.

The AntelopeJS framework (3:41). Contracts, providers you can swap, your own modules and one CLI.

https://github.com/user-attachments/assets/c632616c-e48d-4c7e-9306-22ad0f4a6351

AntelopeJS is a TypeScript framework and CLI for Node.js applications. It extends the ports-and-adapters model from your own code to the modules you install: business modules depend on contracts, provider modules implement them, and the application picks which provider runs. The open-source back office AntelopeJS DMS is built on it.

Why AntelopeJS

A business module depends on the database contract; the MongoDB and RethinkDB modules implement it; antelope.config.ts selects MongoDB.

  • Contracts, not imports. A module imports interface packages such as @antelopejs/interface-database, never another module's files.
  • Providers you can swap. @antelopejs/postgres, @antelopejs/mongodb, and @antelopejs/rethinkdb implement the same database contract. antelope.config.ts chooses one, from npm, Git, or a local folder.
  • A runtime that wires them. The core binds every interface to its provider, queues calls until the provider is ready, and runs each module's construct, start, stop, and destroy steps.
  • Hot reload in development. ajs project dev --watch reloads a changed module without restarting the others.
  • One CLI. ajs creates projects and modules, adds providers, runs tests, and builds and starts the application. A host application can also embed the runtime through createRuntime.

A replacement provider leaves consuming code unchanged only when it supports the contract version and behavior that code relies on. You still handle its configuration, credentials, and data migrations.

Install

The Node.js versions AntelopeJS supports are the engines field of its package.json. Run npm view @antelopejs/core engines to read them for a published release. There is nothing to install first: the quick start below runs the CLI with npx. To get the ajs command on your PATH, install the CLI globally:

pnpm add -g @antelopejs/core

Quick start

Create a project with a first module, then run it in development mode. Inside a project that lists @antelopejs/core as a dependency, npx runs that installed copy:

npx @antelopejs/core project init my-app --template blank-typescript --pm pnpm --no-git-init
cd my-app
npx @antelopejs/core project dev --watch

Leave out the flags to choose a template interactively. Templates are named by slug, for example blank-typescript and dms-demo.

Add a provider for an interface your module uses. ajs project modules install adds one for every interface that no module implements yet:

npx @antelopejs/core project modules add @antelopejs/mongodb
npx @antelopejs/core project modules install

Plugins

Official plugins add command groups to ajs and ship as separate global packages:

CommandPackagePurpose
ajs dms@antelopejs/dms-frontendDevelop, build, and deploy the DMS frontend

When a plugin is missing, ajs offers to install it with the package manager that installed the CLI. ajs plugins lists the official plugins. ajs update updates the CLI and every official plugin installed globally.

Agent skills

@antelopejs/core ships the framework's agent skills in skills/, declared under antelopeJs.skills: antelopejs (the mental model and router), ajs-cli, ajs-consume-interface, and ajs-author-interface. Each project gets the skills of the core version it installs. The AntelopeJS agent skills sync links them into a project's .claude/skills/ and .agents/skills/, as it does for every skill a package ships. The DMS assistant (@antelopejs/dms-ai) loads them on its own.

Documentation

Compatibility

PackageSupportedTested with
@antelopejs/interface-core>=0.4.0 <0.5.00.4.0

The engines field of package.json holds the supported Node.js range. The contract that @antelopejs/core implements is @antelopejs/interface-core, whose range the table above lists.

Contributing

Read CONTRIBUTING.md before you open a pull request. The local checks are:

pnpm install
pnpm lint
pnpm test

License

Apache-2.0

Requirements

This package requires Node.js ^20.19.0 || >=22.12.0.

版本与发布记录

@antelopejs/core 共发布 74 个版本,首次发布于 2025/05/09;过去 12 个月发布了 69 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.20.0latest2026/11/051 天前
1.19.02026/11/024 天前
1.18.22026/10/315 天前
1.18.12026/10/307 天前
1.18.02026/10/298 天前
1.17.12026/10/2413 天前

其他发布通道:next → 1.9.0-next.4。

关于 @antelopejs/core 的常见问题

@antelopejs/core 是什么?

TypeScript framework extending hexagonal architecture across your application and its ecosystem through explicit contracts and replaceable modules.

如何安装 @antelopejs/core?

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

@antelopejs/core 支持 TypeScript 吗?

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

@antelopejs/core 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@antelopejs/core 需要什么版本的 Node.js?

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

@antelopejs/core 可以商用吗?

@antelopejs/core 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@antelopejs/core 的下载量有多少?

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

@antelopejs/core 还在维护吗?

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