@wpmoo/odoo 0.8.49 → 0.8.51
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/README.md +278 -208
- package/docs/assets/patreon-donate.png +0 -0
- package/docs/external-resources.md +124 -0
- package/docs/generated-environment-verification.md +38 -0
- package/docs/handoff.md +29 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,78 +1,64 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
|
+
[](https://github.com/wpmoo-org/wpmoo-odoo/actions/workflows/ci.yml) [](https://github.com/wpmoo-org/wpmoo-odoo) [](https://www.npmjs.com/package/@wpmoo/odoo) [](https://codecov.io/gh/wpmoo-org/wpmoo-odoo) [](LICENSE) [](https://github.com/wpmoo-org/wpmoo-odoo) [](https://www.buymeacoffee.com/cangir) [](https://www.patreon.com/wpmoo)
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
# WPMoo Odoo
|
|
5
6
|
|
|
6
|
-
WPMoo Odoo
|
|
7
|
+
WPMoo Odoo is a development-first CLI for creating and operating Docker Compose
|
|
8
|
+
based Odoo environments with source repositories managed as Git submodules.
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
command surface.
|
|
10
|
+
It gives Odoo teams a repeatable environment layout, a guided cockpit for daily
|
|
11
|
+
work, direct commands for automation, and recovery tools that refresh generated
|
|
12
|
+
files without touching product source code.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
repositories, so large Docker/skill assets do not need to be embedded in the
|
|
15
|
-
TypeScript CLI. The compose resource uses static version-specific files such as
|
|
16
|
-
`docker-compose_19.0.yml` so it can also be used standalone.
|
|
14
|
+
## Why WPMoo Odoo
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
- Create a local Odoo development environment from a dev repository and one or
|
|
17
|
+
more source repositories.
|
|
18
|
+
- Keep product source repositories under `odoo/custom/src/private` as Git
|
|
19
|
+
submodules pinned to the selected Odoo branch.
|
|
20
|
+
- Copy Docker Compose resources from the standalone
|
|
21
|
+
`wpmoo-org/odoo-docker-compose` resource instead of embedding large runtime
|
|
22
|
+
assets in the TypeScript package.
|
|
23
|
+
- Optionally copy project-local Agent Skills from `wpmoo-org/odoo-skills` into
|
|
24
|
+
generated environments.
|
|
25
|
+
- Use either a guided terminal cockpit or direct CLI commands for the same
|
|
26
|
+
lifecycle tasks.
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
## Requirements
|
|
29
|
+
|
|
30
|
+
- Node.js `>=20.17`
|
|
31
|
+
- Git
|
|
32
|
+
- Docker and Docker Compose for generated environment runtime commands
|
|
33
|
+
- Optional: GitHub CLI (`gh`) for repository discovery, repository creation, and
|
|
34
|
+
deeper diagnostics
|
|
24
35
|
|
|
25
|
-
The
|
|
26
|
-
|
|
36
|
+
The wizard currently offers Odoo `19.0`, `18.0`, `17.0`, and `16.0`. The copied
|
|
37
|
+
Compose resource must include the matching `docker-compose_<version>.yml` file
|
|
38
|
+
for the selected branch.
|
|
27
39
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
asks where the repos should live and uses that owner for the default repo URLs.
|
|
31
|
-
The wizard also checks whether the dev and source repositories are accessible.
|
|
32
|
-
If they are not accessible, it can create them for you after confirmation.
|
|
40
|
+
Install GitHub CLI when you want WPMoo to discover your personal account and
|
|
41
|
+
organizations or create missing repositories from the interactive wizard:
|
|
33
42
|
|
|
34
43
|
```bash
|
|
35
44
|
brew install gh
|
|
36
45
|
gh auth login
|
|
37
46
|
```
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
`https://github.com/example-org/odoo_sample_module.git`. If a GitHub
|
|
41
|
-
organization page URL like `https://github.com/orgs/example-org/odoo_sample_module`
|
|
42
|
-
is entered, the CLI normalizes it to the cloneable form.
|
|
48
|
+
## Quick Start
|
|
43
49
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Interactive wizard:
|
|
50
|
+
Run the guided wizard from a workspace directory:
|
|
47
51
|
|
|
48
52
|
```bash
|
|
49
53
|
npx @wpmoo/odoo
|
|
50
54
|
```
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`Command palette /` for slash-style search across services, modules, database,
|
|
57
|
-
diagnostics, repositories, and maintenance categories, plus guided category
|
|
58
|
-
menus for common workflows.
|
|
59
|
-
|
|
60
|
-
```text
|
|
61
|
-
Command palette /
|
|
62
|
-
Services
|
|
63
|
-
Modules
|
|
64
|
-
Database
|
|
65
|
-
Diagnostics
|
|
66
|
-
Repositories
|
|
67
|
-
Maintenance
|
|
68
|
-
Exit
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Direct commands remain available for scripts and repeatable terminal workflows,
|
|
72
|
-
such as `npx @wpmoo/odoo status`, `npx @wpmoo/odoo test sale --db devel`, and
|
|
73
|
-
`npx @wpmoo/odoo logs odoo`.
|
|
56
|
+
If the current directory is not already a WPMoo environment, the CLI opens the
|
|
57
|
+
create flow. It asks for the product slug, Odoo version, dev environment repo,
|
|
58
|
+
source repo URLs, optional extra source repos, project-local Agent Skills, and
|
|
59
|
+
empty repository initialization behavior.
|
|
74
60
|
|
|
75
|
-
|
|
61
|
+
For non-interactive usage:
|
|
76
62
|
|
|
77
63
|
```bash
|
|
78
64
|
npx @wpmoo/odoo create \
|
|
@@ -80,11 +66,10 @@ npx @wpmoo/odoo create \
|
|
|
80
66
|
--odoo-version 19.0 \
|
|
81
67
|
--dev-repo-url https://github.com/example-org/odoo_sample_module_dev.git \
|
|
82
68
|
--source-repo-url https://github.com/example-org/odoo_sample_module.git \
|
|
83
|
-
--create-missing-repos \
|
|
84
69
|
--init-empty-repos
|
|
85
70
|
```
|
|
86
71
|
|
|
87
|
-
|
|
72
|
+
Add multiple source repositories by repeating `--source-repo-url`:
|
|
88
73
|
|
|
89
74
|
```bash
|
|
90
75
|
npx @wpmoo/odoo create \
|
|
@@ -97,7 +82,7 @@ npx @wpmoo/odoo create \
|
|
|
97
82
|
--source-addons odoo_sample_module_reports
|
|
98
83
|
```
|
|
99
84
|
|
|
100
|
-
|
|
85
|
+
Preview planned files and commands without writing:
|
|
101
86
|
|
|
102
87
|
```bash
|
|
103
88
|
npx @wpmoo/odoo create \
|
|
@@ -107,72 +92,183 @@ npx @wpmoo/odoo create \
|
|
|
107
92
|
--dry-run
|
|
108
93
|
```
|
|
109
94
|
|
|
110
|
-
|
|
95
|
+
## The Cockpit
|
|
96
|
+
|
|
97
|
+
Run the package with no command inside a generated environment:
|
|
111
98
|
|
|
112
99
|
```bash
|
|
113
|
-
npx @wpmoo/odoo
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
npx @wpmoo/odoo
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The cockpit starts with a fast environment status summary, then opens a compact
|
|
104
|
+
menu designed for repeated local work:
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
Command palette /
|
|
108
|
+
Services
|
|
109
|
+
Modules
|
|
110
|
+
Database
|
|
111
|
+
Diagnostics
|
|
112
|
+
Repositories
|
|
113
|
+
Maintenance
|
|
114
|
+
Exit
|
|
118
115
|
```
|
|
119
116
|
|
|
120
|
-
|
|
117
|
+
The UI is intentionally practical rather than decorative:
|
|
118
|
+
|
|
119
|
+
- `Command palette /` searches slash commands such as `/test`, `/logs`,
|
|
120
|
+
`/doctor`, and `/safe-reset`.
|
|
121
|
+
- Category menus group related tasks for scanability: services, modules,
|
|
122
|
+
database, diagnostics, repositories, and maintenance.
|
|
123
|
+
- `Esc` returns from category menus to the top-level cockpit.
|
|
124
|
+
- Empty states explain the next action, such as adding a source repo before
|
|
125
|
+
selecting a module.
|
|
126
|
+
- Risky commands such as stopping services, resetting databases, restoring
|
|
127
|
+
snapshots, removing repos, removing modules, and safe reset ask for explicit
|
|
128
|
+
confirmation.
|
|
129
|
+
- Guided prompts collect common arguments for daily actions, including module
|
|
130
|
+
names, database names, test modes, tags, snapshot names, and POT output paths.
|
|
131
|
+
|
|
132
|
+
## Cockpit Command Map
|
|
133
|
+
|
|
134
|
+
| Category | Commands |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| Services | `start`, `stop`, `restart`, `logs`, `shell` |
|
|
137
|
+
| Modules | `install`, `update`, `test`, `lint`, `pot`, `add-module`, `remove-module` |
|
|
138
|
+
| Database | `psql`, `snapshot`, `restore-snapshot`, `resetdb` |
|
|
139
|
+
| Diagnostics | `status`, `doctor` |
|
|
140
|
+
| Repositories | `add-repo`, `remove-repo` |
|
|
141
|
+
| Maintenance | `safe-reset` |
|
|
142
|
+
|
|
143
|
+
Every cockpit action maps to a direct command, or to an equivalent management
|
|
144
|
+
command such as `/safe-reset` mapping to `reset`, for scripting and repeatable
|
|
145
|
+
terminal workflows.
|
|
146
|
+
|
|
147
|
+
## Direct Commands
|
|
121
148
|
|
|
122
149
|
```bash
|
|
123
|
-
|
|
124
|
-
|
|
150
|
+
npx @wpmoo/odoo --help
|
|
151
|
+
npx @wpmoo/odoo --version
|
|
125
152
|
|
|
126
|
-
npx @wpmoo/odoo
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
153
|
+
npx @wpmoo/odoo status
|
|
154
|
+
npx @wpmoo/odoo doctor
|
|
155
|
+
npx @wpmoo/odoo add-repo --repo-url https://github.com/example-org/odoo_sample_module_reports.git
|
|
156
|
+
npx @wpmoo/odoo remove-repo --repo odoo_sample_module_reports
|
|
157
|
+
npx @wpmoo/odoo add-module --repo odoo_sample_module --module odoo_sample_module_base
|
|
158
|
+
npx @wpmoo/odoo remove-module --repo odoo_sample_module --module odoo_sample_module_base
|
|
159
|
+
npx @wpmoo/odoo reset
|
|
160
|
+
|
|
161
|
+
npx @wpmoo/odoo start
|
|
162
|
+
npx @wpmoo/odoo stop
|
|
163
|
+
npx @wpmoo/odoo restart
|
|
164
|
+
npx @wpmoo/odoo logs odoo
|
|
165
|
+
npx @wpmoo/odoo shell
|
|
166
|
+
npx @wpmoo/odoo psql postgres
|
|
167
|
+
|
|
168
|
+
npx @wpmoo/odoo install sale devel
|
|
169
|
+
npx @wpmoo/odoo update sale devel
|
|
170
|
+
npx @wpmoo/odoo test sale --db devel --mode update --tags /sale
|
|
171
|
+
npx @wpmoo/odoo lint
|
|
172
|
+
npx @wpmoo/odoo pot sale devel i18n/sale.pot
|
|
173
|
+
|
|
174
|
+
npx @wpmoo/odoo resetdb devel sale
|
|
175
|
+
npx @wpmoo/odoo snapshot devel before-update
|
|
176
|
+
npx @wpmoo/odoo restore-snapshot before-update devel
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Daily action commands must be run from a generated environment root containing
|
|
180
|
+
`.wpmoo/odoo.json`. They delegate to fixed scripts under `./scripts`; they do
|
|
181
|
+
not search parent directories or run arbitrary script names.
|
|
182
|
+
|
|
183
|
+
## Generated Environment Layout
|
|
184
|
+
|
|
185
|
+
A generated environment is a separate Git repository, usually named
|
|
186
|
+
`<product>_dev`. Product source code stays in child source repositories.
|
|
187
|
+
|
|
188
|
+
```text
|
|
189
|
+
odoo_sample_module_dev/
|
|
190
|
+
|-- .wpmoo/
|
|
191
|
+
| `-- odoo.json
|
|
192
|
+
|-- .env.example
|
|
193
|
+
|-- AGENTS.md
|
|
194
|
+
|-- README.md
|
|
195
|
+
|-- docs/
|
|
196
|
+
| |-- appstore-release.md
|
|
197
|
+
| `-- compose.md
|
|
198
|
+
|-- docker-compose_19.0.yml
|
|
199
|
+
|-- etc/
|
|
200
|
+
|-- moo
|
|
201
|
+
|-- odoo/
|
|
202
|
+
| `-- custom/
|
|
203
|
+
| `-- src/
|
|
204
|
+
| `-- private/
|
|
205
|
+
| `-- odoo_sample_module/
|
|
206
|
+
`-- scripts/
|
|
133
207
|
```
|
|
134
208
|
|
|
135
|
-
|
|
209
|
+
The metadata file `.wpmoo/odoo.json` records the product slug, selected Odoo
|
|
210
|
+
version, dev repo URL, source repos, engine, external resource refs, ports, and
|
|
211
|
+
template configuration. Status, doctor, daily actions, and safe reset use that
|
|
212
|
+
metadata instead of guessing from the filesystem.
|
|
213
|
+
|
|
214
|
+
## Daily `./moo` Commands
|
|
215
|
+
|
|
216
|
+
Generated environments include a local `./moo` dispatcher. It is the shortest
|
|
217
|
+
path for everyday Compose and Odoo work:
|
|
136
218
|
|
|
137
219
|
```bash
|
|
138
|
-
|
|
220
|
+
cp .env.example .env
|
|
221
|
+
|
|
222
|
+
./moo start
|
|
223
|
+
./moo logs odoo
|
|
224
|
+
./moo shell
|
|
225
|
+
./moo psql postgres
|
|
226
|
+
./moo restart
|
|
227
|
+
./moo stop
|
|
228
|
+
|
|
229
|
+
./moo install sale devel
|
|
230
|
+
./moo update sale devel
|
|
231
|
+
./moo test sale --db devel --mode update --tags /sale
|
|
232
|
+
./moo lint
|
|
233
|
+
./moo pot sale devel i18n/sale.pot
|
|
234
|
+
|
|
235
|
+
./moo snapshot devel before-update
|
|
236
|
+
./moo restore-snapshot before-update devel
|
|
237
|
+
./moo resetdb devel sale
|
|
139
238
|
```
|
|
140
239
|
|
|
141
|
-
|
|
142
|
-
`
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
branch automatically.
|
|
240
|
+
Use `npx @wpmoo/odoo ...` for package/operator commands such as `create`,
|
|
241
|
+
`add-repo`, `remove-repo`, `add-module`, `remove-module`, `status`, `doctor`,
|
|
242
|
+
and `reset`. Use `./moo ...` inside a generated environment for local daily
|
|
243
|
+
Compose commands.
|
|
146
244
|
|
|
147
|
-
|
|
245
|
+
## Repository and Module Management
|
|
246
|
+
|
|
247
|
+
Add a source repository from the cockpit or direct command:
|
|
148
248
|
|
|
149
249
|
```bash
|
|
150
250
|
npx @wpmoo/odoo add-repo \
|
|
151
251
|
--repo-url https://github.com/example-org/odoo_sample_module_reports.git \
|
|
152
|
-
--odoo-version 19.0 \
|
|
153
252
|
--init-empty-repos
|
|
154
253
|
```
|
|
155
254
|
|
|
156
|
-
When
|
|
157
|
-
Odoo version from `.wpmoo/odoo.json`. Pass `--odoo-version` only when you
|
|
158
|
-
need an explicit override.
|
|
159
|
-
|
|
160
|
-
Remove a source repository from the dev environment:
|
|
255
|
+
When GitHub CLI is available and authenticated, the interactive flow can:
|
|
161
256
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
257
|
+
- detect the owner or organization from the current environment;
|
|
258
|
+
- suggest repository URLs;
|
|
259
|
+
- check whether the repository is accessible;
|
|
260
|
+
- create inaccessible repositories after confirmation;
|
|
261
|
+
- initialize empty repositories with the selected Odoo branch.
|
|
165
262
|
|
|
166
|
-
Add a minimal Odoo module skeleton to a
|
|
263
|
+
Add a minimal Odoo module skeleton to a source repository:
|
|
167
264
|
|
|
168
265
|
```bash
|
|
169
266
|
npx @wpmoo/odoo add-module \
|
|
170
267
|
--repo odoo_sample_module \
|
|
171
|
-
--module odoo_sample_module_base
|
|
172
|
-
--odoo-version 19.0
|
|
268
|
+
--module odoo_sample_module_base
|
|
173
269
|
```
|
|
174
270
|
|
|
175
|
-
Remove a module registration
|
|
271
|
+
Remove a module registration while keeping files:
|
|
176
272
|
|
|
177
273
|
```bash
|
|
178
274
|
npx @wpmoo/odoo remove-module \
|
|
@@ -180,181 +276,155 @@ npx @wpmoo/odoo remove-module \
|
|
|
180
276
|
--module odoo_sample_module_base
|
|
181
277
|
```
|
|
182
278
|
|
|
183
|
-
|
|
279
|
+
Delete module files as well:
|
|
184
280
|
|
|
185
281
|
```bash
|
|
186
|
-
npx @wpmoo/odoo
|
|
282
|
+
npx @wpmoo/odoo remove-module \
|
|
283
|
+
--repo odoo_sample_module \
|
|
284
|
+
--module odoo_sample_module_base \
|
|
285
|
+
--delete-files
|
|
187
286
|
```
|
|
188
287
|
|
|
189
|
-
|
|
288
|
+
Remove a source repository submodule:
|
|
190
289
|
|
|
191
290
|
```bash
|
|
192
|
-
npx @wpmoo/odoo
|
|
291
|
+
npx @wpmoo/odoo remove-repo --repo odoo_sample_module_reports
|
|
193
292
|
```
|
|
194
293
|
|
|
195
|
-
|
|
196
|
-
|
|
294
|
+
WPMoo refuses to remove a source repo submodule when that submodule has
|
|
295
|
+
uncommitted changes.
|
|
296
|
+
|
|
297
|
+
## Status, Doctor, and Recovery
|
|
197
298
|
|
|
198
|
-
|
|
299
|
+
`status` is fast and offline. It reads local metadata and files only:
|
|
199
300
|
|
|
200
301
|
```bash
|
|
201
|
-
npx @wpmoo/odoo
|
|
302
|
+
npx @wpmoo/odoo status
|
|
202
303
|
```
|
|
203
304
|
|
|
204
|
-
|
|
205
|
-
|
|
305
|
+
It reports whether the environment is detected, which Odoo version is selected,
|
|
306
|
+
how many source repos are configured, how many module candidates are present,
|
|
307
|
+
which core files are missing, and the recommended next action.
|
|
308
|
+
|
|
309
|
+
`doctor` performs deeper checks:
|
|
206
310
|
|
|
207
311
|
```bash
|
|
208
|
-
|
|
209
|
-
./moo logs odoo
|
|
210
|
-
./moo restart
|
|
211
|
-
./moo stop
|
|
212
|
-
./moo shell
|
|
213
|
-
./moo psql devel
|
|
214
|
-
./moo install sale devel
|
|
215
|
-
./moo update sale devel
|
|
216
|
-
./moo test sale --db devel --mode update --tags /sale
|
|
217
|
-
./moo resetdb devel sale
|
|
218
|
-
./moo snapshot devel before-update
|
|
219
|
-
./moo restore-snapshot before-update devel
|
|
220
|
-
./moo lint
|
|
221
|
-
./moo pot sale devel i18n/sale.pot
|
|
312
|
+
npx @wpmoo/odoo doctor
|
|
222
313
|
```
|
|
223
314
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
Daily actions require `.wpmoo/odoo.json` in the current directory and delegate to
|
|
229
|
-
fixed scripts under `./scripts`; they do not search parent directories or accept
|
|
230
|
-
arbitrary script names.
|
|
315
|
+
It validates metadata, engine support, selected compose files, daily scripts,
|
|
316
|
+
source repo paths, `.env` ports, Docker CLI access, Docker Compose access, Git
|
|
317
|
+
submodule state, and GitHub CLI authentication when available.
|
|
231
318
|
|
|
232
|
-
|
|
319
|
+
Safe reset refreshes generated environment files without deleting product source
|
|
320
|
+
code:
|
|
233
321
|
|
|
234
322
|
```bash
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
# add source repo
|
|
239
|
-
npx @wpmoo/odoo add-repo --repo-url https://github.com/example-org/odoo_sample_module_reports.git
|
|
323
|
+
npx @wpmoo/odoo reset
|
|
324
|
+
```
|
|
240
325
|
|
|
241
|
-
|
|
242
|
-
|
|
326
|
+
Safe reset updates generated files such as `.wpmoo/odoo.json`, `moo`,
|
|
327
|
+
`.gitignore`, `.env.example`, generated docs, compose assets, and optional
|
|
328
|
+
Agent Skills. It does not touch source repo folders under
|
|
329
|
+
`odoo/custom/src/private`, module source code, Git history, remotes, or
|
|
330
|
+
branches.
|
|
243
331
|
|
|
244
|
-
|
|
245
|
-
npx @wpmoo/odoo test sale --db devel --mode update --tags /sale
|
|
332
|
+
Recommended recovery pattern:
|
|
246
333
|
|
|
247
|
-
|
|
248
|
-
|
|
334
|
+
```bash
|
|
335
|
+
./moo snapshot devel before-reset
|
|
249
336
|
npx @wpmoo/odoo reset
|
|
250
|
-
npx @wpmoo/odoo restore-snapshot before-reset devel
|
|
251
|
-
|
|
252
|
-
# daily checks
|
|
253
|
-
npx @wpmoo/odoo status
|
|
254
337
|
npx @wpmoo/odoo doctor
|
|
255
|
-
./moo
|
|
338
|
+
./moo restore-snapshot before-reset devel
|
|
256
339
|
```
|
|
257
340
|
|
|
258
|
-
|
|
259
|
-
add/remove repo, add/remove module, `doctor`, and `reset`. Generated
|
|
260
|
-
environments include `./moo` for local daily commands; it also falls back to
|
|
261
|
-
`npx @wpmoo/odoo@latest` for package commands such as `./moo doctor`.
|
|
262
|
-
For the operator-facing verification matrix, see
|
|
263
|
-
[`docs/generated-environment-verification.md`](docs/generated-environment-verification.md).
|
|
341
|
+
## External Resources
|
|
264
342
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
Each source repo can contain one or many Odoo modules. For example:
|
|
343
|
+
WPMoo Odoo keeps the package small by copying external resources into generated
|
|
344
|
+
environments:
|
|
268
345
|
|
|
269
346
|
```text
|
|
270
|
-
odoo
|
|
271
|
-
|
|
272
|
-
└── odoo_sample_module_another_module/
|
|
273
|
-
|
|
274
|
-
odoo/custom/src/private/odoo_sample_module_pro/
|
|
275
|
-
├── odoo_sample_module_payment/
|
|
276
|
-
└── odoo_sample_module_analytics/
|
|
347
|
+
gh:wpmoo-org/odoo-docker-compose
|
|
348
|
+
gh:wpmoo-org/odoo-skills
|
|
277
349
|
```
|
|
278
350
|
|
|
279
|
-
|
|
280
|
-
`--source-addons` in non-interactive advanced usage or add modules later with the
|
|
281
|
-
CLI.
|
|
282
|
-
|
|
283
|
-
## WPMoo Development Guidelines
|
|
284
|
-
|
|
285
|
-
The CLI keeps environment creation focused on Docker Compose resources, source
|
|
286
|
-
submodules, and WPMoo metadata. It does not install agent tools, editor setup,
|
|
287
|
-
doctor scripts, or other optional development packs.
|
|
288
|
-
|
|
289
|
-
If you want agent-assisted workflows inside a generated environment, install
|
|
290
|
-
and manage them manually in that environment. For example, Agentic Stack can be
|
|
291
|
-
installed separately:
|
|
351
|
+
Use the default resources:
|
|
292
352
|
|
|
293
353
|
```bash
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
354
|
+
npx @wpmoo/odoo create \
|
|
355
|
+
--product odoo_sample_module \
|
|
356
|
+
--source-repo-url https://github.com/example-org/odoo_sample_module.git \
|
|
357
|
+
--agent-skills-template
|
|
297
358
|
```
|
|
298
359
|
|
|
299
|
-
|
|
300
|
-
tool-owned development guideline files.
|
|
301
|
-
|
|
302
|
-
## Notes
|
|
360
|
+
Pin external resource refs:
|
|
303
361
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
-
|
|
308
|
-
|
|
309
|
-
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
`--create-missing-repos` is provided, or through the interactive wizard.
|
|
313
|
-
- Legacy `--org`, `--community-repo`, and `--pro-repo` flags are still accepted
|
|
314
|
-
when no `--source-repo-url` flags are provided.
|
|
315
|
-
|
|
316
|
-
## Release
|
|
362
|
+
```bash
|
|
363
|
+
npx @wpmoo/odoo create \
|
|
364
|
+
--product odoo_sample_module \
|
|
365
|
+
--source-repo-url https://github.com/example-org/odoo_sample_module.git \
|
|
366
|
+
--compose-template-ref v0.1.0 \
|
|
367
|
+
--agent-skills-template \
|
|
368
|
+
--agent-skills-template-ref v0.1.0
|
|
369
|
+
```
|
|
317
370
|
|
|
318
|
-
|
|
371
|
+
Use local resource clones while developing the resource packages:
|
|
319
372
|
|
|
320
373
|
```bash
|
|
321
|
-
|
|
374
|
+
git clone https://github.com/wpmoo-org/odoo-docker-compose ../odoo-docker-compose
|
|
375
|
+
git clone https://github.com/wpmoo-org/odoo-skills ../odoo-skills
|
|
376
|
+
|
|
377
|
+
npx @wpmoo/odoo create \
|
|
378
|
+
--engine compose \
|
|
379
|
+
--compose-template-url ../odoo-docker-compose \
|
|
380
|
+
--agent-skills-template \
|
|
381
|
+
--agent-skills-template-url ../odoo-skills \
|
|
382
|
+
--product odoo_sample_module \
|
|
383
|
+
--source-repo-url https://github.com/example-org/odoo_sample_module.git
|
|
322
384
|
```
|
|
323
385
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
If the version is not published yet, it keeps the current version and runs
|
|
328
|
-
`npm test -- test/package.test.ts` and `npm pack --dry-run`. Actual publishing
|
|
329
|
-
is handled by the GitHub Actions workflow.
|
|
386
|
+
More detail: [External Resources](docs/external-resources.md).
|
|
387
|
+
|
|
388
|
+
## Verification
|
|
330
389
|
|
|
331
|
-
|
|
390
|
+
Run local package checks from the repository root:
|
|
332
391
|
|
|
333
392
|
```bash
|
|
334
393
|
npm run typecheck
|
|
335
394
|
npm test
|
|
395
|
+
npm run test:coverage
|
|
336
396
|
npm run build
|
|
337
397
|
```
|
|
338
398
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
399
|
+
Generated environment behavior is covered by the operator-facing matrix in
|
|
400
|
+
[Generated Environment Verification](docs/generated-environment-verification.md).
|
|
401
|
+
|
|
402
|
+
## Release
|
|
403
|
+
|
|
404
|
+
The normal release path uses the repository helper and GitHub Actions trusted
|
|
405
|
+
publishing:
|
|
342
406
|
|
|
343
407
|
```bash
|
|
408
|
+
npm run release:check
|
|
409
|
+
npm run typecheck
|
|
410
|
+
npm test
|
|
411
|
+
npm run build
|
|
344
412
|
VERSION="$(node -p "require('./package.json').version")"
|
|
345
413
|
git tag -a "v$VERSION" -m "Release v$VERSION"
|
|
346
414
|
git push origin "v$VERSION"
|
|
347
415
|
```
|
|
348
416
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
Do not run `npm publish` for the normal release path.
|
|
417
|
+
If `npm run release:check` bumps `package.json` and `package-lock.json`, commit
|
|
418
|
+
and push that version bump first, then rerun the release check before tagging.
|
|
419
|
+
Publishing is handled by the `Publish` workflow after the tag is pushed.
|
|
353
420
|
|
|
354
|
-
##
|
|
421
|
+
## Sponsoring
|
|
355
422
|
|
|
356
|
-
|
|
423
|
+
Support ongoing WPMoo development through recurring or one-time sponsorship:
|
|
357
424
|
|
|
358
425
|
<a href="https://www.buymeacoffee.com/cangir">
|
|
359
426
|
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me a Coffee" width="250">
|
|
427
|
+
</a>
|
|
428
|
+
<a href="https://www.patreon.com/wpmoo">
|
|
429
|
+
<img src="docs/assets/patreon-donate.png" alt="Support WPMoo on Patreon" width="250">
|
|
360
430
|
</a>
|
|
Binary file
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# External Resources
|
|
2
|
+
|
|
3
|
+
WPMoo does not embed large Docker Compose resources or Agent Skill text inside
|
|
4
|
+
the TypeScript CLI. The CLI copies standalone external resources from their own
|
|
5
|
+
repositories/packages into generated environments, while those resources can also
|
|
6
|
+
be used independently.
|
|
7
|
+
|
|
8
|
+
## Repositories/packages
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
gh:wpmoo-org/odoo-docker-compose
|
|
12
|
+
npm:@wpmoo/odoo-skills
|
|
13
|
+
gh:wpmoo-org/odoo-skills
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Compose resource
|
|
17
|
+
|
|
18
|
+
`wpmoo-org/odoo-docker-compose` uses static version-specific files:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
docker-compose_17.0.yml
|
|
22
|
+
docker-compose_18.0.yml
|
|
23
|
+
docker-compose_19.0.yml
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Standalone usage:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git clone https://github.com/wpmoo-org/odoo-docker-compose
|
|
30
|
+
cd odoo-docker-compose
|
|
31
|
+
cp .env.example .env
|
|
32
|
+
docker compose -f docker-compose_19.0.yml up -d
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
WPMoo CLI usage with the default remote source:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx @wpmoo/odoo create \
|
|
39
|
+
--engine compose \
|
|
40
|
+
--product my_product \
|
|
41
|
+
--source-repo-url https://github.com/example-org/my_product.git
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
During resource development, use a local clone:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
git clone https://github.com/wpmoo-org/odoo-docker-compose ../odoo-docker-compose
|
|
48
|
+
|
|
49
|
+
npx @wpmoo/odoo create \
|
|
50
|
+
--engine compose \
|
|
51
|
+
--compose-template-url ../odoo-docker-compose \
|
|
52
|
+
--product my_product \
|
|
53
|
+
--source-repo-url https://github.com/example-org/my_product.git
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Agent Skills resource
|
|
57
|
+
|
|
58
|
+
`@wpmoo/odoo-skills` is generic and intentionally not project-specific:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
skills/odoo-oca/SKILL.md
|
|
62
|
+
skills/odoo-open-core/SKILL.md
|
|
63
|
+
skills/odoo-porting/SKILL.md
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Standalone Pi package usage:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pi install npm:@wpmoo/odoo-skills
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Standalone npx project-local install:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npx @wpmoo/odoo-skills --target /path/to/project
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
WPMoo CLI can also copy those skills into generated environments from the default
|
|
79
|
+
remote source:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx @wpmoo/odoo create \
|
|
83
|
+
--product my_product \
|
|
84
|
+
--source-repo-url https://github.com/example-org/my_product.git \
|
|
85
|
+
--agent-skills-template
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
During skill development, use a local clone:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
git clone https://github.com/wpmoo-org/odoo-skills ../odoo-skills
|
|
92
|
+
|
|
93
|
+
npx @wpmoo/odoo create \
|
|
94
|
+
--product my_product \
|
|
95
|
+
--source-repo-url https://github.com/example-org/my_product.git \
|
|
96
|
+
--agent-skills-template \
|
|
97
|
+
--agent-skills-template-url ../odoo-skills
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Generated project-local skills are placed under:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
.agents/skills/
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Project or module-specific guidance should live in that project/module's own
|
|
107
|
+
`AGENTS.md` or custom skill files.
|
|
108
|
+
|
|
109
|
+
## References and pins
|
|
110
|
+
|
|
111
|
+
Remote Git sources can be pinned with refs:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npx @wpmoo/odoo create \
|
|
115
|
+
--engine compose \
|
|
116
|
+
--compose-template-ref v0.1.0 \
|
|
117
|
+
--agent-skills-template \
|
|
118
|
+
--agent-skills-template-ref v0.1.0 \
|
|
119
|
+
--product my_product \
|
|
120
|
+
--source-repo-url https://github.com/example-org/my_product.git
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The CLI supports local directories and Git-style resource sources such as
|
|
124
|
+
`gh:owner/repo`, HTTPS Git URLs, and SSH Git URLs.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Generated Environment Verification
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
This matrix covers disposable generated development environments only. It is for
|
|
6
|
+
local and CI verification of generated artifacts and command behavior. It does
|
|
7
|
+
not validate staging or production deployments.
|
|
8
|
+
|
|
9
|
+
## Command split
|
|
10
|
+
|
|
11
|
+
- Use `npx @wpmoo/odoo ...` for package/operator commands (`create`,
|
|
12
|
+
`add-repo`, `remove-repo`, `add-module`, `remove-module`, `doctor`, `reset`).
|
|
13
|
+
- Use `./moo ...` inside a generated environment for daily local compose
|
|
14
|
+
actions delegated to `./scripts/*.sh`.
|
|
15
|
+
|
|
16
|
+
## Verification matrix
|
|
17
|
+
|
|
18
|
+
| Area | Contract | Primary command(s) |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| Scaffold files and metadata | Generated environment includes expected files and `.wpmoo/odoo.json` metadata. | `npx @wpmoo/odoo create ...` |
|
|
21
|
+
| Compose resource files | Required compose/version files, compose docs, and script set are present. | `npx @wpmoo/odoo create ...` |
|
|
22
|
+
| `./moo` delegation | `./moo` dispatches fixed daily actions to the matching script and preserves argument pass-through. | `./moo <action> ...` |
|
|
23
|
+
| Doctor checks | Metadata, compose files, scripts, source repo paths, and local tooling checks behave as expected. | `npx @wpmoo/odoo doctor` or `./moo doctor` |
|
|
24
|
+
| Source repo add/remove | Source repository registration and submodule lifecycle behave correctly. | `npx @wpmoo/odoo add-repo ...`, `npx @wpmoo/odoo remove-repo ...` |
|
|
25
|
+
| Module add/remove | Module registration changes are applied to the selected source repo config. | `npx @wpmoo/odoo add-module ...`, `npx @wpmoo/odoo remove-module ...` |
|
|
26
|
+
| Safe reset | Generated files are refreshed without deleting source module code. | `npx @wpmoo/odoo reset` |
|
|
27
|
+
| Snapshot/restore and lint/pot | These actions are delegated by `./moo` to compose scripts without extra package-side logic. | `./moo snapshot ...`, `./moo restore-snapshot ...`, `./moo lint`, `./moo pot ...` |
|
|
28
|
+
|
|
29
|
+
## Local verification commands
|
|
30
|
+
|
|
31
|
+
Run from the `wpmoo-odoo` repository root:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm run typecheck
|
|
35
|
+
npm test
|
|
36
|
+
npm run test:coverage
|
|
37
|
+
npm run build
|
|
38
|
+
```
|
package/docs/handoff.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Historical Handoff Notes
|
|
2
|
+
|
|
3
|
+
This file is an archive pointer for pre-0.8.37 handoff notes. Those notes
|
|
4
|
+
included a stale direct publish attempt and must not be used as current release
|
|
5
|
+
guidance.
|
|
6
|
+
|
|
7
|
+
Current release path:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run release:check
|
|
11
|
+
npm run typecheck
|
|
12
|
+
npm test
|
|
13
|
+
npm run build
|
|
14
|
+
VERSION="$(node -p "require('./package.json').version")"
|
|
15
|
+
git tag -a "v$VERSION" -m "Release v$VERSION"
|
|
16
|
+
git push origin "v$VERSION"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If `npm run release:check` bumps `package.json` and `package-lock.json`, commit
|
|
20
|
+
and push that version bump first, then rerun the release check before tagging.
|
|
21
|
+
|
|
22
|
+
Publishing is handled by the `Publish` GitHub Actions workflow through npm
|
|
23
|
+
Trusted Publishing after the tag is pushed. Do not run `npm publish` manually
|
|
24
|
+
unless a coordinator explicitly requests a fallback.
|
|
25
|
+
|
|
26
|
+
Current command standard:
|
|
27
|
+
|
|
28
|
+
- Use `npx @wpmoo/odoo ...` for package/operator commands.
|
|
29
|
+
- Use generated environment `./moo ...` for local compose daily commands.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wpmoo/odoo",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.51",
|
|
4
4
|
"description": "WPMoo Odoo lifecycle tooling for development, staging, and production workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|
|
34
|
-
"docs/assets"
|
|
34
|
+
"docs/assets",
|
|
35
|
+
"docs/*.md"
|
|
35
36
|
],
|
|
36
37
|
"engines": {
|
|
37
38
|
"node": ">=20.17"
|