@useacms/cli
v0.1.0
Published
CLI and dev server for ACMS — auto field registration, type generation, and storage adapters
Downloads
88
Maintainers
Readme
@useacms/cli
CLI and dev server for ACMS — auto field registration, TypeScript type generation, and pluggable storage adapters.
Install
npm install -D @useacms/cliCLI Commands
# Development
acms dev # Start dev server (port 3001)
acms dev -p 3002 # Custom port
# Type generation
acms types # Generate acms.d.ts from schema
# Schema sync
acms push # Push local schema to production
acms pull # Pull schema from production
acms sync # Bi-directional sync
acms status # Check sync status
# Maintenance
acms purge # Remove unused fields (30+ days)
acms purge --dry-run # Preview what would be purgedDev Server
acms dev starts an Express server that:
- Accepts field registrations from
@useacms/client - Auto-generates
acms.d.tswith full TypeScript definitions - Watches
acms.jsonfor changes and regenerates types - Provides a REST API for content CRUD operations
- Streams updates via Server-Sent Events
Storage Adapters
Import adapters for your acms.config.ts:
import { defineConfig } from "@useacms/client";
import {
localFile,
github,
githubGist,
vercelEdgeConfig,
cloudflareKV,
acmsSaas,
} from "@useacms/cli/adapters";
export default defineConfig({
dev: localFile(),
production: githubGist({
token: process.env.GITHUB_TOKEN,
gistId: "your-gist-id",
}),
});Available adapters:
| Adapter | Description |
| -------------------- | ---------------------------------------- |
| localFile() | Local acms.json file (default for dev) |
| githubGist() | GitHub Gist storage |
| github() | GitHub repository with versioning |
| vercelEdgeConfig() | Vercel Edge Config |
| cloudflareKV() | Cloudflare KV |
| acmsSaas() | ACMS hosted platform |
