@eventcatalog/sdk

中文文档
2.32.1发布于 2026/11/10MITTypeScriptESM + CJS构建来源已验证近 30 天下载 12.4万

SDK to integrate with EventCatalog

原始使用文档
文档目录5 节
  1. @eventcatalog/sdk
  2. Motivation
  3. Installation
  4. Example usage
  5. CLI

@eventcatalog/sdk

SDK to interact with your EventCatalog programmatically in JavaScript/TypeScript.

Motivation

EventCatalog vision is to integrate with any broker or technology in the world. As its powered by Markdown and contents are built at build time, you can use the SDK to generate these resources. For example you can integrate with your systems, create domains, services and messages for EventCatalog using this SDK.

The SDK supports standard CRUD operations for domains, service and messages in EventCatalog.

The SDK is useful for creating your own EventCatalog plugins and integrations.

Features

  • Create, read and delete resources in EventCatalog
  • Version any resource in EventCatalog using the version SDK api.
  • Add files or schemas to resources in EventCatalog
  • and more...

Installation

npm i @eventcatalog/sdk

Example usage

import utils from '@eventcatalog/sdk';

const { getEvent, versionEvent, getService } = utils(PATH_TO_CATALOG);

// Gets event by id
const event = await getEvent('InventoryEvent');

// Gets event by id and version
const event2 = await getEvent('InventoryEvent', '1.0.0');

// Version the event InventoryEvent (e.g goes to /versioned/{version}/InventoryEvent)
await versionEvent('InventoryEvent');

// Returns the service /services/PaymentService
const service = await getService('PaymentService');

CLI

Looking for command-line usage? See @eventcatalog/cli.

See the SDK docs for more information and examples.

Enterprise support

Interested in collaborating with us? Our offerings include dedicated support, priority assistance, feature development, custom integrations, and more.

Find more details on our services page.

版本与发布记录

@eventcatalog/sdk 共发布 165 个版本,首次发布于 2024/07/18;过去 12 个月发布了 69 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.32.1latest2026/11/103 天前
2.32.02026/10/2321 天前
2.31.22026/10/1925 天前
2.31.12026/10/1628 天前
2.31.02026/10/1628 天前
2.30.02026/10/1430 天前

其他发布通道:beta → 2.30.0-beta.2。

关于 @eventcatalog/sdk 的常见问题

@eventcatalog/sdk 是什么?

SDK to integrate with EventCatalog

如何安装 @eventcatalog/sdk?

在项目目录运行 npm install @eventcatalog/sdk,或使用 pnpm add / yarn add / bun add。

@eventcatalog/sdk 支持 TypeScript 吗?

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

@eventcatalog/sdk 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@eventcatalog/sdk 可以商用吗?

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

@eventcatalog/sdk 的下载量有多少?

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

@eventcatalog/sdk 还在维护吗?

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