|
| 1 | +# Contentstack CLI plugins – Agent guide |
| 2 | + |
| 3 | +**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`** (per-package). |
| 4 | + |
| 5 | +## What this repo is |
| 6 | + |
| 7 | +| Field | Detail | |
| 8 | +| --- | --- | |
| 9 | +| **Name:** | Contentstack CLI plugins (pnpm monorepo; root package name `csdx`) | |
| 10 | +| **Purpose:** | OCLIF plugins that extend the Contentstack CLI (import/export, clone, migration, seed, audit, variants, Developer Hub apps, regex validation, etc.). | |
| 11 | +| **Out of scope (if any):** | The **core** CLI aggregation lives in the separate `cli` monorepo; this repo ships plugin packages only. | |
| 12 | + |
| 13 | +## Tech stack (at a glance) |
| 14 | + |
| 15 | +| Area | Details | |
| 16 | +| --- | --- | |
| 17 | +| **Language** | TypeScript / JavaScript, Node **>= 18** (`engines` in root `package.json`) | |
| 18 | +| **Build** | pnpm workspaces (`packages/*`); per package: `tsc`, OCLIF manifest/readme where applicable → `lib/` | |
| 19 | +| **Tests** | Mocha + Chai (most packages); Jest + ts-jest (`contentstack-cli-cm-regex-validate`); layouts under `packages/*/test/` | |
| 20 | +| **Lint / coverage** | ESLint in packages that define `lint` scripts; nyc where configured | |
| 21 | +| **Other** | OCLIF v4, Husky | |
| 22 | + |
| 23 | +## Commands (quick reference) |
| 24 | + |
| 25 | +| Command type | Command | |
| 26 | +| --- | --- | |
| 27 | +| **Build** | `pnpm build` | |
| 28 | +| **Test** | `pnpm test` | |
| 29 | +| **Lint** | `pnpm run lint` in a package that defines `lint` (no root aggregate lint script) | |
| 30 | + |
| 31 | +CI: [.github/workflows/unit-test.yml](.github/workflows/unit-test.yml) and other workflows under [.github/workflows/](.github/workflows/). |
| 32 | + |
| 33 | +## Apps CLI plugin (`@contentstack/apps-cli`) |
| 34 | + |
| 35 | +- **Package path:** [packages/contentstack-apps-cli](packages/contentstack-apps-cli) |
| 36 | +- **npm name:** `@contentstack/apps-cli` (unchanged for consumers) |
| 37 | +- **Migrated from:** [contentstack/contentstack-apps-cli](https://github.com/contentstack/contentstack-apps-cli) — see [APPS-CLI-MIGRATION.md](APPS-CLI-MIGRATION.md) |
| 38 | +- **v1 / v2:** This branch carries the **v1 line** (`@contentstack/cli-command ^1.8.2`, `@contentstack/cli-utilities ^1.18.3`). |
| 39 | +- **Docs:** See [packages/contentstack-apps-cli/AGENTS.md](packages/contentstack-apps-cli/AGENTS.md) |
| 40 | + |
| 41 | +## Regex Validate plugin (`@contentstack/cli-cm-regex-validate`) |
| 42 | + |
| 43 | +- **Package path:** [packages/contentstack-cli-cm-regex-validate](packages/contentstack-cli-cm-regex-validate) |
| 44 | +- **npm name:** `@contentstack/cli-cm-regex-validate` |
| 45 | +- **Migrated from:** [contentstack/cli-cm-regex-validate](https://github.com/contentstack/cli-cm-regex-validate) — see [REGEX-VALIDATE-MIGRATION.md](REGEX-VALIDATE-MIGRATION.md) |
| 46 | +- **v1 / v2:** This branch carries the **v1 line** (`@contentstack/cli-command ^1.8.2`, `@contentstack/cli-utilities ^1.18.3`, version `1.0.0`, npm tag `latest`). |
| 47 | +- **Tests:** Jest + ts-jest (unlike most other packages which use Mocha + Chai) |
| 48 | +- **Command:** Single command `cm:stacks:validate-regex` (short name `RGXVLD`) |
| 49 | +- **Docs:** [packages/contentstack-cli-cm-regex-validate/AGENTS.md](packages/contentstack-cli-cm-regex-validate/AGENTS.md) |
| 50 | + |
| 51 | +## Using Cursor (optional) |
| 52 | + |
| 53 | +If you use **Cursor**, [.cursor/rules/README.md](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else. |
0 commit comments