@newlogic-digital/cli 1.5.0-next.2 → 1.5.0-next.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newlogic-digital/cli",
|
|
3
|
-
"version": "1.5.0-next.
|
|
3
|
+
"version": "1.5.0-next.3",
|
|
4
4
|
"main": "index.mjs",
|
|
5
5
|
"bin": {
|
|
6
6
|
"newlogic-cli": "index.mjs",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"index.js",
|
|
25
|
+
"skills",
|
|
25
26
|
"src"
|
|
26
27
|
],
|
|
27
28
|
"engines": {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: newlogic
|
|
3
|
+
description: Use the installed Newlogic CLI when Codex needs to run `newlogic`, scaffold `@newlogic-digital/ui` or `@newlogic-digital/cms` projects, prepare CMS templates and components, or manage installable blocks through `newlogic.config.json`. Trigger this skill for tasks involving the commands `init`, `cms`, or `blocks`, especially when an agent should run the CLI safely and non-interactively.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Newlogic CLI
|
|
7
|
+
|
|
8
|
+
## Quick Rules
|
|
9
|
+
|
|
10
|
+
- Run commands from the target project directory. `cms` and `blocks` operate on the current working tree.
|
|
11
|
+
- Prefer explicit flags to prompts. For automated runs, pass `-y` and any necessary options.
|
|
12
|
+
- Do not probe for `newlogic` in advance. Install it only after a real command fails because the binary is missing.
|
|
13
|
+
- Expect Node `>=22` and npm `>=10`.
|
|
14
|
+
- Use `newlogic` in user-facing examples.
|
|
15
|
+
|
|
16
|
+
## Commands
|
|
17
|
+
|
|
18
|
+
### `init`
|
|
19
|
+
|
|
20
|
+
Use to scaffold a new project.
|
|
21
|
+
|
|
22
|
+
- `newlogic init`
|
|
23
|
+
- `newlogic init ui <directory>`
|
|
24
|
+
- `newlogic init cms <directory>`
|
|
25
|
+
|
|
26
|
+
Useful non-interactive options:
|
|
27
|
+
|
|
28
|
+
- `--branch=main|dev`
|
|
29
|
+
- `--clone=ssh|https`
|
|
30
|
+
- `--scope=default|blank` for `ui`
|
|
31
|
+
- `--variant=cms-web|cms-eshop` for `cms`
|
|
32
|
+
- `--git`, `--remote=<git-url>`, `--install`
|
|
33
|
+
- `--prepare`, `--dev`, `--migrations` for `cms`
|
|
34
|
+
- `-y` to accept defaults without prompts
|
|
35
|
+
|
|
36
|
+
Examples:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
newlogic init ui demo --branch=dev --clone=https --scope=blank --git --remote=git@github.com:org/demo.git --install -y
|
|
40
|
+
newlogic init cms demo --branch=dev --clone=https --variant=cms-web --install --prepare --dev --migrations -y
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### `cms`
|
|
44
|
+
|
|
45
|
+
Use inside a CMS project.
|
|
46
|
+
|
|
47
|
+
- `newlogic cms prepare`
|
|
48
|
+
- `newlogic cms prepare views`
|
|
49
|
+
- `newlogic cms prepare components`
|
|
50
|
+
- `newlogic cms new-component <name>`
|
|
51
|
+
|
|
52
|
+
Notes:
|
|
53
|
+
|
|
54
|
+
- `prepare` copies templates and components from a UI project into CMS structure.
|
|
55
|
+
- `new-component` creates PHP component scaffolding and clears `temp/cache` if present.
|
|
56
|
+
- Deprecated aliases such as `new-section` still exist in code, but prefer `new-component`.
|
|
57
|
+
|
|
58
|
+
### `blocks`
|
|
59
|
+
|
|
60
|
+
Use to manage installable blocks in a project root.
|
|
61
|
+
|
|
62
|
+
- `newlogic blocks list`
|
|
63
|
+
- `newlogic blocks add <name...>`
|
|
64
|
+
- `newlogic blocks remove <name...>`
|
|
65
|
+
- `newlogic blocks update`
|
|
66
|
+
|
|
67
|
+
Notes:
|
|
68
|
+
|
|
69
|
+
- `list` prints all installable blocks with short descriptions so the agent can discover valid names before making changes.
|
|
70
|
+
- `add` accepts kebab-case or PascalCase block names.
|
|
71
|
+
- Installed blocks are recorded in `newlogic.config.json`.
|
|
72
|
+
- `update` reinstalls all configured blocks from `newlogic.config.json`.
|
|
73
|
+
- `add` and `remove` may modify files and install npm or composer dependencies.
|
|
74
|
+
|
|
75
|
+
Recommended flow:
|
|
76
|
+
|
|
77
|
+
1. Run `newlogic blocks list` to discover what blocks exist.
|
|
78
|
+
2. Match the user request to one or more listed block names.
|
|
79
|
+
3. Run `newlogic blocks add <name...>` only after the names are confirmed by the list output.
|
|
80
|
+
4. Use `remove` only when the user wants to delete blocks that are already installed in the current project.
|
|
81
|
+
5. Use `update` when the goal is to reinstall everything already tracked in `newlogic.config.json`.
|
|
82
|
+
|
|
83
|
+
## Agent Workflow
|
|
84
|
+
|
|
85
|
+
1. Choose the command based on intent: scaffold with `init`, sync CMS artifacts with `cms`, manage reusable blocks with `blocks`.
|
|
86
|
+
2. Run it from the correct working directory.
|
|
87
|
+
3. If the command fails because `newlogic` is missing, install it with `npm i -g @newlogic-digital/cli` and retry.
|
|
88
|
+
4. Prefer explicit flags and `-y` for deterministic execution.
|
|
89
|
+
5. After mutation commands, inspect changed files and report side effects such as generated folders, dependency installs, or `newlogic.config.json` updates.
|