@dinoxx/dinox-cli 1.0.18 → 1.0.19
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 +72 -34
- package/dist/cli.js +15 -1
- package/dist/commands/auth/index.d.ts +2 -0
- package/dist/commands/auth/index.js +209 -163
- package/dist/commands/boxes/index.d.ts +2 -0
- package/dist/commands/boxes/index.js +119 -75
- package/dist/commands/boxes/repo.d.ts +8 -0
- package/dist/commands/boxes/repo.js +41 -0
- package/dist/commands/config/index.d.ts +2 -0
- package/dist/commands/config/index.js +85 -36
- package/dist/commands/descriptor/register.d.ts +8 -0
- package/dist/commands/descriptor/register.js +113 -0
- package/dist/commands/descriptor/types.d.ts +37 -0
- package/dist/commands/descriptor/types.js +17 -0
- package/dist/commands/graph/index.d.ts +2 -0
- package/dist/commands/graph/index.js +143 -73
- package/dist/commands/info/index.d.ts +2 -0
- package/dist/commands/info/index.js +41 -14
- package/dist/commands/mcp/index.js +11 -10
- package/dist/commands/mcp/server.js +6 -3
- package/dist/commands/mcp/tools.js +30 -104
- package/dist/commands/mcp/types.d.ts +8 -1
- package/dist/commands/meta/index.d.ts +2 -0
- package/dist/commands/meta/index.js +64 -33
- package/dist/commands/meta/repo.d.ts +6 -0
- package/dist/commands/meta/repo.js +6 -0
- package/dist/commands/notes/actions.d.ts +10 -0
- package/dist/commands/notes/actions.js +403 -0
- package/dist/commands/notes/descriptors.d.ts +4 -0
- package/dist/commands/notes/descriptors.js +250 -0
- package/dist/commands/notes/dryRun.d.ts +31 -0
- package/dist/commands/notes/dryRun.js +130 -0
- package/dist/commands/notes/index.d.ts +2 -51
- package/dist/commands/notes/index.js +2 -581
- package/dist/commands/notes/repo.d.ts +9 -0
- package/dist/commands/notes/repo.js +56 -10
- package/dist/commands/notes/runtime.d.ts +28 -0
- package/dist/commands/notes/runtime.js +185 -0
- package/dist/commands/notes/searchOutput.d.ts +10 -2
- package/dist/commands/notes/searchOutput.js +14 -2
- package/dist/commands/notes/searchResponse.d.ts +51 -0
- package/dist/commands/notes/searchResponse.js +56 -0
- package/dist/commands/notes/searchSql.js +2 -0
- package/dist/commands/prompt/index.d.ts +2 -0
- package/dist/commands/prompt/index.js +122 -72
- package/dist/commands/prompt/repo.d.ts +7 -0
- package/dist/commands/prompt/repo.js +46 -0
- package/dist/commands/schema/commandMetadata.d.ts +2 -0
- package/dist/commands/schema/commandMetadata.js +18 -0
- package/dist/commands/schema/globalOptions.d.ts +3 -0
- package/dist/commands/schema/globalOptions.js +3 -0
- package/dist/commands/schema/index.d.ts +4 -0
- package/dist/commands/schema/index.js +109 -0
- package/dist/commands/schema/renderSkills.d.ts +6 -0
- package/dist/commands/schema/renderSkills.js +216 -0
- package/dist/commands/schema/spec.d.ts +6 -0
- package/dist/commands/schema/spec.js +40 -0
- package/dist/commands/schema/types.d.ts +47 -0
- package/dist/commands/schema/types.js +1 -0
- package/dist/commands/storage/index.d.ts +4 -0
- package/dist/commands/storage/index.js +292 -0
- package/dist/commands/storage/repo.d.ts +162 -0
- package/dist/commands/storage/repo.js +751 -0
- package/dist/commands/sync.d.ts +2 -0
- package/dist/commands/sync.js +41 -27
- package/dist/commands/tags/index.d.ts +2 -0
- package/dist/commands/tags/index.js +121 -79
- package/dist/commands/tags/repo.d.ts +7 -0
- package/dist/commands/tags/repo.js +52 -0
- package/dist/commands/todo/dryRun.d.ts +23 -0
- package/dist/commands/todo/dryRun.js +133 -0
- package/dist/commands/todo/index.d.ts +2 -0
- package/dist/commands/todo/index.js +285 -135
- package/dist/commands/todo/repo.d.ts +11 -0
- package/dist/commands/todo/repo.js +37 -9
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.js +35 -13
- package/dist/commands/writeDryRun.d.ts +62 -0
- package/dist/commands/writeDryRun.js +131 -0
- package/dist/constants/links.d.ts +1 -1
- package/dist/constants/links.js +1 -1
- package/dist/daemon/ensure.js +3 -2
- package/dist/daemon/index.js +17 -15
- package/dist/dinox.js +9 -13
- package/dist/powersync/schema/index.d.ts +27 -0
- package/dist/powersync/schema/index.js +2 -0
- package/dist/powersync/schema/note.d.ts +1 -0
- package/dist/powersync/schema/note.js +1 -0
- package/dist/powersync/schema/projects.d.ts +3 -0
- package/dist/powersync/schema/projects.js +3 -0
- package/dist/powersync/schema/storage.d.ts +24 -0
- package/dist/powersync/schema/storage.js +24 -0
- package/dist/skills/check.d.ts +6 -0
- package/dist/skills/check.js +254 -0
- package/dist/utils/bidlinkCanonicalization.d.ts +2 -0
- package/dist/utils/bidlinkCanonicalization.js +161 -0
- package/dist/utils/dryRun.d.ts +13 -0
- package/dist/utils/dryRun.js +69 -0
- package/dist/utils/output.d.ts +19 -0
- package/dist/utils/output.js +155 -1
- package/dist/utils/terminalSanitization.d.ts +2 -0
- package/dist/utils/terminalSanitization.js +33 -0
- package/dist/utils/tiptapMarkdown.d.ts +4 -1
- package/dist/utils/tiptapMarkdown.js +285 -113
- package/dist/utils/tiptapMarkdownSchema.d.ts +37 -0
- package/dist/utils/tiptapMarkdownSchema.js +577 -0
- package/dist/utils/tiptapMarkdownSchemaUtils.d.ts +74 -0
- package/dist/utils/tiptapMarkdownSchemaUtils.js +394 -0
- package/dist/utils/updateNotice.d.ts +7 -0
- package/dist/utils/updateNotice.js +64 -0
- package/package.json +25 -3
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ dino auth status
|
|
|
116
116
|
dino note search "AI"
|
|
117
117
|
dino note search "AI" --days 7
|
|
118
118
|
dino note search "AI" --from 2026-02-01 --to 2026-02-28
|
|
119
|
-
dino note search "AI" --
|
|
119
|
+
dino note search "AI" --boxes "Inbox"
|
|
120
120
|
dino note search --sql 'type = "crawl" AND zettel_boxes IN ("Inbox","Project")'
|
|
121
121
|
```
|
|
122
122
|
|
|
@@ -209,7 +209,7 @@ dino box add --name "Inbox" --description "用于存放待整理的想法和资
|
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
211
|
dino prompt list
|
|
212
|
-
dino prompt add --name "周报助手" --
|
|
212
|
+
dino prompt add --name "周报助手" --prompt "请基于本周笔记输出一份简洁周报"
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
## 5.5 配置
|
|
@@ -304,11 +304,12 @@ dino box add "你的卡片盒"
|
|
|
304
304
|
|
|
305
305
|
## 8.1 全局参数(适用于 CLI)
|
|
306
306
|
|
|
307
|
-
以下参数可放在命令前后使用,例如:`dino --json auth status`。
|
|
307
|
+
以下参数可放在命令前后使用,例如:`dino --format json auth status`。
|
|
308
308
|
|
|
309
309
|
| 参数 | 类型 | 说明 |
|
|
310
310
|
| --- | --- | --- |
|
|
311
|
-
| `--json` | flag |
|
|
311
|
+
| `--json` | flag | 兼容旧行为,输出 machine-readable YAML(历史保留写法)。 |
|
|
312
|
+
| `--format <yaml\|json>` | string | 结构化输出格式。推荐 AI / 脚本使用 `--format json`。 |
|
|
312
313
|
| `--offline` | flag | 跳过 connect/sync,仅用本地缓存(仅被支持该参数的命令读取)。 |
|
|
313
314
|
| `--sync-timeout <ms>` | integer | 覆盖连接/同步超时毫秒,必须是正整数。 |
|
|
314
315
|
| `--verbose` | flag | 预留 verbose 开关。 |
|
|
@@ -323,7 +324,7 @@ dino box add "你的卡片盒"
|
|
|
323
324
|
| --- | --- | --- |
|
|
324
325
|
| `<token>` | 是 | 登录 token,直接传 token 字符串(不需要 `Bearer` 前缀)。 |
|
|
325
326
|
|
|
326
|
-
支持全局参数:`--json`、`--sync-timeout`
|
|
327
|
+
支持全局参数:`--json`、`--format`、`--sync-timeout`
|
|
327
328
|
|
|
328
329
|
### `dino auth logout`
|
|
329
330
|
|
|
@@ -337,7 +338,7 @@ dino box add "你的卡片盒"
|
|
|
337
338
|
|
|
338
339
|
查看当前登录与同步状态。
|
|
339
340
|
|
|
340
|
-
支持全局参数:`--json`、`--offline`、`--sync-timeout`
|
|
341
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
341
342
|
|
|
342
343
|
## 8.3 `sync` 命令
|
|
343
344
|
|
|
@@ -345,9 +346,29 @@ dino box add "你的卡片盒"
|
|
|
345
346
|
|
|
346
347
|
连接并执行同步。
|
|
347
348
|
|
|
348
|
-
支持全局参数:`--json`、`--sync-timeout`
|
|
349
|
+
支持全局参数:`--json`、`--format`、`--sync-timeout`
|
|
349
350
|
|
|
350
|
-
## 8.4 `
|
|
351
|
+
## 8.4 `schema` 命令
|
|
352
|
+
|
|
353
|
+
### `dino schema [path]`
|
|
354
|
+
|
|
355
|
+
查看命令 schema,了解参数、风险级别、输出结构与示例。推荐 AI / 脚本在不确定调用方式时先查看。
|
|
356
|
+
|
|
357
|
+
| 参数 | 必填 | 说明 |
|
|
358
|
+
| --- | --- | --- |
|
|
359
|
+
| `[path]` | 否 | 命令路径,例如 `note.search`、`todo.update`、`sync`。不传则列出所有可用 schema。 |
|
|
360
|
+
|
|
361
|
+
支持全局参数:`--json`、`--format`
|
|
362
|
+
|
|
363
|
+
示例:
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
dino schema
|
|
367
|
+
dino schema note.search
|
|
368
|
+
dino schema note.search --format json
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
## 8.5 `note` 命令
|
|
351
372
|
|
|
352
373
|
### `dino note search [query]`
|
|
353
374
|
|
|
@@ -363,11 +384,11 @@ dino box add "你的卡片盒"
|
|
|
363
384
|
| `--from <date>` | 否 | 创建时间起点,支持 `YYYY-MM-DD` 或 ISO datetime。 |
|
|
364
385
|
| `--to <date>` | 否 | 创建时间终点,支持 `YYYY-MM-DD` 或 ISO datetime。 |
|
|
365
386
|
| `--days <n>` | 否 | 最近 N 天(按 `created_at`),不能与 `--from/--to` 同时使用。 |
|
|
366
|
-
| `--
|
|
387
|
+
| `--boxes <string\|@file>` | 否 | 按卡片盒名称筛选(支持 JSON 数组或逗号/换行分隔);会自动解析为 box id 查询。 |
|
|
367
388
|
| `--sql <expr>` | 否 | SQL 风格条件表达式;仅支持字段 `id/content_md/summary/tags/zettel_boxes/created_at/type`,其中 `zettel_boxes` 按名称自动转 id。只支持只读 WHERE 条件(禁止 `INSERT/UPDATE/DELETE`、注释和多语句)。 |
|
|
368
389
|
| `--include-deleted` | 否 | 包含软删除笔记。 |
|
|
369
390
|
|
|
370
|
-
支持全局参数:`--offline`、`--sync-timeout`
|
|
391
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
371
392
|
|
|
372
393
|
### `dino note get <id>`
|
|
373
394
|
|
|
@@ -377,7 +398,7 @@ dino box add "你的卡片盒"
|
|
|
377
398
|
| --- | --- | --- |
|
|
378
399
|
| `[id]` | 否 | 单个笔记 ID(可与 `--ids` 组合,去重后批量更新)。 |
|
|
379
400
|
|
|
380
|
-
支持全局参数:`--json`、`--offline`、`--sync-timeout`
|
|
401
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
381
402
|
|
|
382
403
|
### `dino note detail [id]`
|
|
383
404
|
|
|
@@ -393,7 +414,7 @@ dino box add "你的卡片盒"
|
|
|
393
414
|
|
|
394
415
|
说明:`[id]` 与 `--ids` 至少提供一个。
|
|
395
416
|
|
|
396
|
-
支持全局参数:`--offline`、`--sync-timeout`
|
|
417
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
397
418
|
|
|
398
419
|
### `dino note create --title <string> --content <string|@file> [options]`
|
|
399
420
|
|
|
@@ -405,9 +426,10 @@ dino box add "你的卡片盒"
|
|
|
405
426
|
| `--content <string|@file>` | 是 | Markdown 内容,可传 `@文件路径`。 |
|
|
406
427
|
| `--type <note\|crawl>` | 否 | 笔记类型,默认 `crawl`。 |
|
|
407
428
|
| `--tags <string\|@file>` | 否 | 标签列表(JSON 数组或逗号/换行分隔)。 |
|
|
408
|
-
| `--
|
|
429
|
+
| `--boxes <string\|@file>` | 否 | 卡片盒名称列表(JSON 数组或逗号/换行分隔)。 |
|
|
430
|
+
| `--dry-run` | 否 | 仅预览将要创建的笔记,不实际写入。 |
|
|
409
431
|
|
|
410
|
-
支持全局参数:`--json`、`--offline`、`--sync-timeout`
|
|
432
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
411
433
|
|
|
412
434
|
### `dino note update [id] [options]`
|
|
413
435
|
|
|
@@ -422,10 +444,12 @@ dino box add "你的卡片盒"
|
|
|
422
444
|
| `--ids <string\|@file>` | 否 | 批量更新的笔记 ID 列表(JSON 数组或逗号/换行分隔)。 |
|
|
423
445
|
| `--tags <string\|@file>` | 否 | 标签列表(JSON 数组或逗号/换行分隔)。传 `[]` 可清空标签。 |
|
|
424
446
|
| `--boxes <string\|@file>` | 否 | 卡片盒名称列表(JSON 数组或逗号/换行分隔)。传 `[]` 可清空卡片盒。 |
|
|
447
|
+
| `--starred <true\|false>` | 否 | 设置收藏状态。 |
|
|
448
|
+
| `--dry-run` | 否 | 仅预览将要执行的变更,不实际写入。 |
|
|
425
449
|
|
|
426
450
|
说明:`<id>` 与 `--ids` 至少提供一个;`--tags` 与 `--boxes` 至少提供一个。
|
|
427
451
|
|
|
428
|
-
支持全局参数:`--json`、`--offline`、`--sync-timeout`
|
|
452
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
429
453
|
|
|
430
454
|
### `dino note delete <id>`
|
|
431
455
|
|
|
@@ -435,9 +459,13 @@ dino box add "你的卡片盒"
|
|
|
435
459
|
| --- | --- | --- |
|
|
436
460
|
| `<id>` | 是 | 笔记 ID。 |
|
|
437
461
|
|
|
438
|
-
|
|
462
|
+
| 选项 | 必填 | 说明 |
|
|
463
|
+
| --- | --- | --- |
|
|
464
|
+
| `--dry-run` | 否 | 仅预览将要执行的删除,不实际写入。 |
|
|
465
|
+
|
|
466
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
439
467
|
|
|
440
|
-
## 8.
|
|
468
|
+
## 8.6 `tag` 命令
|
|
441
469
|
|
|
442
470
|
### `dino tag list`
|
|
443
471
|
|
|
@@ -445,7 +473,8 @@ dino box add "你的卡片盒"
|
|
|
445
473
|
|
|
446
474
|
| 选项 | 必填 | 说明 |
|
|
447
475
|
| --- | --- | --- |
|
|
448
|
-
| `--json` | 否 |
|
|
476
|
+
| `--json` | 否 | 兼容旧行为,输出 machine-readable YAML。 |
|
|
477
|
+
| `--format <yaml\|json>` | 否 | 结构化输出格式,推荐 AI / 脚本使用 `json`。 |
|
|
449
478
|
| `--offline` | 否 | 跳过 connect/sync,仅用本地缓存。 |
|
|
450
479
|
| `--sync-timeout <ms>` | 否 | 覆盖连接/同步超时毫秒。 |
|
|
451
480
|
|
|
@@ -461,13 +490,15 @@ dino box add "你的卡片盒"
|
|
|
461
490
|
| --- | --- | --- |
|
|
462
491
|
| `--name <string>` | 否 | 标签名/路径,可替代位置参数 `[name]`。 |
|
|
463
492
|
| `--emoji <string>` | 否 | 标签 emoji。 |
|
|
464
|
-
| `--json` | 否 |
|
|
493
|
+
| `--json` | 否 | 兼容旧行为,输出 machine-readable YAML。 |
|
|
494
|
+
| `--format <yaml\|json>` | 否 | 结构化输出格式,推荐 AI / 脚本使用 `json`。 |
|
|
495
|
+
| `--dry-run` | 否 | 仅预览将要创建或恢复的标签,不实际写入。 |
|
|
465
496
|
| `--offline` | 否 | 跳过 connect/sync,仅用本地缓存。 |
|
|
466
497
|
| `--sync-timeout <ms>` | 否 | 覆盖连接/同步超时毫秒。 |
|
|
467
498
|
|
|
468
499
|
说明:`[name]` 与 `--name` 至少提供一个;若两者都提供且值不同会报错。
|
|
469
500
|
|
|
470
|
-
## 8.
|
|
501
|
+
## 8.7 `box` 命令
|
|
471
502
|
|
|
472
503
|
### `dino box list`
|
|
473
504
|
|
|
@@ -491,17 +522,19 @@ dino box add "你的卡片盒"
|
|
|
491
522
|
| `--name <string>` | 否 | 卡片盒名称,可替代位置参数 `[name]`。 |
|
|
492
523
|
| `--description <string>` | 否 | 用途说明(可帮助 AI 路由笔记)。 |
|
|
493
524
|
| `--color <string>` | 否 | 卡片盒颜色。 |
|
|
494
|
-
| `--json` | 否 |
|
|
525
|
+
| `--json` | 否 | 兼容旧行为,输出 machine-readable YAML。 |
|
|
526
|
+
| `--format <yaml\|json>` | 否 | 结构化输出格式,推荐 AI / 脚本使用 `json`。 |
|
|
527
|
+
| `--dry-run` | 否 | 仅预览将要创建或恢复的卡片盒,不实际写入。 |
|
|
495
528
|
| `--offline` | 否 | 跳过 connect/sync,仅用本地缓存。 |
|
|
496
529
|
| `--sync-timeout <ms>` | 否 | 覆盖连接/同步超时毫秒。 |
|
|
497
530
|
|
|
498
531
|
说明:`[name]` 与 `--name` 至少提供一个;若两者都提供且值不同会报错。
|
|
499
532
|
|
|
500
|
-
## 8.
|
|
533
|
+
## 8.8 `prompt` 命令
|
|
501
534
|
|
|
502
535
|
### `dino prompt list`
|
|
503
536
|
|
|
504
|
-
列出 Prompt(`name` 与 `
|
|
537
|
+
列出 Prompt(`name` 与 `prompt`)。
|
|
505
538
|
|
|
506
539
|
| 选项 | 必填 | 说明 |
|
|
507
540
|
| --- | --- | --- |
|
|
@@ -515,16 +548,18 @@ dino box add "你的卡片盒"
|
|
|
515
548
|
| 选项 | 必填 | 说明 |
|
|
516
549
|
| --- | --- | --- |
|
|
517
550
|
| `--name <string>` | 是 | Prompt 名称。 |
|
|
518
|
-
| `--
|
|
519
|
-
| `--json` | 否 |
|
|
551
|
+
| `--prompt <string>` | 是 | Prompt 文本内容。 |
|
|
552
|
+
| `--json` | 否 | 兼容旧行为,输出 machine-readable YAML。 |
|
|
553
|
+
| `--format <yaml\|json>` | 否 | 结构化输出格式,推荐 AI / 脚本使用 `json`。 |
|
|
554
|
+
| `--dry-run` | 否 | 仅预览将要创建或恢复的 Prompt,不实际写入。 |
|
|
520
555
|
| `--offline` | 否 | 跳过 connect/sync,仅用本地缓存。 |
|
|
521
556
|
| `--sync-timeout <ms>` | 否 | 覆盖连接/同步超时毫秒。 |
|
|
522
557
|
|
|
523
|
-
## 8.
|
|
558
|
+
## 8.9 `config` 命令
|
|
524
559
|
|
|
525
560
|
### `dino config get [key]`
|
|
526
561
|
|
|
527
|
-
|
|
562
|
+
读取配置。推荐 AI / 脚本使用 `dino config get [key] --format json`。
|
|
528
563
|
|
|
529
564
|
| 参数 | 必填 | 说明 |
|
|
530
565
|
| --- | --- | --- |
|
|
@@ -551,15 +586,15 @@ sync.timeoutMs
|
|
|
551
586
|
sync.timeoutMs (必须为正整数)
|
|
552
587
|
```
|
|
553
588
|
|
|
554
|
-
## 8.
|
|
589
|
+
## 8.10 `info` 命令
|
|
555
590
|
|
|
556
591
|
### `dino info`
|
|
557
592
|
|
|
558
593
|
显示 CLI 版本信息。
|
|
559
594
|
|
|
560
|
-
支持全局参数:`--json`
|
|
595
|
+
支持全局参数:`--json`、`--format`
|
|
561
596
|
|
|
562
|
-
## 8.
|
|
597
|
+
## 8.11 `todo` 命令
|
|
563
598
|
|
|
564
599
|
### `dino todo search [query]`
|
|
565
600
|
|
|
@@ -585,7 +620,7 @@ sync.timeoutMs (必须为正整数)
|
|
|
585
620
|
- 顶层包含 `meta`(查询条件回显、返回数量、是否截断)与 `tasks`(任务数组)。
|
|
586
621
|
- 每条任务包含 `task_key`、`note_id`、`note_title`、`status`、层级关系与时间字段。
|
|
587
622
|
|
|
588
|
-
支持全局参数:`--offline`、`--sync-timeout`
|
|
623
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
589
624
|
|
|
590
625
|
### `dino todo append [task]`
|
|
591
626
|
|
|
@@ -606,10 +641,11 @@ sync.timeoutMs (必须为正整数)
|
|
|
606
641
|
| `--task <text>` | 否 | 任务文本(可重复传入)。 |
|
|
607
642
|
| `--tasks <string\|@file>` | 否 | 任务列表(JSON 数组或逗号/换行分隔)。 |
|
|
608
643
|
| `--note-id <id>` | 否 | 指定目标笔记 ID。 |
|
|
644
|
+
| `--dry-run` | 否 | 仅预览将要追加的任务和目标笔记,不实际写入。 |
|
|
609
645
|
|
|
610
646
|
说明:`[task]`、`--task`、`--tasks` 至少提供一个。
|
|
611
647
|
|
|
612
|
-
支持全局参数:`--offline`、`--sync-timeout`
|
|
648
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
613
649
|
|
|
614
650
|
### `dino todo create [task]`
|
|
615
651
|
|
|
@@ -629,10 +665,11 @@ sync.timeoutMs (必须为正整数)
|
|
|
629
665
|
| `--task <text>` | 否 | 任务文本(可重复传入)。 |
|
|
630
666
|
| `--tasks <string\|@file>` | 否 | 任务列表(JSON 数组或逗号/换行分隔)。 |
|
|
631
667
|
| `--title <string>` | 否 | 自定义笔记标题。 |
|
|
668
|
+
| `--dry-run` | 否 | 仅预览将要创建的待办笔记,不实际写入。 |
|
|
632
669
|
|
|
633
670
|
说明:`[task]`、`--task`、`--tasks` 至少提供一个。
|
|
634
671
|
|
|
635
|
-
支持全局参数:`--offline`、`--sync-timeout`
|
|
672
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
636
673
|
|
|
637
674
|
### `dino todo update <taskId> --status <status>`
|
|
638
675
|
|
|
@@ -651,8 +688,9 @@ sync.timeoutMs (必须为正整数)
|
|
|
651
688
|
| 选项 | 必填 | 说明 |
|
|
652
689
|
| --- | --- | --- |
|
|
653
690
|
| `--status <status>` | 是 | 目标状态。 |
|
|
691
|
+
| `--dry-run` | 否 | 仅预览将要更新的任务状态,不实际写入。 |
|
|
654
692
|
|
|
655
|
-
支持全局参数:`--offline`、`--sync-timeout`
|
|
693
|
+
支持全局参数:`--json`、`--format`、`--offline`、`--sync-timeout`
|
|
656
694
|
|
|
657
695
|
---
|
|
658
696
|
|
package/dist/cli.js
CHANGED
|
@@ -9,12 +9,16 @@ import { registerMCPCommands } from './commands/mcp/index.js';
|
|
|
9
9
|
import { registerMetaCommands } from './commands/meta/index.js';
|
|
10
10
|
import { registerNoteCommands } from './commands/notes/index.js';
|
|
11
11
|
import { registerPromptCommands } from './commands/prompt/index.js';
|
|
12
|
+
import { registerSchemaCommands } from './commands/schema/index.js';
|
|
12
13
|
import { registerSyncCommand } from './commands/sync.js';
|
|
14
|
+
import { registerStorageCommands } from './commands/storage/index.js';
|
|
13
15
|
import { registerUpdateCommand } from './commands/update.js';
|
|
14
16
|
import { registerTagsCommand } from './commands/tags/index.js';
|
|
15
17
|
import { registerTodoCommands } from './commands/todo/index.js';
|
|
16
18
|
import { getPackageVersion } from './utils/version.js';
|
|
19
|
+
import { clearRequestedStructuredOutputFormat, resolveStructuredOutputFormat, setRequestedStructuredOutputFormat, } from './utils/output.js';
|
|
17
20
|
export function createCli() {
|
|
21
|
+
clearRequestedStructuredOutputFormat();
|
|
18
22
|
const program = new Command();
|
|
19
23
|
program
|
|
20
24
|
.name('dino')
|
|
@@ -22,10 +26,18 @@ export function createCli() {
|
|
|
22
26
|
.version(getPackageVersion())
|
|
23
27
|
.showHelpAfterError();
|
|
24
28
|
program
|
|
25
|
-
.option('--json', '
|
|
29
|
+
.option('--json', 'legacy machine-readable YAML output (equivalent to --format yaml)')
|
|
30
|
+
.option('--format <format>', 'structured output format: yaml | json')
|
|
26
31
|
.option('--offline', 'skip connect/sync and only use local cache')
|
|
27
32
|
.option('--sync-timeout <ms>', 'override sync/connect timeout (milliseconds)')
|
|
28
33
|
.option('--verbose', 'enable verbose logging');
|
|
34
|
+
program.hook('preAction', (_thisCommand, actionCommand) => {
|
|
35
|
+
const options = actionCommand.optsWithGlobals?.() ?? {};
|
|
36
|
+
setRequestedStructuredOutputFormat(resolveStructuredOutputFormat(options));
|
|
37
|
+
});
|
|
38
|
+
program.hook('postAction', () => {
|
|
39
|
+
clearRequestedStructuredOutputFormat();
|
|
40
|
+
});
|
|
29
41
|
registerAuthCommands(program);
|
|
30
42
|
registerBoxesCommand(program);
|
|
31
43
|
registerConfigCommands(program);
|
|
@@ -37,6 +49,8 @@ export function createCli() {
|
|
|
37
49
|
registerSyncCommand(program);
|
|
38
50
|
registerUpdateCommand(program);
|
|
39
51
|
registerPromptCommands(program);
|
|
52
|
+
registerSchemaCommands(program);
|
|
53
|
+
registerStorageCommands(program);
|
|
40
54
|
registerTagsCommand(program);
|
|
41
55
|
registerTodoCommands(program);
|
|
42
56
|
registerNoteCommands(program);
|