@vention/vention-cli 0.34.0 → 0.34.2
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 +44 -3
- package/main.esm.js +1653 -1049
- package/package.json +1 -1
- package/src/commands/skills.d.ts +2 -0
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
|
+
|
|
8
9
|
- [✨ Features](#-features)
|
|
9
10
|
- [🧠 Concepts & Overview](#-concepts--overview)
|
|
10
11
|
- [⚙️ Installation & Setup](#-installation--setup)
|
|
@@ -13,8 +14,8 @@
|
|
|
13
14
|
- [📖 API Reference](#-api-reference)
|
|
14
15
|
- [🔍 Troubleshooting & FAQ](#-troubleshooting--faq)
|
|
15
16
|
|
|
16
|
-
|
|
17
17
|
## ✨ Features
|
|
18
|
+
|
|
18
19
|
- **Local IDE development**: Edit MachineLogic Python apps in your preferred IDE with full tooling support
|
|
19
20
|
- **Bidirectional sync**: Pull apps from MachineBuilder and push changes back seamlessly
|
|
20
21
|
- **Active design detection**: Automatically finds and connects to designs with MachineLogic tab open
|
|
@@ -28,24 +29,30 @@
|
|
|
28
29
|
## 🧠 Concepts & Overview
|
|
29
30
|
|
|
30
31
|
### Active Design
|
|
32
|
+
|
|
31
33
|
The Vention CLI connects to **active designs** — designs where you have the MachineLogic tab open in MachineBuilder. This active session enables the CLI to discover available designs and apps for sync operations.
|
|
32
34
|
|
|
33
35
|
### Link State
|
|
36
|
+
|
|
34
37
|
When you pull or link an app, the CLI creates a `.machine-code-app-directory-info.json` file in your project root. This file maintains the connection between your local directory and a specific design/app combination, enabling seamless push/pull operations without re-selection.
|
|
35
38
|
|
|
36
39
|
### File Synchronization
|
|
40
|
+
|
|
37
41
|
- **Pull**: Downloads the app's source files from MachineBuilder and writes them to your local directory
|
|
38
42
|
- **Push**: Serializes local files and uploads them to the active design in MachineBuilder
|
|
39
|
-
- **Ignored patterns**: `venv`, `.venv`, `node_modules`, `dist`, `build`, `__pycache__`, `*.egg-info`, `.machine-code-app-directory-info.json`, `.vention-design-scene-assets.json`, `.vention-design-configuration.json`
|
|
43
|
+
- **Ignored patterns**: `venv`, `.venv`, `node_modules`, `dist`, `build`, `__pycache__`, `.claude`, `.agents`, `.git`, `*.egg-info`, `.machine-code-app-directory-info.json`, `.vention-design-scene-assets.json`, `.vention-design-configuration.json`
|
|
40
44
|
|
|
41
45
|
### Read-only Config & Scene Assets
|
|
46
|
+
|
|
42
47
|
Every `vention pull` also writes two read-only reference files to the app directory, sourced from the active design:
|
|
48
|
+
|
|
43
49
|
- `.vention-design-configuration.json`: the design's MachineMotion configuration
|
|
44
50
|
- `.vention-design-scene-assets.json`: the design's library assets, if the design has a library (omitted otherwise)
|
|
45
51
|
|
|
46
52
|
Both files are chmodded read-only (`0o444`) after writing, and are excluded from `push` via the ignored patterns above — they're a local snapshot for reference only, not something the CLI syncs back to MachineBuilder.
|
|
47
53
|
|
|
48
54
|
### Authentication Flow
|
|
55
|
+
|
|
49
56
|
OAuth-based authentication opens a browser window for secure login. Session tokens are stored in `~/.vention-cli-config.json` for subsequent CLI operations.
|
|
50
57
|
|
|
51
58
|
---
|
|
@@ -53,16 +60,19 @@ OAuth-based authentication opens a browser window for secure login. Session toke
|
|
|
53
60
|
## ⚙️ Installation & Setup
|
|
54
61
|
|
|
55
62
|
**Requirements:**
|
|
63
|
+
|
|
56
64
|
- Node.js 18 or higher
|
|
57
65
|
- npm or yarn
|
|
58
66
|
- Active MachineBuilder session with MachineLogic tab open
|
|
59
67
|
|
|
60
68
|
**Install globally via npm:**
|
|
69
|
+
|
|
61
70
|
```bash
|
|
62
71
|
npm install -g @vention/vention-cli
|
|
63
72
|
```
|
|
64
73
|
|
|
65
74
|
**Verify installation:**
|
|
75
|
+
|
|
66
76
|
```bash
|
|
67
77
|
vention --version
|
|
68
78
|
```
|
|
@@ -83,16 +93,21 @@ This tutorial shows the complete workflow from authentication to syncing your fi
|
|
|
83
93
|
Open your design in MachineBuilder and select the **MachineLogic tab**. This activates the design for CLI access.
|
|
84
94
|
|
|
85
95
|
**Step 2: Authenticate**
|
|
96
|
+
|
|
86
97
|
```bash
|
|
87
98
|
vention login
|
|
88
99
|
```
|
|
100
|
+
|
|
89
101
|
This opens a browser window for secure OAuth login.
|
|
90
102
|
|
|
91
103
|
**Step 3: Pull your app locally**
|
|
104
|
+
|
|
92
105
|
```bash
|
|
93
106
|
vention pull
|
|
94
107
|
```
|
|
108
|
+
|
|
95
109
|
The CLI will:
|
|
110
|
+
|
|
96
111
|
- Show available active designs
|
|
97
112
|
- Let you select a design
|
|
98
113
|
- Display MachineLogic Python apps in that design
|
|
@@ -103,9 +118,11 @@ The CLI will:
|
|
|
103
118
|
Open the created folder in your IDE and edit files like `main.py` or `project.json`.
|
|
104
119
|
|
|
105
120
|
**Step 5: Push changes back**
|
|
121
|
+
|
|
106
122
|
```bash
|
|
107
123
|
vention push
|
|
108
124
|
```
|
|
125
|
+
|
|
109
126
|
Your changes are now uploaded to MachineBuilder.
|
|
110
127
|
|
|
111
128
|
**Step 6: Run in MachineBuilder**
|
|
@@ -182,16 +199,19 @@ vention --verbose # Enable verbose output for debugging (use with any comm
|
|
|
182
199
|
**Description:** Authenticate with your Vention account using OAuth.
|
|
183
200
|
|
|
184
201
|
**Usage:**
|
|
202
|
+
|
|
185
203
|
```bash
|
|
186
204
|
vention login
|
|
187
205
|
```
|
|
188
206
|
|
|
189
207
|
**Behavior:**
|
|
208
|
+
|
|
190
209
|
- Opens a browser window for secure OAuth authentication
|
|
191
210
|
- Stores session tokens in `~/.vention-cli-config.json`
|
|
192
211
|
- Tokens persist across terminal sessions and are refreshed automatically
|
|
193
212
|
|
|
194
213
|
**Exit codes:**
|
|
214
|
+
|
|
195
215
|
- `0`: Authentication successful
|
|
196
216
|
- `1`: Authentication failed or cancelled
|
|
197
217
|
|
|
@@ -202,11 +222,13 @@ vention login
|
|
|
202
222
|
**Description:** Fetch a MachineLogic Python app from your active design into the current directory.
|
|
203
223
|
|
|
204
224
|
**Usage:**
|
|
225
|
+
|
|
205
226
|
```bash
|
|
206
227
|
vention pull
|
|
207
228
|
```
|
|
208
229
|
|
|
209
230
|
**Behavior:**
|
|
231
|
+
|
|
210
232
|
- If the directory is not linked: prompts for design and app selection, creates a new folder
|
|
211
233
|
- If the directory is already linked: updates files in place using stored link metadata
|
|
212
234
|
- Downloads all source files except ignored patterns
|
|
@@ -215,11 +237,13 @@ vention pull
|
|
|
215
237
|
- Updates `lastPulledAt` timestamp
|
|
216
238
|
|
|
217
239
|
**Prerequisites:**
|
|
240
|
+
|
|
218
241
|
- User must be logged in (`vention login`)
|
|
219
242
|
- Target design must have MachineLogic tab open in MachineBuilder
|
|
220
243
|
- Target app must be a MachineLogic Python app (code-free apps not supported)
|
|
221
244
|
|
|
222
245
|
**Exit codes:**
|
|
246
|
+
|
|
223
247
|
- `0`: Pull successful
|
|
224
248
|
- `1`: Not logged in, no active design found, or pull failed
|
|
225
249
|
|
|
@@ -230,11 +254,13 @@ vention pull
|
|
|
230
254
|
**Description:** Upload local changes from the linked directory to your active design.
|
|
231
255
|
|
|
232
256
|
**Usage:**
|
|
257
|
+
|
|
233
258
|
```bash
|
|
234
259
|
vention push
|
|
235
260
|
```
|
|
236
261
|
|
|
237
262
|
**Behavior:**
|
|
263
|
+
|
|
238
264
|
- If the directory is not linked: offers to link it to an application and continue the push
|
|
239
265
|
- Reads `.machine-code-app-directory-info.json` to identify target design/app
|
|
240
266
|
- Serializes all local files except ignored patterns
|
|
@@ -242,10 +268,12 @@ vention push
|
|
|
242
268
|
- Updates `lastPushedAt` timestamp
|
|
243
269
|
|
|
244
270
|
**Prerequisites:**
|
|
271
|
+
|
|
245
272
|
- User must be logged in
|
|
246
273
|
- The same design must be active in MachineBuilder (MachineLogic tab open)
|
|
247
274
|
|
|
248
275
|
**Exit codes:**
|
|
276
|
+
|
|
249
277
|
- `0`: Push successful, or push cancelled at the link prompt
|
|
250
278
|
- `1`: Not logged in, design not active, or push failed
|
|
251
279
|
|
|
@@ -256,11 +284,13 @@ vention push
|
|
|
256
284
|
**Description:** Link the current directory to a design + app without pulling files.
|
|
257
285
|
|
|
258
286
|
**Usage:**
|
|
287
|
+
|
|
259
288
|
```bash
|
|
260
289
|
vention link
|
|
261
290
|
```
|
|
262
291
|
|
|
263
292
|
**Behavior:**
|
|
293
|
+
|
|
264
294
|
- Prompts for design and app selection
|
|
265
295
|
- Writes `.machine-code-app-directory-info.json` with link metadata
|
|
266
296
|
- Does not download or modify existing files
|
|
@@ -268,6 +298,7 @@ vention link
|
|
|
268
298
|
**Use case:** Useful when you already have the app files and just want to establish the connection for push operations.
|
|
269
299
|
|
|
270
300
|
**Exit codes:**
|
|
301
|
+
|
|
271
302
|
- `0`: Link successful
|
|
272
303
|
- `1`: Not logged in, no active design found, or link failed
|
|
273
304
|
|
|
@@ -278,21 +309,25 @@ vention link
|
|
|
278
309
|
**Description:** Fetch application logs from the linked digital twin.
|
|
279
310
|
|
|
280
311
|
**Usage:**
|
|
312
|
+
|
|
281
313
|
```bash
|
|
282
314
|
vention logs
|
|
283
315
|
```
|
|
284
316
|
|
|
285
317
|
**Behavior:**
|
|
318
|
+
|
|
286
319
|
- Reads `.machine-code-app-directory-info.json` to identify the target design/app
|
|
287
320
|
- Fetches the application's logs from the digital twin
|
|
288
321
|
- Prints the logs to the terminal
|
|
289
322
|
|
|
290
323
|
**Prerequisites:**
|
|
324
|
+
|
|
291
325
|
- Directory must be linked (contains `.machine-code-app-directory-info.json`)
|
|
292
326
|
- User must be logged in
|
|
293
327
|
- The same design must be active in MachineBuilder (MachineLogic tab open)
|
|
294
328
|
|
|
295
329
|
**Exit codes:**
|
|
330
|
+
|
|
296
331
|
- `0`: Logs fetched successfully
|
|
297
332
|
- `1`: Not linked, not logged in, design not active, or fetch failed
|
|
298
333
|
|
|
@@ -303,6 +338,7 @@ vention logs
|
|
|
303
338
|
**Location:** `.machine-code-app-directory-info.json` (project root)
|
|
304
339
|
|
|
305
340
|
**Schema:**
|
|
341
|
+
|
|
306
342
|
```json
|
|
307
343
|
{
|
|
308
344
|
"appName": "My App",
|
|
@@ -316,6 +352,7 @@ vention logs
|
|
|
316
352
|
```
|
|
317
353
|
|
|
318
354
|
**Fields:**
|
|
355
|
+
|
|
319
356
|
- `appName` (string): Human-readable app name
|
|
320
357
|
- `designId` (number): Unique design identifier
|
|
321
358
|
- `applicationId` (string): Unique application identifier
|
|
@@ -331,22 +368,27 @@ vention logs
|
|
|
331
368
|
### Common Errors
|
|
332
369
|
|
|
333
370
|
**"Not logged in. Please run 'vention login' first."**
|
|
371
|
+
|
|
334
372
|
- **Cause:** Authentication tokens not found or expired
|
|
335
373
|
- **Solution:** Run `vention login` to re-authenticate
|
|
336
374
|
|
|
337
375
|
**"No active design found …" or "Please open the design and navigate to MachineLogic …"**
|
|
376
|
+
|
|
338
377
|
- **Cause:** No designs have the MachineLogic tab open in MachineBuilder
|
|
339
378
|
- **Solution:** Open your target design in MachineBuilder and click the MachineLogic tab to activate it
|
|
340
379
|
|
|
341
380
|
**"This directory is not linked …"**
|
|
381
|
+
|
|
342
382
|
- **Cause:** The directory doesn't have `.machine-code-app-directory-info.json`
|
|
343
383
|
- **Solution:** Run `vention link` or `vention pull` to establish the link. During `push`, the CLI will offer to link the directory and continue automatically.
|
|
344
384
|
|
|
345
385
|
**Push fails with authentication errors**
|
|
386
|
+
|
|
346
387
|
- **Cause:** Session tokens expired
|
|
347
388
|
- **Solution:** Run `vention login` to refresh authentication
|
|
348
389
|
|
|
349
390
|
**"Directory already exists" (during pull)**
|
|
391
|
+
|
|
350
392
|
- **Cause:** A folder with the app name already exists
|
|
351
393
|
- **Solution:** Either:
|
|
352
394
|
- `cd` into the existing directory and run `vention pull` (updates in place)
|
|
@@ -378,4 +420,3 @@ A: The last push/pull wins. There's no conflict resolution or merging. We recomm
|
|
|
378
420
|
|
|
379
421
|
**Q: Does this work with MachineMotion apps?**
|
|
380
422
|
A: The CLI specifically targets MachineLogic Python apps. For MachineMotion development, see the MachineMotion SDK documentation.
|
|
381
|
-
|