atmn
v2.0.68
Published
The CLI for Autumn — define your pricing in code, sync it to Autumn, and keep everything in version control.
Readme
atmn
The CLI for Autumn — define your pricing in code, sync it to Autumn, and keep everything in version control.
Install
npm install atmnOr 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 configWhat 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.
| Command | Description |
|---------|-------------|
| atmn login | Authenticate with Autumn |
| atmn env | Show the current organization and environment |
| atmn init | Set up a project |
| atmn push | Preview local configuration changes; add --yes to apply them |
| atmn pull | Pull remote configuration into local files |
| atmn sandbox | Manage sandboxes |
| atmn reset | Reset sandbox data |
| atmn skills | Manage bundled agent skills |
| atmn api | Call Autumn's public API |
Global Flags
| Flag | Description |
|------|-------------|
| -p, --prod | Use production instead of sandbox |
| --sandbox <sandboxId> | Target a specific sandbox |
| -c, --config <path> | Config file or folder |
| --headless | Never 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 changesPull updates configuration in place:
atmn pullCI/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 }}