@remkoj/optimizely-cms-cli 6.0.0-rc.1 → 6.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md ADDED
@@ -0,0 +1,68 @@
1
+ # @remkoj/optimizely-cms-cli — usage
2
+
3
+ CLI tool for Optimizely SaaS CMS. Provides the `opti-cms` binary.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install --save-dev @remkoj/optimizely-cms-cli
9
+ ```
10
+
11
+ Requires Node `>=24.0.0 <25.0.0`.
12
+
13
+ After each install or upgrade, a `postinstall` hook automatically runs `opti-cms project:ai` to create or refresh AI assistant configuration files in the project. The hook is silent and never blocks the install.
14
+
15
+ ## Environment variables
16
+
17
+ | Variable | Description |
18
+ | --- | --- |
19
+ | `OPTIMIZELY_CMS_URL` | CMS instance URL |
20
+ | `OPTIMIZELY_CMS_CLIENT_ID` | OAuth client ID |
21
+ | `OPTIMIZELY_CMS_CLIENT_SECRET` | OAuth client secret |
22
+ | `OPTIMIZELY_DEBUG` | Set to `"1"` to enable verbose output |
23
+
24
+ ## Invocation
25
+
26
+ ```bash
27
+ npx opti-cms <command> [options]
28
+ # or, if installed as a devDependency:
29
+ yarn opti-cms <command> [options]
30
+ ```
31
+
32
+ ## Global options
33
+
34
+ | Option | Alias | Description |
35
+ | --- | --- | --- |
36
+ | `--path` | `-p` | Application root folder (default: cwd) |
37
+ | `--components` | `-c` | Path to components folder (default: `./src/components/cms`) |
38
+ | `--cms_url` | `--cu` | Optimizely CMS URL |
39
+ | `--client_id` | `--ci` | API client ID |
40
+ | `--client_secret` | `--cs` | API client secret |
41
+ | `--user_id` | `-u` | Impersonate user ID |
42
+ | `--verbose` | | Enable logging |
43
+
44
+ ## Commands
45
+
46
+ | Command | Description |
47
+ | --- | --- |
48
+ | `cms:version` | Print CMS version information |
49
+ | `cms:reset` | Completely clear and reset the CMS database |
50
+ | `project:migrate` | Automate directory naming convention updates |
51
+ | `nextjs:create` | Scaffold a complete Next.js / Optimizely Graph structure |
52
+ | `nextjs:components` | Generate React components for a Next.js / Graph structure |
53
+ | `nextjs:factory` | Generate the ComponentFactory for a Next.js / Graph structure |
54
+ | `nextjs:fragments` | Generate GraphQL fragments for a Next.js / Graph structure |
55
+ | `nextjs:queries` | Generate GraphQL queries for two-query content loading |
56
+ | `nextjs:visualbuilder` | Generate Visual Builder components for a Next.js structure |
57
+ | `schema:download` | Download JSON schema files for type validation |
58
+ | `schema:list` | List all schemas available in the CMS instance |
59
+ | `schema:validate` | Validate `opti-type.json` and `opti-style.json` files |
60
+ | `schema:vscode` | Configure VS Code JSON schema validation for the project |
61
+ | `project:ai` | Create or update AI assistant config files (AGENTS.md, CLAUDE.md, GitHub Copilot, Cursor) so `@remkoj` package docs are available to the model |
62
+ | `style:create` | Create a new Visual Builder style definition |
63
+ | `styles:list` | List Visual Builder style definitions from the CMS |
64
+ | `styles:pull` | Pull Visual Builder style definitions from the CMS |
65
+ | `styles:push` | Push Visual Builder style definitions into the CMS (create/replace) |
66
+ | `styles:delete` | Remove Visual Builder style definitions from the CMS |
67
+ | `types:pull` | Pull content type definition files into the project |
68
+ | `types:push` | Push content type definitions into the CMS (create/replace) |