Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6b01505
feat: migrate Apps CLI plugin to cli-plugins monorepo and add related…
harshitha-cstk May 19, 2026
e4439a4
refactor: remove obsolete Apps CLI documentation and update dependencies
harshitha-cstk May 21, 2026
aefa70f
update pnpm lock file
harshitha-cstk May 21, 2026
99fee1c
refactor: enhance documentation for Apps CLI and remove obsolete files
harshitha-cstk May 21, 2026
5343fc1
Merge branch 'v2-dev' into enh/dx-7524-migrate-bulk-operation-v2
harshitha-cstk May 22, 2026
c741316
feat: migrate RTE plugin to cli-plugins monorepo
harshitha-cstk May 22, 2026
50b9462
feat: add bulk operations plugin to cli-plugins monorepo
harshitha-cstk May 22, 2026
c93a2bd
Merge branch 'feat/migrate-external-cli-plugins-v2' into enh/dx-7524-…
harshitha-cstk May 22, 2026
9bea445
Merge branch 'enh/dx-7524-migrate-apps-cli-v2' into enh/dx-7527-migra…
harshitha-cstk May 22, 2026
8aae1ca
Merge pull request #154 from contentstack/enh/dx-7524-migrate-apps-cl…
harshitha-cstk May 22, 2026
9cd7ead
Merge branch 'enh/dx-7524-migrate-apps-cli-v2' into enh/dx-7527-migra…
harshitha-cstk May 22, 2026
66b6674
feat(tsgen): migrate contentstack-cli-tsgen into cli-plugins monorepo
cs-raj May 24, 2026
310e937
updated test workflow
cs-raj May 24, 2026
bac4f66
feat: migrate contentstack-cli-content-type v2 into cli-plugins monorepo
cs-raj May 24, 2026
68029fc
Dependency update
cs-raj May 24, 2026
54f5cb3
feat: migrate @contentstack/cli-cm-regex-validate to cli-plugins mono…
cs-raj May 25, 2026
721e036
fix: correct esModuleInterop imports for jsonexport and cli-table3
cs-raj May 25, 2026
a440c6c
Merge pull request #161 from contentstack/enh/dx-7527-migrate-bulk-op…
harshitha-cstk May 25, 2026
5556af5
Merge branch 'feat/migrate-external-cli-plugins-v2' into enhc/DX-7530…
cs-raj May 25, 2026
ac0fa34
lock file update
cs-raj May 25, 2026
90c1ff4
Merge pull request #171 from contentstack/enhc/DX-7530-migrate-cli-re…
cs-raj May 25, 2026
1ee9c02
Merge branch 'feat/migrate-external-cli-plugins-v2' into enhc/DX-7525
cs-raj May 25, 2026
4b41a77
Merge pull request #168 from contentstack/enhc/DX-7525
cs-raj May 25, 2026
977bfb6
Merge branch 'feat/migrate-external-cli-plugins-v2' into enhc/DX-7531…
cs-raj May 25, 2026
0f8befe
Merge pull request #166 from contentstack/enhc/DX-7531-migrate-tsgen-v2
cs-raj May 25, 2026
48b4d3f
lock file update
cs-raj May 26, 2026
5cda6a5
Merge branch 'v2-dev' into feat/migrate-external-cli-plugins-v2
cs-raj May 26, 2026
6c76d92
lock file update
cs-raj May 26, 2026
f785215
fix: removed prepare script from the migrate-rte and bulk-operation
cs-raj May 26, 2026
e43d846
fix: removed the deprecated flag from contetn-type and added messages…
cs-raj May 26, 2026
21ef641
added flag type
cs-raj May 26, 2026
5820a2c
fix: using the ux from cli-utilities and updated the regex-validate t…
cs-raj May 26, 2026
d047eb1
dependency update
cs-raj May 26, 2026
0875dad
Merge pull request #181 from contentstack/fix/external-plugin-migration
cs-raj May 26, 2026
7a3ecc3
Merge branch 'v2-dev' into feat/migrate-external-cli-plugins-v2
harshitha-cstk May 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .cursor/rules/dev-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ alwaysApply: true
## Monorepo Structure

### Package Organization
- **11 plugin packages** under `packages/`
- **12+ plugin packages** under `packages/`
- `contentstack-cli-cm-regex-validate` - Regex validation for Content Type/Global Field fields (`cm:stacks:validate-regex`; npm `@contentstack/cli-cm-regex-validate`; Jest tests)
- **pnpm workspaces** with `workspaces: ["packages/*"]`
- **Shared dependencies**: `@contentstack/cli-command`, `@contentstack/cli-utilities`
- **Build artifacts**: `lib/` directory (compiled from `src/`)
Expand Down
8 changes: 7 additions & 1 deletion .github/config/release.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"migration": false,
"seed": false,
"bootstrap": false,
"branches": false
"branches": false,
"apps-cli": false,
"tsgen": false,
"content-type": false,
"regex-validate": false,
"migrate-rte": false,
"bulk-operations": false
}
}
50 changes: 50 additions & 0 deletions .github/workflows/release-v2-beta-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,53 @@ jobs:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-query-export/package.json
tag: beta

# Content Type
- name: Publishing content-type (Beta)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-content-type/package.json
tag: beta

# Apps CLI
- name: Publishing apps-cli (Beta)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-apps-cli/package.json
tag: beta

# Tsgen
- name: Publishing tsgen (Beta)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-cli-tsgen/package.json
tag: beta
# Regex Validate
- name: Publishing regex-validate (Beta)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-cli-cm-regex-validate/package.json
access: public
tag: beta

# Migrate RTE
- name: Publishing migrate-rte (Beta)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-migrate-rte/package.json
access: public
tag: beta

# Bulk Operations
- name: Publishing bulk-operations (Beta)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-bulk-operations/package.json
access: public
tag: beta
52 changes: 52 additions & 0 deletions .github/workflows/tsgen-integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Tsgen Integration Tests

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
tsgen-integration:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.28.0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build tsgen plugin
run: pnpm --filter contentstack-cli-tsgen run build

- name: Install Contentstack CLI (v2 beta)
run: npm i -g @contentstack/cli@beta

- name: Configure CLI region
run: csdx config:set:region ${{ secrets.REGION }}

- name: Add delivery token
run: csdx auth:tokens:add -a ${{ secrets.TOKEN_ALIAS }} --delivery -k ${{ secrets.APIKEY }} --token ${{ secrets.DELIVERYKEY }} -e ${{ secrets.ENVIRONMENT }}

- name: Link tsgen plugin
working-directory: ./packages/contentstack-cli-tsgen
run: csdx plugins:link

- name: Run integration tests
run: pnpm --filter contentstack-cli-tsgen run test:integration
env:
TOKEN_ALIAS: ${{ secrets.TOKEN_ALIAS }}

- name: Unlink tsgen plugin
working-directory: ./packages/contentstack-cli-tsgen
run: csdx plugins:unlink
if: always()
24 changes: 24 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,27 @@ jobs:
- name: Run tests for Contentstack Query Export
working-directory: ./packages/contentstack-query-export
run: npm run test:unit

- name: Run tests for Contentstack Apps CLI
working-directory: ./packages/contentstack-apps-cli
run: npm run test:unit:report:json

- name: Run tests for Contentstack Tsgen plugin
working-directory: ./packages/contentstack-cli-tsgen
run: npm run test

- name: Run tests for Contentstack Content Type plugin
working-directory: ./packages/contentstack-content-type
run: npm run test:unit

- name: Run tests for Contentstack Regex Validate plugin
working-directory: ./packages/contentstack-cli-cm-regex-validate
run: npm run test:unit

- name: Run tests for Contentstack Migrate RTE
working-directory: ./packages/contentstack-migrate-rte
run: npm test

- name: Run tests for Contentstack Bulk Operations
working-directory: ./packages/contentstack-bulk-operations
run: npm test
55 changes: 52 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| Field | Detail |
| --- | --- |
| **Name:** | Contentstack CLI plugins (pnpm monorepo; root package name `csdx`) |
| **Purpose:** | OCLIF plugins that extend the Contentstack CLI (import/export, clone, migration, seed, audit, variants, etc.). |
| **Purpose:** | OCLIF plugins that extend the Contentstack CLI (import/export, clone, migration, migrate RTE, bulk operations, seed, audit, variants, Developer Hub apps, TypeScript codegen, etc.). |
| **Out of scope (if any):** | The **core** CLI aggregation lives in the separate `cli` monorepo; this repo ships plugin packages only. |

## Tech stack (at a glance)
Expand Down Expand Up @@ -35,11 +35,60 @@ CI: [.github/workflows/unit-test.yml](.github/workflows/unit-test.yml) and other
| Skill | Path | What it covers |
| --- | --- | --- |
| Development workflow | [skills/dev-workflow/SKILL.md](skills/dev-workflow/SKILL.md) | pnpm commands, CI, TDD expectations, PR checklist |
| Contentstack CLI | [skills/contentstack-cli/SKILL.md](skills/contentstack-cli/SKILL.md) | Plugin commands, OCLIF, Contentstack APIs |
| Framework | [skills/framework/SKILL.md](skills/framework/SKILL.md) | Utilities, config, logging, errors |
| Contentstack CLI | [skills/contentstack-cli/SKILL.md](skills/contentstack-cli/SKILL.md) | Plugin commands, OCLIF, Contentstack APIs (incl. `app:*` / `@contentstack/apps-cli`) |
| Framework | [skills/framework/SKILL.md](skills/framework/SKILL.md) | Utilities, config, logging, errors (incl. Developer Hub SDK, manifests, GraphQL) |
| Testing | [skills/testing/SKILL.md](skills/testing/SKILL.md) | Mocha/Chai, coverage, mocks |
| Code review | [skills/code-review/SKILL.md](skills/code-review/SKILL.md) | PR review for this monorepo |

## Apps CLI plugin (`@contentstack/apps-cli`)

- **Package path:** [packages/contentstack-apps-cli](packages/contentstack-apps-cli)
- **npm name:** `@contentstack/apps-cli` (unchanged for consumers)
- **Migrated from:** [contentstack/contentstack-apps-cli](https://github.com/contentstack/contentstack-apps-cli) — see [APPS-CLI-MIGRATION.md](APPS-CLI-MIGRATION.md)
- **v1 / v2:** Maintain on `v1-dev` (1.x CLI deps) and `v2-dev` / `v2-beta` (2.x beta deps) branches; align `@contentstack/cli-command` and `@contentstack/cli-utilities` versions with the target CLI line.
- **Docs:** OCLIF / `app:*` commands → [contentstack-cli](skills/contentstack-cli/SKILL.md#apps-cli-commands-app); SDK, manifests, GraphQL, HTTP → [framework](skills/framework/SKILL.md#apps-cli-plugin-contentstackapps-cli)

## Tsgen plugin (`contentstack-cli-tsgen`)

- **Package path:** [packages/contentstack-cli-tsgen](packages/contentstack-cli-tsgen)
- **npm name:** `contentstack-cli-tsgen` (unchanged for consumers)
- **Migrated from:** standalone `contentstack-cli-tsgen` repos — see [TSGEN-MIGRATION.md](TSGEN-MIGRATION.md)
- **v2 beta only:** `5.0.0-beta.0`+ on `feat/migrate-external-cli-plugins-v2` / `v2-beta`; requires CLI 2.x beta.
- **Docs:** `csdx tsgen` → [typescript-cli-tsgen](packages/contentstack-cli-tsgen/skills/typescript-cli-tsgen/SKILL.md); tests → [package testing skill](packages/contentstack-cli-tsgen/skills/testing/SKILL.md)

## Content Type plugin (`contentstack-cli-content-type`)

- **Package path:** [packages/contentstack-content-type](packages/contentstack-content-type)
- **npm name:** `contentstack-cli-content-type`
- **Migrated from:** [contentstack/contentstack-cli-content-type](https://github.com/contentstack/contentstack-cli-content-type) — see [CONTENT-TYPE-MIGRATION.md](CONTENT-TYPE-MIGRATION.md)
- **v1 / v2:** Maintain on `v1-dev` / `main` (1.x CLI deps) and `v2-beta` (2.x beta deps) branches; align `@contentstack/cli-command` and `@contentstack/cli-utilities` versions with the target CLI line.
- **Tests:** Jest + ts-jest (unlike most other packages which use Mocha + Chai)
- **Docs:** 6 commands under `content-type:*` → [packages/contentstack-content-type/AGENTS.md](packages/contentstack-content-type/AGENTS.md)

## Regex Validate plugin (`@contentstack/cli-cm-regex-validate`)

- **Package path:** [packages/contentstack-cli-cm-regex-validate](packages/contentstack-cli-cm-regex-validate)
- **npm name:** `@contentstack/cli-cm-regex-validate`
- **Migrated from:** [contentstack/cli-cm-regex-validate](https://github.com/contentstack/cli-cm-regex-validate) — see [REGEX-VALIDATE-MIGRATION.md](REGEX-VALIDATE-MIGRATION.md)
- **v1 / v2:** Maintain on `v1-dev` / `main` (v1 CLI deps) and `v2-beta` (`~2.0.0-beta.7` / `~2.0.0-beta.8`, version `2.0.0-beta.0`); align with target CLI line.
- **Tests:** Jest + ts-jest (unlike most other packages which use Mocha + Chai)
- **Command:** Single command `cm:stacks:validate-regex` (short name `RGXVLD`)
- **Docs:** [packages/contentstack-cli-cm-regex-validate/AGENTS.md](packages/contentstack-cli-cm-regex-validate/AGENTS.md)

## Migrate RTE plugin (`@contentstack/cli-cm-migrate-rte`)

- **Package path:** [packages/contentstack-migrate-rte](packages/contentstack-migrate-rte)
- **npm name:** `@contentstack/cli-cm-migrate-rte` (unchanged)
- **Migrated from:** [contentstack/cli-cm-migrate-rte](https://github.com/contentstack/cli-cm-migrate-rte) — see [MIGRATE-RTE-MIGRATION.md](MIGRATE-RTE-MIGRATION.md)
- **Command:** `csdx cm:entries:migrate-html-rte` — JS sources in `src/`; `pnpm --filter @contentstack/cli-cm-migrate-rte run build` (`oclif manifest`) and `test` (see [dev-workflow](skills/dev-workflow/SKILL.md))

## Bulk operations plugin (`@contentstack/cli-bulk-operations`)

- **Package path:** [packages/contentstack-bulk-operations](packages/contentstack-bulk-operations)
- **npm name:** `@contentstack/cli-bulk-operations` (unchanged)
- **Migrated from:** [contentstack/cli-bulk-operations](https://github.com/contentstack/cli-bulk-operations) — see [BULK-OPERATIONS-MIGRATION.md](BULK-OPERATIONS-MIGRATION.md) (commands + repository)
- **Commands:** `csdx cm:stacks:bulk-entries`, `csdx cm:stacks:bulk-assets`, `csdx cm:stacks:bulk-taxonomies` — see [dev-workflow](skills/dev-workflow/SKILL.md)

## Using Cursor (optional)

If you use **Cursor**, [.cursor/rules/README.md](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else.
51 changes: 51 additions & 0 deletions APPS-CLI-MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Apps CLI migration: standalone repo → cli-plugins monorepo

## Summary

The **@contentstack/apps-cli** plugin (`contentstack-apps-cli`) has moved from the standalone repository [contentstack/contentstack-apps-cli](https://github.com/contentstack/contentstack-apps-cli) into the [contentstack/cli-plugins](https://github.com/contentstack/cli-plugins) monorepo at **`packages/contentstack-apps-cli`**.

The **npm package name is unchanged**: `@contentstack/apps-cli`. Install and command usage stay the same.

## Repository and issue tracking

| Before | After |
| --- | --- |
| Source: `github.com/contentstack/contentstack-apps-cli` | Source: `github.com/contentstack/cli-plugins` → `packages/contentstack-apps-cli` |
| Issues: contentstack-apps-cli repo | Issues: [cli-plugins issues](https://github.com/contentstack/cli-plugins/issues) (label or mention `apps-cli` / `@contentstack/apps-cli`) |

The standalone **contentstack-apps-cli** repository is **archived** after the first release from cli-plugins. Open PRs and bugs should be recreated or linked in cli-plugins.

## Version lines (1.x vs 2.x)

| CLI line | cli-plugins branch | Apps plugin notes |
| --- | --- | --- |
| **1.x** | `v1-dev` / `v1-beta` | `@contentstack/cli-command` and `@contentstack/cli-utilities` on 1.x-compatible ranges |
| **2.x beta** | `v2-dev` / `v2-beta` | Align with 2.x beta core packages (same pattern as export, import, bootstrap) |

Develop and release each line on its branch; do not mix 1.x and 2.x dependency pins in the same branch.

## Install (unchanged)

```bash
csdx plugins:install @contentstack/apps-cli
# or
npm install -g @contentstack/apps-cli
```

## Local development

Clone [cli-dev-workspace](https://github.com/contentstack/cli-dev-workspace) (or cli-plugins only), then:

```bash
cd cli-plugins
pnpm install
pnpm --filter @contentstack/apps-cli run build
pnpm --filter @contentstack/apps-cli test
```

See [AGENTS.md](./AGENTS.md), [skills/contentstack-cli/SKILL.md](./skills/contentstack-cli/SKILL.md#apps-cli-commands-app), and [skills/framework/SKILL.md](./skills/framework/SKILL.md#apps-cli-plugin-contentstackapps-cli) for contributor docs.

## Related migrations

- Core CLI: [cli](https://github.com/contentstack/cli) monorepo
- Other external plugins (bulk operations, migrate-rte): same cli-plugins consolidation effort
10 changes: 10 additions & 0 deletions BULK-OPERATIONS-MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# 🔄 Migration Guide: From Bulk Publish to Bulk Operations Commands

> **Migrating from @contentstack/cli-cm-bulk-publish (v1.x) to New Unified Commands @contentstack/cli-bulk-operations (v1.x)**

## Repository

| Before | After |
| --- | --- |
| [contentstack/cli-bulk-operations](https://github.com/contentstack/cli-bulk-operations) | [contentstack/cli-plugins](https://github.com/contentstack/cli-plugins) → `packages/contentstack-bulk-operations` |
| Issues on standalone repo | [cli-plugins issues](https://github.com/contentstack/cli-plugins/issues) |

npm package name unchanged: **`@contentstack/cli-bulk-operations`**. Local dev: `pnpm --filter @contentstack/cli-bulk-operations run build` / `test` from cli-plugins (or cli-dev-workspace).

---

## What Changed?
Expand Down
76 changes: 76 additions & 0 deletions CONTENT-TYPE-MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Content Type plugin migration: standalone repo → cli-plugins monorepo

## Summary

The **contentstack-cli-content-type** plugin has moved from the standalone repository [contentstack/contentstack-cli-content-type](https://github.com/contentstack/contentstack-cli-content-type) into the [contentstack/cli-plugins](https://github.com/contentstack/cli-plugins) monorepo at **`packages/contentstack-content-type`**.

The **npm package name is unchanged**: `contentstack-cli-content-type`. Install and command usage stay the same.

First release from the monorepo: **2.0.0-beta.0** (previously 1.4.6 from the standalone repo).

## Repository and issue tracking

| Before | After |
| --- | --- |
| Source: `github.com/contentstack/contentstack-cli-content-type` | Source: `github.com/contentstack/cli-plugins` → `packages/contentstack-content-type` |
| Issues: contentstack-cli-content-type repo | Issues: [cli-plugins issues](https://github.com/contentstack/cli-plugins/issues) (label or mention `content-type` / `contentstack-cli-content-type`) |

The standalone **contentstack-cli-content-type** repository should be **archived** after the first release from cli-plugins. Open PRs and bugs should be recreated or linked in cli-plugins.

## Version lines (1.x vs 2.x)

| CLI line | cli-plugins branch | Plugin notes |
| --- | --- | --- |
| **1.x** | `v1-dev` / `main` | `@contentstack/cli-command ~1.8.2`, `@contentstack/cli-utilities ~1.18.3`; npm tag `latest` |
| **2.x beta** | `v2-dev` / `v2-beta` | Align with 2.x beta core packages; npm tag `beta` |

Develop and release each line on its branch; do not mix 1.x and 2.x dependency pins in the same branch.

## Install (unchanged)

```bash
csdx plugins:install contentstack-cli-content-type
```

## Commands (unchanged)

All 6 commands are identical to the standalone version:

| Command | Description |
| --- | --- |
| `csdx content-type:list` | List all Content Types in a Stack |
| `csdx content-type:details` | Display Content Type fields, types, references, and paths |
| `csdx content-type:audit` | Display recent changes (audit log) for a Content Type |
| `csdx content-type:compare` | Compare two versions of a Content Type in the same Stack |
| `csdx content-type:compare-remote` | Compare the same Content Type across two Stacks |
| `csdx content-type:diagram` | Generate a visual diagram (SVG or DOT) of the Stack content model |

## Local development

Clone [cli-dev-workspace](https://github.com/contentstack/cli-dev-workspace) (or cli-plugins only), then:

```bash
cd cli-plugins
pnpm install
pnpm --filter contentstack-cli-content-type run build
pnpm --filter contentstack-cli-content-type test
```

To link the plugin locally into your `csdx` installation:

```bash
cd packages/contentstack-content-type
csdx plugins:link
```

See [packages/contentstack-content-type/AGENTS.md](./packages/contentstack-content-type/AGENTS.md) and the [skills/](./packages/contentstack-content-type/skills/) directory for contributor docs.

## Test framework note

This package uses **Jest + ts-jest** (unlike most other packages in this monorepo which use Mocha + Chai). Tests live under `packages/contentstack-content-type/tests/` and run via `pnpm test` or `pnpm run test:unit`.

## Related migrations

- Apps CLI: [APPS-CLI-MIGRATION.md](./APPS-CLI-MIGRATION.md)
- Tsgen plugin: [TSGEN-MIGRATION.md](./TSGEN-MIGRATION.md)
- Core CLI: [cli](https://github.com/contentstack/cli) monorepo
Loading
Loading