@ama-sdk/create

中文文档
15.2.4发布于 2026/11/05BSD-3-ClauseTypeScript构建来源已验证近 30 天下载 3537

Create a new SDK

原始使用文档
文档目录4 节
  1. Description
  2. Create an SDK package
  3. Usage
  4. Options list

SDK project initializer

Super cute Otter!

Description

Stable Version Bundle Size

This package is an NPM initializer to generate an API client SDK based on OpenAPI specification.

Create an SDK package

This package is simplifying the start of new SDK repository.

Usage

npm create @ama-sdk typescript <package-name> -- [...options]

or

yarn create @ama-sdk typescript <project-name> [...options]

[!WARNING] Please notice that the command yarn create is not available for versions >= 2.0.0 (see Yarn cli commands).

You can generate an environment with a specific package manager thanks to the --package-manager options:

npm create @ama-sdk typescript <project-name> -- --package-manager=yarn [...options]

Options list

  • --package-manager: Node package manager to be used (npm and yarn are available). If not specified, the automatically detected one will be used.

  • --yarn: Enforce yarn package manager. This option will be ignored if --package-manager is already specified.

  • --debug --no-dry-run: Enable schematics debug mode (dry-run is not currently supported).

  • --o3r-metrics: Enable or disable the collection of anonymous data for Otter

  • --exact-o3r-version : use a pinned version for otter packages.

  • --spec-path: Path to the swagger/open-api specification used to generate the SDK

  • --spec-package-name: The npm package name where the spec file can be fetched

  • --spec-package-path: The export path inside the package.json where to find the spec file. Defaults to ./openapi.[yml|yaml|json]

  • --spec-package-version: The version to target for the npm package where the spec file can be fetched

  • --spec-package-registry: The npm registry where the spec file can be fetched

[!NOTE] If --spec-path or --spec-package-name is specified, the SDK will be generated based on this specification at the creation time.

[!NOTE] --spec-package-registry option assumes that the authentication is set up globally (See npm setup, yarn setup)

版本与发布记录

@ama-sdk/create 共发布 2,615 个版本,首次发布于 2023/07/13;过去 12 个月发布了 549 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
15.2.4latest2026/11/051 天前
15.4.0-prerelease.52026/11/051 天前
15.2.32026/11/041 天前
15.4.0-prerelease.42026/11/041 天前
15.4.0-prerelease.32026/11/023 天前
15.4.0-prerelease.22026/11/023 天前

其他发布通道:alpha → 10.0.0-alpha.6,v9-updated → 9.6.26,v11-updated → 11.6.15,v10-updated → 10.4.24,v12-updated → 12.4.25,next → 14.0.0-next.14。

关于 @ama-sdk/create 的常见问题

@ama-sdk/create 是什么?

Create a new SDK

如何安装 @ama-sdk/create?

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

@ama-sdk/create 支持 TypeScript 吗?

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

@ama-sdk/create 需要什么版本的 Node.js?

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

@ama-sdk/create 可以商用吗?

@ama-sdk/create 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@ama-sdk/create 的下载量有多少?

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

@ama-sdk/create 还在维护吗?

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