|
| 1 | +# CLI export-query plugin – Agent guide |
| 2 | + |
| 3 | +**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**. |
| 4 | + |
| 5 | +## What this repo is |
| 6 | + |
| 7 | +| Field | Detail | |
| 8 | +| --- | --- | |
| 9 | +| **Name:** | `@contentstack/cli-cm-export-query` ([repository](https://github.com/contentstack/cli)) | |
| 10 | +| **Purpose:** | OCLIF plugin for **query-based** stack export (`cm:stacks:export-query` / short `EXPRTQRY`); implements `QueryExporter` and related export flow. | |
| 11 | +| **Out of scope (if any):** | Other export/import plugins live in sibling packages; this repo is only the query-export plugin. | |
| 12 | + |
| 13 | +## Tech stack (at a glance) |
| 14 | + |
| 15 | +| Area | Details | |
| 16 | +| --- | --- | |
| 17 | +| **Language** | TypeScript **^4.9** (`tsconfig.json`); Node **>= 14** (`engines`) | |
| 18 | +| **Build** | `tsc -b` → `lib/`; `prepack` runs compile + `oclif manifest` + `oclif readme`; copies `src/config` → `lib/` | |
| 19 | +| **Tests** | Mocha + Chai + Sinon; **nyc** coverage; tests under `test/**/*.test.ts` (see [skills/testing/SKILL.md](skills/testing/SKILL.md)) | |
| 20 | +| **Lint / coverage** | ESLint `src/**/*.ts`; nyc in `npm test` | |
| 21 | +| **Other** | OCLIF v4, Husky | |
| 22 | + |
| 23 | +## Commands (quick reference) |
| 24 | + |
| 25 | +| Command type | Command | |
| 26 | +| --- | --- | |
| 27 | +| **Build** | `npm run build` | |
| 28 | +| **Test** | `npm test` | |
| 29 | +| **Lint** | `npm run lint` | |
| 30 | + |
| 31 | +CI: [.github/workflows/unit-test.yml](.github/workflows/unit-test.yml); also `release.yml`, `sca-scan.yml`, `policy-scan.yml` under [.github/workflows/](.github/workflows/). |
| 32 | + |
| 33 | +## Where the documentation lives: skills |
| 34 | + |
| 35 | +| Skill | Path | What it covers | |
| 36 | +| --- | --- | --- | |
| 37 | +| Development workflow | [skills/dev-workflow/SKILL.md](skills/dev-workflow/SKILL.md) | CI, branches, Husky, PR expectations | |
| 38 | +| Contentstack CLI | [skills/contentstack-cli/SKILL.md](skills/contentstack-cli/SKILL.md) | Commands, `QueryExporter`, APIs | |
| 39 | +| Framework | [skills/framework/SKILL.md](skills/framework/SKILL.md) | Config, logging, errors, utilities | |
| 40 | +| Testing | [skills/testing/SKILL.md](skills/testing/SKILL.md) | Mocha/Chai/Sinon, nyc, TDD | |
| 41 | +| Code review | [skills/code-review/SKILL.md](skills/code-review/SKILL.md) | PR checklist | |
| 42 | + |
| 43 | +## Using Cursor (optional) |
| 44 | + |
| 45 | +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