@docyrus/docyrus 0.0.68 → 0.0.69

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.
@@ -0,0 +1,627 @@
1
+ # Docyrus CLI Manifest
2
+
3
+ LLM-ready reference for the `docyrus` CLI tool.
4
+
5
+ ---
6
+
7
+ ## Global Options
8
+
9
+ | Flag | Type | Description |
10
+ |------|------|-------------|
11
+ | `-g`, `--global` | boolean | Force global `~/.docyrus/` settings instead of local `./.docyrus/` |
12
+ | `--format <toon\|json\|yaml\|md\|jsonl>` | string | Output format |
13
+ | `--help` | boolean | Show help |
14
+ | `--llms` | boolean | Print LLM-readable manifest |
15
+ | `--mcp` | boolean | Start as MCP stdio server |
16
+ | `--verbose` | boolean | Show full output envelope |
17
+ | `--version` | boolean | Show version |
18
+
19
+ ## Environment Variables
20
+
21
+ | Name | Description |
22
+ |------|-------------|
23
+ | `DOCYRUS_API_CLIENT_ID` | Default Docyrus OAuth2 client id |
24
+
25
+ ## Settings Scope
26
+
27
+ - Default scope is local: `./.docyrus/`
28
+ - Use `-g` or `--global` to force global scope: `~/.docyrus/`
29
+ - OpenAPI cache path is `<settings-root>/tenans/<tenantId>/openapi.json`
30
+ - `docyrus` without a subcommand returns active environment, help commands, and auth `context`
31
+
32
+ ---
33
+
34
+ ## docyrus env
35
+
36
+ Environment commands.
37
+
38
+ ### docyrus env list
39
+
40
+ List available environments.
41
+
42
+ ### docyrus env use
43
+
44
+ Switch active environment by id or name.
45
+
46
+ ```
47
+ docyrus env use <selector>
48
+ ```
49
+
50
+ | Argument | Type | Required | Description |
51
+ |----------|------|----------|-------------|
52
+ | `selector` | string | yes | Environment id or name (`live`, `prod`, `beta`, `alpha`, `dev`) |
53
+
54
+ Built-in environments:
55
+ - `live` -> `https://api.docyrus.com`
56
+ - `beta` -> `https://beta-api.docyrus.com`
57
+ - `alpha` -> `https://alpha-api.docyrus.com`
58
+ - `dev` -> `https://localhost:3366`
59
+
60
+ ---
61
+
62
+ ## docyrus apps
63
+
64
+ App commands.
65
+
66
+ ### docyrus apps list
67
+
68
+ List apps (`/v1/apps`).
69
+
70
+ | Flag | Type | Description |
71
+ |------|------|-------------|
72
+ | `--appType` | string | Optional app type filter |
73
+
74
+ ---
75
+
76
+ ## docyrus auth
77
+
78
+ Authentication commands.
79
+
80
+ ### docyrus auth login
81
+
82
+ Authorize CLI using OAuth2 device flow, or provide tokens manually.
83
+
84
+ | Flag | Type | Description |
85
+ |------|------|-------------|
86
+ | `--clientId` | string | OAuth2 client id |
87
+ | `--scope` | string | OAuth2 scopes (default: `openid email profile offline_access ReadWrite.All User.ReadWrite Users.Read.All Tenant.Read Teams.Read.All DS.ReadWrite.All Docs.ReadWrite.All Architect.ReadWrite.All`) |
88
+ | `--accessToken` | string | Manual access token; skips device flow |
89
+ | `--refreshToken` | string | Manual refresh token; requires `--accessToken` |
90
+
91
+ Login notes:
92
+ - Resolution order for client ID is `--clientId` -> `DOCYRUS_API_CLIENT_ID` -> saved local config -> saved global config
93
+ - Manual token login falls back to `manual-token` only when no client ID can be resolved
94
+ - Local login can reuse the globally saved client ID when local config does not have one
95
+
96
+ ### docyrus auth logout
97
+
98
+ Revoke and clear all tenant sessions for the active account in the current environment.
99
+
100
+ ### docyrus auth who
101
+
102
+ Return the current authenticated user (`/v1/users/me`).
103
+
104
+ ### docyrus auth accounts list
105
+
106
+ List saved user accounts for the current API base URL.
107
+
108
+ ### docyrus auth accounts use
109
+
110
+ Switch active account by user ID.
111
+
112
+ | Flag | Type | Description |
113
+ |------|------|-------------|
114
+ | `--userId` | string | User ID to activate |
115
+
116
+ ### docyrus auth tenants list
117
+
118
+ List available tenants for an account.
119
+
120
+ | Flag | Type | Description |
121
+ |------|------|-------------|
122
+ | `--userId` | string | User ID; defaults to active account |
123
+
124
+ ### docyrus auth tenants use
125
+
126
+ Switch active tenant for an account.
127
+
128
+ ```
129
+ docyrus auth tenants use <tenantSelector> [options]
130
+ ```
131
+
132
+ | Argument | Type | Required | Description |
133
+ |----------|------|----------|-------------|
134
+ | `tenantSelector` | string | yes | Numeric tenant no or UUID tenant id |
135
+
136
+ | Flag | Type | Description |
137
+ |------|------|-------------|
138
+ | `--userId` | string | User ID; defaults to active account |
139
+ | `--scope` | string | Scope used only when tenant bootstrap login is required |
140
+
141
+ Selector rules:
142
+ - numeric selector -> match by `tenantNo`
143
+ - non-numeric selector must be a UUID tenant id
144
+
145
+ ---
146
+
147
+ ## docyrus curl
148
+
149
+ Send arbitrary requests to Docyrus API.
150
+
151
+ ```
152
+ docyrus curl <path> [options]
153
+ ```
154
+
155
+ | Argument | Type | Required | Description |
156
+ |----------|------|----------|-------------|
157
+ | `path` | string | yes | API path (no absolute URL) |
158
+
159
+ | Flag | Alias | Type | Description |
160
+ |------|-------|------|-------------|
161
+ | `--request` | `-X` | string | HTTP method |
162
+ | `--header` | `-H` | array | Request header (repeatable) |
163
+ | `--data` | `-d` | string | Request payload |
164
+ | `--get` | `-G` | boolean | Send data as query string |
165
+ | `--include` | `-i` | boolean | Include status and response headers |
166
+ | `--noAuth` | | boolean | Skip Authorization header |
167
+
168
+ ---
169
+
170
+ ## docyrus discover
171
+
172
+ Discovery commands for exploring the tenant OpenAPI spec. All discover commands require an active login session. Commands other than `discover api` auto-download the spec if it does not exist locally.
173
+
174
+ ### docyrus discover api
175
+
176
+ Download tenant OpenAPI spec for the active tenant.
177
+
178
+ ### docyrus discover namespaces
179
+
180
+ List API namespaces from the active tenant OpenAPI spec. Returns deduplicated namespace prefixes such as `/v1/users` and `/v1/apps`.
181
+
182
+ ### docyrus discover path
183
+
184
+ List endpoints with method and description for a matching path prefix.
185
+
186
+ ```
187
+ docyrus discover path <prefix>
188
+ ```
189
+
190
+ | Argument | Type | Required | Description |
191
+ |----------|------|----------|-------------|
192
+ | `prefix` | string | yes | Path prefix, for example `/v1/users` (the `/v1` prefix is optional) |
193
+
194
+ ### docyrus discover endpoint
195
+
196
+ Return the full OpenAPI endpoint object for a path and HTTP method.
197
+
198
+ ```
199
+ docyrus discover endpoint <selector>
200
+ ```
201
+
202
+ | Argument | Type | Required | Description |
203
+ |----------|------|----------|-------------|
204
+ | `selector` | string | yes | Endpoint selector such as `/v1/users/me` or `[PUT]/v1/users/me/photo` |
205
+
206
+ Selector format: `/path` defaults to GET; `[METHOD]/path` specifies an explicit HTTP method. The `/v1` prefix is optional.
207
+
208
+ ### docyrus discover entity
209
+
210
+ Return the full schema definition object for an entity by name.
211
+
212
+ ```
213
+ docyrus discover entity <name>
214
+ ```
215
+
216
+ | Argument | Type | Required | Description |
217
+ |----------|------|----------|-------------|
218
+ | `name` | string | yes | Entity name (case-sensitive), for example `UserEntity` |
219
+
220
+ ### docyrus discover search
221
+
222
+ Search endpoint paths and entity names by comma-separated terms.
223
+
224
+ ```
225
+ docyrus discover search <query>
226
+ ```
227
+
228
+ | Argument | Type | Required | Description |
229
+ |----------|------|----------|-------------|
230
+ | `query` | string | yes | One or more comma-separated search strings, for example `users,UserEntity` |
231
+
232
+ Endpoint results include method and description when available.
233
+
234
+ ---
235
+
236
+ ## docyrus connect
237
+
238
+ Connector and action commands. Interact with external integration connectors and run actions.
239
+
240
+ ### docyrus connect list-connectors
241
+
242
+ List available integration connectors.
243
+
244
+ | Flag | Type | Description |
245
+ |------|------|-------------|
246
+ | `--q` | string | Keyword search on name, slug, or description |
247
+ | `--limit` | number | Max results (default: 100) |
248
+ | `--offset` | number | Result offset (default: 0) |
249
+
250
+ ### docyrus connect get-connector
251
+
252
+ Get connector details with data sources and actions.
253
+
254
+ ```
255
+ docyrus connect get-connector <slug>
256
+ ```
257
+
258
+ | Argument | Type | Required | Description |
259
+ |----------|------|----------|-------------|
260
+ | `slug` | string | yes | Data provider slug (e.g. `msgraph`) |
261
+
262
+ ### docyrus connect get-action
263
+
264
+ Get connector action details including input/output schemas.
265
+
266
+ ```
267
+ docyrus connect get-action <slug> <actionKey>
268
+ ```
269
+
270
+ | Argument | Type | Required | Description |
271
+ |----------|------|----------|-------------|
272
+ | `slug` | string | yes | Data provider slug (e.g. `msgraph`) |
273
+ | `actionKey` | string | yes | Action key (e.g. `sendEmailWithOutlook`) |
274
+
275
+ ### docyrus connect list-connections
276
+
277
+ Get tenant and user connections for a connector.
278
+
279
+ ```
280
+ docyrus connect list-connections <slug>
281
+ ```
282
+
283
+ | Argument | Type | Required | Description |
284
+ |----------|------|----------|-------------|
285
+ | `slug` | string | yes | Data provider slug (e.g. `msgraph`) |
286
+
287
+ ### docyrus connect curl
288
+
289
+ Send an HTTP request through a connector's provider auth.
290
+
291
+ ```
292
+ docyrus connect curl <slug> <endpoint> [options]
293
+ ```
294
+
295
+ | Argument | Type | Required | Description |
296
+ |----------|------|----------|-------------|
297
+ | `slug` | string | yes | Data provider slug (e.g. `msgraph`, `meta`) |
298
+ | `endpoint` | string | yes | Relative endpoint path or absolute URL |
299
+
300
+ | Flag | Alias | Type | Description |
301
+ |------|-------|------|-------------|
302
+ | `--method` | `-X` | string | HTTP method (default: `GET`) |
303
+ | `--data` | `-d` | string | JSON request payload |
304
+ | `--contentType` | | string | Content-Type header (defaults to `application/json`) |
305
+ | `--headers` | | string | JSON object of additional headers |
306
+ | `--connectionId` | `-c` | string | Tenant connection ID override |
307
+ | `--connectionAccountId` | | string | Connection account ID |
308
+
309
+ ### docyrus connect run-action
310
+
311
+ Run a connector or app action.
312
+
313
+ ```
314
+ docyrus connect run-action <appSlug> <actionKey> [options]
315
+ ```
316
+
317
+ | Argument | Type | Required | Description |
318
+ |----------|------|----------|-------------|
319
+ | `appSlug` | string | yes | App slug (e.g. `base`, or a custom app slug) |
320
+ | `actionKey` | string | yes | Action key (e.g. `sendEmailWithOutlook`) |
321
+
322
+ | Flag | Alias | Type | Description |
323
+ |------|-------|------|-------------|
324
+ | `--params` | `-p` | string | JSON object with action input parameters |
325
+ | `--connectionId` | `-c` | string | Tenant connection ID override |
326
+ | `--connectionAccountId` | | string | Tenant connection account ID |
327
+ | `--dryRun` | `-n` | boolean | Preview the request without executing |
328
+
329
+ ---
330
+
331
+ ## docyrus ds
332
+
333
+ Data source commands for CRUD operations on records.
334
+
335
+ ### docyrus ds get
336
+
337
+ Get data source metadata (fields, types, relations).
338
+
339
+ ```
340
+ docyrus ds get <appSlug> <dataSourceSlug>
341
+ ```
342
+
343
+ ### docyrus ds list
344
+
345
+ List data source items with optional filtering, sorting, and pagination.
346
+
347
+ ```
348
+ docyrus ds list <appSlug> <dataSourceSlug> [options]
349
+ ```
350
+
351
+ | Flag | Type | Description |
352
+ |------|------|-------------|
353
+ | `--columns` | string | Comma-separated field slugs to select |
354
+ | `--filters` | string | JSON filter object |
355
+ | `--limit` | number | Max records to return |
356
+ | `--offset` | number | Skip N records |
357
+ | `--orderBy` | string | Sort expression |
358
+ | `--fullCount` | boolean | Include total count in response |
359
+
360
+ ### docyrus ds create
361
+
362
+ Create data source item(s). If payload is an array, CLI sends a bulk request to `POST /apps/:appSlug/data-sources/:dataSourceSlug/items/bulk`.
363
+
364
+ ```
365
+ docyrus ds create <appSlug> <dataSourceSlug> [options]
366
+ ```
367
+
368
+ | Flag | Type | Description |
369
+ |------|------|-------------|
370
+ | `--data` | string | JSON payload for record fields |
371
+ | `--from-file` | string | Path to `.json` or `.csv` payload file |
372
+
373
+ Batch rules:
374
+ - array payload triggers bulk create endpoint
375
+ - maximum 50 items per batch
376
+
377
+ ### docyrus ds update
378
+
379
+ Update data source item(s). If payload is an array, CLI sends a bulk request to `PATCH /apps/:appSlug/data-sources/:dataSourceSlug/items/bulk`.
380
+
381
+ ```
382
+ docyrus ds update <appSlug> <dataSourceSlug> [recordId] [options]
383
+ ```
384
+
385
+ | Flag | Type | Description |
386
+ |------|------|-------------|
387
+ | `--data` | string | JSON payload for record fields |
388
+ | `--from-file` | string | Path to `.json` or `.csv` payload file |
389
+
390
+ Update rules:
391
+ - object payload uses the single-item endpoint and requires `recordId`
392
+ - array payload uses the bulk update endpoint and requires `id` in each item
393
+ - do not provide positional `recordId` for batch update
394
+ - maximum 50 items per batch
395
+
396
+ ### docyrus ds delete
397
+
398
+ Delete a data source item.
399
+
400
+ ```
401
+ docyrus ds delete <appSlug> <dataSourceSlug> <recordId>
402
+ ```
403
+
404
+ Successful command responses include a top-level `context` object with:
405
+ - `email`
406
+ - `tenantName`
407
+ - `tenantNo`
408
+ - `tenantDisplay`
409
+
410
+ ---
411
+
412
+ ## docyrus studio
413
+
414
+ Dev app data source schema CRUD commands under `/v1/dev/apps/:app_id/data-sources`.
415
+
416
+ Selector rules:
417
+ - app selector: exactly one of `--appId` or `--appSlug`
418
+ - data source selector: exactly one of `--dataSourceId` or `--dataSourceSlug` when required
419
+ - field selector: exactly one of `--fieldId` or `--fieldSlug` when required
420
+
421
+ Write payload rules:
422
+ - use `--data '<json>'` or `--from-file ./payload.json` (JSON only), not both
423
+ - flags override conflicting keys from JSON payload
424
+ - batch commands accept either a root array or a root object containing the expected DTO key
425
+
426
+ ### Data source commands
427
+
428
+ #### docyrus studio list-data-sources
429
+
430
+ `GET /dev/apps/:app_id/data-sources`
431
+
432
+ | Flag | Type | Description |
433
+ |------|------|-------------|
434
+ | `--appId` | string | App ID |
435
+ | `--appSlug` | string | App slug |
436
+ | `--expand` | string | Optional comma-separated expansions such as `fields` |
437
+
438
+ #### docyrus studio get-data-source
439
+
440
+ `GET /dev/apps/:app_id/data-sources/:id`
441
+
442
+ | Flag | Type | Description |
443
+ |------|------|-------------|
444
+ | `--appId` | string | App ID |
445
+ | `--appSlug` | string | App slug |
446
+ | `--dataSourceId` | string | Data source ID |
447
+ | `--dataSourceSlug` | string | Data source slug |
448
+
449
+ #### docyrus studio create-data-source
450
+
451
+ `POST /dev/apps/:app_id/data-sources`
452
+
453
+ | Flag | Type | Description |
454
+ |------|------|-------------|
455
+ | `--appId` | string | App ID |
456
+ | `--appSlug` | string | App slug |
457
+ | `--data` | string | JSON payload |
458
+ | `--from-file` | string | Path to JSON payload file |
459
+ | `--title` | string | Data source title |
460
+ | `--name` | string | Data source name |
461
+ | `--slug` | string | Data source slug |
462
+ | `--type` | string | Data source type |
463
+ | `--icon` | string | Icon |
464
+ | `--dataSharing` | string | Data sharing value |
465
+ | `--meta` | string | JSON meta payload |
466
+
467
+ #### docyrus studio update-data-source
468
+
469
+ `PATCH /dev/apps/:app_id/data-sources/:id`
470
+
471
+ Same flags as `create-data-source`, plus selector flags:
472
+
473
+ | Flag | Type | Description |
474
+ |------|------|-------------|
475
+ | `--dataSourceId` | string | Data source ID |
476
+ | `--dataSourceSlug` | string | Data source slug |
477
+
478
+ #### docyrus studio delete-data-source
479
+
480
+ `DELETE /dev/apps/:app_id/data-sources/:id`
481
+
482
+ | Flag | Type | Description |
483
+ |------|------|-------------|
484
+ | `--appId` | string | App ID |
485
+ | `--appSlug` | string | App slug |
486
+ | `--dataSourceId` | string | Data source ID |
487
+ | `--dataSourceSlug` | string | Data source slug |
488
+
489
+ #### docyrus studio bulk-create-data-sources
490
+
491
+ `POST /dev/apps/:app_id/data-sources/bulk`
492
+
493
+ Expected DTO key: `dataSources`
494
+
495
+ | Flag | Type | Description |
496
+ |------|------|-------------|
497
+ | `--appId` | string | App ID |
498
+ | `--appSlug` | string | App slug |
499
+ | `--data` | string | JSON payload |
500
+ | `--from-file` | string | Path to JSON payload file |
501
+
502
+ ### Field commands
503
+
504
+ #### docyrus studio list-fields
505
+
506
+ `GET /dev/apps/:app_id/data-sources/:data_source_id/fields`
507
+
508
+ | Flag | Type | Description |
509
+ |------|------|-------------|
510
+ | `--appId` | string | App ID |
511
+ | `--appSlug` | string | App slug |
512
+ | `--dataSourceId` | string | Data source ID |
513
+ | `--dataSourceSlug` | string | Data source slug |
514
+
515
+ #### docyrus studio get-field
516
+
517
+ `GET /dev/apps/:app_id/data-sources/:data_source_id/fields/:field_id`
518
+
519
+ | Flag | Type | Description |
520
+ |------|------|-------------|
521
+ | `--appId` | string | App ID |
522
+ | `--appSlug` | string | App slug |
523
+ | `--dataSourceId` | string | Data source ID |
524
+ | `--dataSourceSlug` | string | Data source slug |
525
+ | `--fieldId` | string | Field ID |
526
+ | `--fieldSlug` | string | Field slug |
527
+
528
+ #### docyrus studio create-field
529
+
530
+ `POST /dev/apps/:app_id/data-sources/:data_source_id/fields`
531
+
532
+ | Flag | Type | Description |
533
+ |------|------|-------------|
534
+ | `--appId` | string | App ID |
535
+ | `--appSlug` | string | App slug |
536
+ | `--dataSourceId` | string | Data source ID |
537
+ | `--dataSourceSlug` | string | Data source slug |
538
+ | `--data` | string | JSON payload |
539
+ | `--from-file` | string | Path to JSON payload file |
540
+ | `--name` | string | Field name |
541
+ | `--slug` | string | Field slug |
542
+ | `--type` | string | Field type |
543
+ | `--readOnly` | boolean | Read-only flag |
544
+ | `--status` | string | Field status |
545
+ | `--defaultValue` | string | Default value |
546
+ | `--relationDataSourceId` | string | Related data source ID |
547
+ | `--sortOrder` | number | Sort order |
548
+ | `--tenantEnumSetId` | string | Tenant enum set ID |
549
+ | `--options` | string | JSON options payload |
550
+ | `--validations` | string | JSON validations payload |
551
+
552
+ #### docyrus studio update-field
553
+
554
+ `PATCH /dev/apps/:app_id/data-sources/:data_source_id/fields/:field_id`
555
+
556
+ Same flags as `create-field`, plus selector flags:
557
+
558
+ | Flag | Type | Description |
559
+ |------|------|-------------|
560
+ | `--fieldId` | string | Field ID |
561
+ | `--fieldSlug` | string | Field slug |
562
+
563
+ #### docyrus studio delete-field
564
+
565
+ `DELETE /dev/apps/:app_id/data-sources/:data_source_id/fields/:field_id`
566
+
567
+ | Flag | Type | Description |
568
+ |------|------|-------------|
569
+ | `--appId` | string | App ID |
570
+ | `--appSlug` | string | App slug |
571
+ | `--dataSourceId` | string | Data source ID |
572
+ | `--dataSourceSlug` | string | Data source slug |
573
+ | `--fieldId` | string | Field ID |
574
+ | `--fieldSlug` | string | Field slug |
575
+
576
+ #### docyrus studio create-fields-batch
577
+
578
+ `POST /dev/apps/:app_id/data-sources/:data_source_id/fields/batch`
579
+
580
+ Expected DTO key: `fields`
581
+
582
+ #### docyrus studio update-fields-batch
583
+
584
+ `PATCH /dev/apps/:app_id/data-sources/:data_source_id/fields/batch`
585
+
586
+ Expected DTO key: `fields`
587
+
588
+ #### docyrus studio delete-fields-batch
589
+
590
+ `DELETE /dev/apps/:app_id/data-sources/:data_source_id/fields/batch`
591
+
592
+ Expected DTO key: `fieldIds`
593
+
594
+ ### Enum commands
595
+
596
+ #### docyrus studio list-enums
597
+
598
+ `GET /dev/apps/:app_id/data-sources/:data_source_id/fields/:field_id/enums`
599
+
600
+ #### docyrus studio create-enums
601
+
602
+ `POST /dev/apps/:app_id/data-sources/:data_source_id/fields/:field_id/enums`
603
+
604
+ Expected DTO key: `enums`
605
+
606
+ #### docyrus studio update-enums
607
+
608
+ `PATCH /dev/apps/:app_id/data-sources/:data_source_id/fields/:field_id/enums`
609
+
610
+ Expected DTO key: `enums`
611
+
612
+ #### docyrus studio delete-enums
613
+
614
+ `DELETE /dev/apps/:app_id/data-sources/:data_source_id/fields/:field_id/enums`
615
+
616
+ Expected DTO key: `enumIds`
617
+
618
+ ---
619
+
620
+ ## docyrus tui
621
+
622
+ Launch the OpenTUI terminal UI.
623
+
624
+ Notes:
625
+ - requires Bun installed locally
626
+ - reuses the existing CLI command graph
627
+ - intended for interactive terminal usage rather than browser embedding