@kitelev/exocortex-cli 15.39.0 → 15.40.1

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.
Files changed (3) hide show
  1. package/README.md +114 -7
  2. package/dist/index.js +159 -152
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,6 +9,7 @@ Command-line interface for Exocortex knowledge management system. Manage tasks,
9
9
  This CLI follows [Semantic Versioning](https://semver.org/). The commands documented below are considered **stable** and covered by versioning guarantees.
10
10
 
11
11
  **Documentation:**
12
+
12
13
  - [CLI API Reference](docs/CLI_API_REFERENCE.md) - Formal command signatures and options
13
14
  - [Versioning Policy](VERSIONING.md) - What constitutes breaking changes
14
15
  - [SPARQL Guide](docs/SPARQL_GUIDE.md) - Complete query reference
@@ -16,6 +17,7 @@ This CLI follows [Semantic Versioning](https://semver.org/). The commands docume
16
17
  - [Ontology Reference](docs/ONTOLOGY_REFERENCE.md) - Available predicates
17
18
 
18
19
  **For MCP Integration:**
20
+
19
21
  - Pin to `^0.1.0` for stable API access
20
22
  - Use exit codes for status (not console messages)
21
23
  - Use `--format json` for machine-readable output
@@ -47,6 +49,7 @@ exocortex sparql query "SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 10" --vault ~/v
47
49
  ```
48
50
 
49
51
  **Options:**
52
+
50
53
  - `<query>` - SPARQL query string or path to .sparql file **[required]**
51
54
  - `--vault <path>` - Path to Obsidian vault (default: current directory)
52
55
  - `--format <type>` - Output format: `table` (default), `json`, `csv`
@@ -103,6 +106,79 @@ exocortex sparql query "SELECT ?task WHERE { ?task exo:Instance_class ems:Task }
103
106
  └────────────────────────────────────────────────────────────┘
104
107
  ```
105
108
 
109
+ ### Universal Asset Creation
110
+
111
+ Create any vault asset with a single command. Auto-generates UUID, timestamp, frontmatter, resolves class names, and validates wikilinks.
112
+
113
+ ```bash
114
+ # Create a permanent note
115
+ exocortex create --class ztlk__PermanentNote --label "My Note" --vault ~/vault
116
+
117
+ # With custom properties
118
+ exocortex create --class ztlk__PermanentNote \
119
+ --label "My Note" \
120
+ --property "ztlk__Note_developedFrom=[[uuid|Source Note]]" \
121
+ --vault ~/vault
122
+
123
+ # With body content
124
+ exocortex create --class ztlk__PermanentNote \
125
+ --label "My Note" \
126
+ --body "# Content\n\nBody text here." \
127
+ --vault ~/vault
128
+
129
+ # Body from file
130
+ exocortex create --class ztlk__PermanentNote \
131
+ --label "My Note" \
132
+ --body-file /tmp/content.md \
133
+ --vault ~/vault
134
+
135
+ # Body from stdin
136
+ echo "# Content" | exocortex create --class ztlk__PermanentNote \
137
+ --label "My Note" \
138
+ --body - \
139
+ --vault ~/vault
140
+
141
+ # Dry run (preview without writing)
142
+ exocortex create --class ztlk__PermanentNote --label "Test" --dry-run --vault ~/vault
143
+
144
+ # With aliases
145
+ exocortex create --class ztlk__PermanentNote \
146
+ --label "My Note" \
147
+ --aliases "Alias 1" "Alias 2" \
148
+ --vault ~/vault
149
+
150
+ # Skip wikilink validation
151
+ exocortex create --class ztlk__PermanentNote \
152
+ --label "My Note" \
153
+ --property "prop=[[uuid|Label]]" \
154
+ --skip-wikilink-validation \
155
+ --vault ~/vault
156
+ ```
157
+
158
+ **Options:**
159
+
160
+ - `--class <name>` - Class short name (e.g. `ztlk__PermanentNote`) or UUID **[required]**
161
+ - `--label <text>` - Human-readable label **[required]**
162
+ - `--vault <path>` - Path to Obsidian vault (default: current directory)
163
+ - `--aliases <names...>` - Additional aliases
164
+ - `--property <key=value>` - Property key-value pairs (repeatable)
165
+ - `--body <text>` - Markdown body content (use `-` for stdin)
166
+ - `--body-file <path>` - Read body from file
167
+ - `--dry-run` - Preview frontmatter without writing
168
+ - `--created-by <uuid>` - Creator UUID (default: ExoAssistant)
169
+ - `--timezone <tz>` - Timezone for timestamps (default: Asia/Almaty)
170
+ - `--skip-wikilink-validation` - Skip wikilink existence checks
171
+
172
+ **Output (JSON to stdout):**
173
+
174
+ ```json
175
+ {
176
+ "uuid": "generated-uuid",
177
+ "path": "01 Inbox/generated-uuid.md",
178
+ "label": "My Note"
179
+ }
180
+ ```
181
+
106
182
  ### Command Execution
107
183
 
108
184
  Execute plugin commands on single assets. All commands follow the pattern:
@@ -112,6 +188,7 @@ exocortex command <command-name> <filepath> [options]
112
188
  ```
113
189
 
114
190
  **Common Options:**
191
+
115
192
  - `--vault <path>` - Path to Obsidian vault (default: current directory)
116
193
  - `--dry-run` - Preview changes without modifying files
117
194
 
@@ -270,6 +347,7 @@ exocortex batch --file operations.json --vault ~/vault --format json
270
347
  ```
271
348
 
272
349
  **Batch Options:**
350
+
273
351
  - `--input <json>` - JSON array of operations to execute
274
352
  - `--file <path>` - Path to JSON file containing operations
275
353
  - `--atomic` - All-or-nothing execution (rollback on any failure)
@@ -278,11 +356,13 @@ exocortex batch --file operations.json --vault ~/vault --format json
278
356
  - `--vault <path>` - Path to Obsidian vault (default: current directory)
279
357
 
280
358
  **Operation Format:**
359
+
281
360
  ```json
282
361
  {
283
- "command": "start", // Command name (required)
284
- "filepath": "tasks/task.md", // File path (required)
285
- "options": { // Optional command parameters
362
+ "command": "start", // Command name (required)
363
+ "filepath": "tasks/task.md", // File path (required)
364
+ "options": {
365
+ // Optional command parameters
286
366
  "label": "New Label",
287
367
  "date": "2025-12-15"
288
368
  }
@@ -290,6 +370,7 @@ exocortex batch --file operations.json --vault ~/vault --format json
290
370
  ```
291
371
 
292
372
  **Supported Commands:**
373
+
293
374
  - `start` - Start task (ToDo → Doing)
294
375
  - `complete` - Complete task (Doing → Done)
295
376
  - `trash` - Trash task
@@ -302,11 +383,13 @@ exocortex batch --file operations.json --vault ~/vault --format json
302
383
  - `set-deadline` - Set deadline (requires `options.date`)
303
384
 
304
385
  **Performance Benefits:**
386
+
305
387
  - Single process execution (no repeated Node.js startup overhead)
306
388
  - Vault loaded once for all operations
307
389
  - Batch of 10 operations is ~10x faster than 10 separate CLI calls
308
390
 
309
391
  **MCP Integration Example:**
392
+
310
393
  ```json
311
394
  {
312
395
  "success": true,
@@ -316,9 +399,24 @@ exocortex batch --file operations.json --vault ~/vault --format json
316
399
  "succeeded": 3,
317
400
  "failed": 0,
318
401
  "results": [
319
- {"success": true, "command": "start", "filepath": "task1.md", "action": "Started task"},
320
- {"success": true, "command": "complete", "filepath": "task2.md", "action": "Completed task"},
321
- {"success": true, "command": "trash", "filepath": "task3.md", "action": "Trashed task"}
402
+ {
403
+ "success": true,
404
+ "command": "start",
405
+ "filepath": "task1.md",
406
+ "action": "Started task"
407
+ },
408
+ {
409
+ "success": true,
410
+ "command": "complete",
411
+ "filepath": "task2.md",
412
+ "action": "Completed task"
413
+ },
414
+ {
415
+ "success": true,
416
+ "command": "trash",
417
+ "filepath": "task3.md",
418
+ "action": "Trashed task"
419
+ }
322
420
  ],
323
421
  "durationMs": 45,
324
422
  "atomic": false
@@ -421,9 +519,11 @@ ems__Effort_status: "[[ems__EffortStatusDraft]]"
421
519
  ### Implemented Commands
422
520
 
423
521
  **SPARQL Query:**
522
+
424
523
  - `exocortex sparql query` - Execute SPARQL queries against vault
425
524
 
426
525
  **Status Transitions:**
526
+
427
527
  - `exocortex command start` - Start effort (ToDo → Doing)
428
528
  - `exocortex command complete` - Complete effort (Doing → Done)
429
529
  - `exocortex command trash` - Trash effort
@@ -432,19 +532,26 @@ ems__Effort_status: "[[ems__EffortStatusDraft]]"
432
532
  - `exocortex command move-to-analysis` - Move to Analysis
433
533
  - `exocortex command move-to-todo` - Move to ToDo
434
534
 
435
- **Asset Creation:**
535
+ **Universal Asset Creation:**
536
+
537
+ - `exocortex create` - Create any asset with auto UUID, frontmatter, and wikilink validation
538
+
539
+ **Asset Creation (legacy):**
540
+
436
541
  - `exocortex command create-task` - Create new task
437
542
  - `exocortex command create-meeting` - Create new meeting
438
543
  - `exocortex command create-project` - Create new project
439
544
  - `exocortex command create-area` - Create new area
440
545
 
441
546
  **Property Mutations:**
547
+
442
548
  - `exocortex command rename-to-uid` - Rename file to match UID
443
549
  - `exocortex command update-label` - Update asset label
444
550
  - `exocortex command schedule` - Set planned start date
445
551
  - `exocortex command set-deadline` - Set planned end date
446
552
 
447
553
  **Batch Operations:**
554
+
448
555
  - `exocortex batch` - Execute multiple operations in single invocation
449
556
 
450
557
  ### Planned Commands