atmn

中文文档
2.0.198发布于 2026/11/03MITTypeScriptES Module

The CLI for Autumn — define your pricing in code, sync it to Autumn, and keep everything in version control.

原始使用文档
文档目录8 节
  1. Install
  2. Quick Start
  3. What It Does
  4. Commands
  5. Global Flags
  6. Push & Pull
  7. CI/CD
  8. Links

atmn

The CLI for Autumn — define your pricing in code, sync it to Autumn, and keep everything in version control.

Install

npm install atmn

Or run directly:

npx atmn <command>

Quick Start

atmn login          # Authenticate with Autumn
atmn init           # Set up your project
atmn push           # Preview your config changes
atmn push --yes     # Apply the changes to Autumn
atmn pull           # Pull remote changes into your config

What It Does

You define features and plans in an autumn.config.ts file. Use atmn push to preview changes, atmn push --yes to apply them, and atmn pull to fetch updates from your Autumn account.

import { atmn, feature, plan } from "atmn";

export default atmn({
  features: [
    feature({
      featureId: "messages",
      name: "AI Messages",
      type: "metered",
      consumable: true,
    }),
  ],
  plans: [
    plan({
      planId: "pro",
      versionSlug: "v1",
      active: true,
      name: "Pro",
      price: { amount: 20, interval: "month" },
      items: [
        {
          featureId: "messages",
          included: 1000,
          reset: { interval: "month" },
        },
      ],
    }),
  ],
});

Commands

Run atmn --help or atmn <command> --help for the current options.

CommandDescription
atmn loginAuthenticate with Autumn
atmn envShow the current organization and environment
atmn initSet up a project
atmn pushPreview local configuration changes; add --yes to apply them
atmn pullPull remote configuration into local files
atmn sandboxManage sandboxes
atmn resetReset sandbox data
atmn skillsManage bundled agent skills
atmn apiCall Autumn's public API

Global Flags

FlagDescription
-p, --prodUse production instead of sandbox
--sandbox <sandboxId>Target a specific sandbox
-c, --config <path>Config file or folder
--headlessNever prompt (the default outside a TTY)

Push & Pull

Push only previews changes unless you pass --yes, including in an interactive terminal:

atmn push                # Preview sandbox changes
atmn push --prod         # Preview production changes
atmn push --yes          # Apply sandbox changes
atmn push --prod --yes   # Apply production changes

Pull updates configuration in place:

atmn pull

CI/CD

Set your API key as an environment variable:

- name: Deploy to Autumn
  run: npx atmn push --prod --yes
  env:
    AUTUMN_PROD_SECRET_KEY: ${{ secrets.AUTUMN_PROD_SECRET_KEY }}

版本与发布记录

atmn 共发布 287 个版本,首次发布于 2025/07/08;过去 12 个月发布了 260 个版本。

版本发布日期距今
2.0.198latest2026/11/03今天
2.0.1972026/11/03今天
2.0.1962026/11/03今天
2.0.1952026/11/03今天
2.0.1942026/11/03今天
2.0.1932026/11/021 天前

其他发布通道:ayushsmells → 1.0.0-ayushsmells.8,beta → 1.0.0-beta.15。

关于 atmn 的常见问题

atmn 是什么?

用于Autumn的CLI -在代码中定义定价,将其同步到Autumn,并将所有内容保持在版本控制中。

如何安装 atmn?

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

atmn 支持 TypeScript 吗?

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

atmn 支持 ESM 还是 CommonJS?

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

atmn 需要什么版本的 Node.js?

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

atmn 可以商用吗?

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

atmn 还在维护吗?

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