@dypt/cli 0.1.4 → 0.1.6
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 +4 -1
- package/dist/index.js +90 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,12 +54,15 @@ dypt task get 123 --json
|
|
|
54
54
|
|
|
55
55
|
### Update a task
|
|
56
56
|
|
|
57
|
-
Change status, priority,
|
|
57
|
+
Change status, priority, due date, archive state, or parent:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
dypt task update 123 --status "in progress"
|
|
61
61
|
dypt task update 123 --priority high
|
|
62
62
|
dypt task update 123 --deadline 2026-05-01T09:00:00Z
|
|
63
|
+
dypt task update 123 --parent Work
|
|
64
|
+
dypt task update 123 --parent root --preview
|
|
65
|
+
dypt task update 123 --archive
|
|
63
66
|
```
|
|
64
67
|
|
|
65
68
|
## JSON output
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Argument, Command, Option } from "commander";
|
|
|
9
9
|
// package.json
|
|
10
10
|
var package_default = {
|
|
11
11
|
name: "@dypt/cli",
|
|
12
|
-
version: "0.1.
|
|
12
|
+
version: "0.1.6",
|
|
13
13
|
description: "Command-line interface for dypt task management",
|
|
14
14
|
license: "SEE LICENSE IN LICENSE",
|
|
15
15
|
homepage: "https://dypt.app",
|
|
@@ -434,18 +434,51 @@ dypt agent install claude
|
|
|
434
434
|
|
|
435
435
|
When working on repo tasks:
|
|
436
436
|
|
|
437
|
-
- Use the dypt CLI to inspect tasks, notes, children, dependencies, and nearby
|
|
437
|
+
- Use the dypt CLI to inspect tasks, notes, children, dependencies, and nearby
|
|
438
|
+
branch context before changing work.
|
|
438
439
|
- Search before creating new tasks to avoid duplicates.
|
|
439
|
-
- If the right parent or scope for a new or moved task is not clear
|
|
440
|
+
- If the right parent or scope for a new or moved task is not clear from the
|
|
441
|
+
user request, current session, existing dypt hierarchy, or this file, ask the
|
|
442
|
+
user to confirm before changing task structure.
|
|
440
443
|
- Capture durable context in dypt notes.
|
|
441
|
-
- Format longer dypt notes with appropriate markdown so they are readable and
|
|
442
|
-
|
|
443
|
-
- When
|
|
444
|
+
- Format longer dypt notes with appropriate markdown so they are readable and
|
|
445
|
+
well presented.
|
|
446
|
+
- When referencing tasks in dypt notes, use dypt task links such as
|
|
447
|
+
[#123](#task-123) and do not repeat the task title after the link.
|
|
448
|
+
- When referring to tasks back to the user, include both id and title, for
|
|
449
|
+
example #123 Add CLI docs.
|
|
444
450
|
- Track follow-up work as dypt tasks.
|
|
445
451
|
- Do not create a parallel markdown TODO tracker.
|
|
446
|
-
- Do not set leaf tasks to in progress; dypt derives in progress for parent
|
|
447
|
-
|
|
452
|
+
- Do not set leaf tasks to in progress; dypt derives in progress for parent
|
|
453
|
+
tasks from child state.
|
|
454
|
+
- Preview cleanup or bulk changes before applying them when preview is
|
|
455
|
+
available.
|
|
448
456
|
- If the dypt-cli skill is available, use it for dypt task workflows.
|
|
457
|
+
|
|
458
|
+
## dypt Scope
|
|
459
|
+
|
|
460
|
+
If this repository usually tracks work under a specific dypt branch, name that
|
|
461
|
+
branch here:
|
|
462
|
+
|
|
463
|
+
Use the dypt task branch <branch name or task id> as the default scope for this
|
|
464
|
+
repository.
|
|
465
|
+
|
|
466
|
+
If a task does not clearly belong under that branch, ask before creating or
|
|
467
|
+
moving it.
|
|
468
|
+
|
|
469
|
+
## Useful Commands
|
|
470
|
+
|
|
471
|
+
\`\`\`bash
|
|
472
|
+
dypt task search "<query>"
|
|
473
|
+
dypt task get <ref>
|
|
474
|
+
dypt task summary <ref>
|
|
475
|
+
dypt task tree <ref> --depth 2
|
|
476
|
+
dypt note get <ref>
|
|
477
|
+
dypt dep list <ref>
|
|
478
|
+
dypt task plan next-actions <ref>
|
|
479
|
+
dypt task plan focus <ref>
|
|
480
|
+
dypt task plan metadata <ref> --leaves-only
|
|
481
|
+
\`\`\`
|
|
449
482
|
`;
|
|
450
483
|
function metadataPath(targetPath) {
|
|
451
484
|
return path3.join(targetPath, METADATA_FILE);
|
|
@@ -1060,15 +1093,36 @@ async function runTaskTree(input, deps) {
|
|
|
1060
1093
|
|
|
1061
1094
|
// src/commands/task/update.ts
|
|
1062
1095
|
async function runTaskUpdate(input, deps) {
|
|
1063
|
-
const
|
|
1096
|
+
const hasMutations = input.title !== void 0 || input.status !== void 0 || input.priority !== void 0 || input.deadline !== void 0 || input.expectedTimeTaken !== void 0 || input.actualTimeTaken !== void 0 || input.archivedAt !== void 0 || input.parentRef !== void 0;
|
|
1097
|
+
if (!hasMutations) {
|
|
1098
|
+
throw new Error(
|
|
1099
|
+
"No changes specified. Use --title, --status, --priority, --deadline, --expected-time, --actual-time, --archive, --unarchive, or --parent."
|
|
1100
|
+
);
|
|
1101
|
+
}
|
|
1102
|
+
if (input.preview && input.title !== void 0) {
|
|
1103
|
+
throw new Error("Preview is not supported for --title.");
|
|
1104
|
+
}
|
|
1105
|
+
const args = {
|
|
1064
1106
|
ref: input.ref,
|
|
1065
1107
|
title: input.title,
|
|
1066
1108
|
status: input.status,
|
|
1067
1109
|
priority: input.priority,
|
|
1068
1110
|
deadline: input.deadline,
|
|
1069
1111
|
expectedTimeTaken: input.expectedTimeTaken,
|
|
1070
|
-
actualTimeTaken: input.actualTimeTaken
|
|
1071
|
-
|
|
1112
|
+
actualTimeTaken: input.actualTimeTaken,
|
|
1113
|
+
archivedAt: input.archivedAt,
|
|
1114
|
+
parentRef: input.parentRef
|
|
1115
|
+
};
|
|
1116
|
+
const result = input.preview ? await deps.previewTask({
|
|
1117
|
+
ref: args.ref,
|
|
1118
|
+
status: args.status,
|
|
1119
|
+
priority: args.priority,
|
|
1120
|
+
deadline: args.deadline,
|
|
1121
|
+
expectedTimeTaken: args.expectedTimeTaken,
|
|
1122
|
+
actualTimeTaken: args.actualTimeTaken,
|
|
1123
|
+
archivedAt: args.archivedAt,
|
|
1124
|
+
parentRef: args.parentRef
|
|
1125
|
+
}) : await deps.updateTask(args);
|
|
1072
1126
|
if (input.json) {
|
|
1073
1127
|
deps.printJson(result);
|
|
1074
1128
|
return;
|
|
@@ -2888,7 +2942,7 @@ function buildCli() {
|
|
|
2888
2942
|
"--priority <priority>",
|
|
2889
2943
|
`new priority (${taskPriorityChoices.join("|")})`
|
|
2890
2944
|
).choices([...taskPriorityChoices])
|
|
2891
|
-
).option("--deadline <deadline>", "ISO deadline").option("--expected-time <minutes>", "expected minutes").option("--actual-time <minutes>", "actual minutes").option("--json", "print JSON output").action(
|
|
2945
|
+
).option("--deadline <deadline>", "ISO deadline").option("--expected-time <minutes>", "expected minutes").option("--actual-time <minutes>", "actual minutes").option("--archive", "archive the task").option("--unarchive", "unarchive the task").option("--parent <ref>", 'move task under the given parent or "root"').option("--preview", "preview the update without mutating").option("--json", "print JSON output").action(
|
|
2892
2946
|
async (ref, options) => {
|
|
2893
2947
|
await runTaskUpdate(
|
|
2894
2948
|
{
|
|
@@ -2899,20 +2953,39 @@ function buildCli() {
|
|
|
2899
2953
|
deadline: options.deadline,
|
|
2900
2954
|
expectedTimeTaken: options.expectedTime,
|
|
2901
2955
|
actualTimeTaken: options.actualTime,
|
|
2956
|
+
archivedAt: options.archive ? /* @__PURE__ */ new Date() : options.unarchive ? null : void 0,
|
|
2957
|
+
parentRef: options.parent,
|
|
2958
|
+
preview: Boolean(options.preview),
|
|
2902
2959
|
json: Boolean(options.json)
|
|
2903
2960
|
},
|
|
2904
2961
|
{
|
|
2905
|
-
updateTask: (input) => withCliApi(
|
|
2906
|
-
|
|
2962
|
+
updateTask: (input) => withCliApi(async (api) => {
|
|
2963
|
+
const normalizedParentRef = input.parentRef?.toLowerCase() === "root" ? null : input.parentRef;
|
|
2964
|
+
return api.updateTask({
|
|
2907
2965
|
taskId: await resolveTaskId(api, String(input.ref)),
|
|
2908
2966
|
title: input.title,
|
|
2909
2967
|
status: normalizeStatus(input.status),
|
|
2910
2968
|
priority: normalizePriority(input.priority),
|
|
2911
2969
|
deadline: input.deadline ? new Date(String(input.deadline)) : void 0,
|
|
2912
2970
|
expectedTimeTaken: input.expectedTimeTaken ? Number(input.expectedTimeTaken) : void 0,
|
|
2913
|
-
actualTimeTaken: input.actualTimeTaken ? Number(input.actualTimeTaken) : void 0
|
|
2914
|
-
|
|
2915
|
-
|
|
2971
|
+
actualTimeTaken: input.actualTimeTaken ? Number(input.actualTimeTaken) : void 0,
|
|
2972
|
+
archivedAt: input.archivedAt,
|
|
2973
|
+
parentId: normalizedParentRef === void 0 ? void 0 : normalizedParentRef === null ? null : await resolveTaskId(api, normalizedParentRef)
|
|
2974
|
+
});
|
|
2975
|
+
}),
|
|
2976
|
+
previewTask: (input) => withCliApi(async (api) => {
|
|
2977
|
+
const normalizedParentRef = input.parentRef?.toLowerCase() === "root" ? null : input.parentRef;
|
|
2978
|
+
return api.previewManyTasks({
|
|
2979
|
+
taskIds: [await resolveTaskId(api, String(input.ref))],
|
|
2980
|
+
status: normalizeStatus(input.status),
|
|
2981
|
+
priority: normalizePriority(input.priority),
|
|
2982
|
+
deadline: input.deadline ? new Date(String(input.deadline)) : void 0,
|
|
2983
|
+
expectedTimeTaken: input.expectedTimeTaken ? Number(input.expectedTimeTaken) : void 0,
|
|
2984
|
+
actualTimeTaken: input.actualTimeTaken ? Number(input.actualTimeTaken) : void 0,
|
|
2985
|
+
archivedAt: input.archivedAt,
|
|
2986
|
+
parentId: normalizedParentRef === void 0 ? void 0 : normalizedParentRef === null ? null : await resolveTaskId(api, normalizedParentRef)
|
|
2987
|
+
});
|
|
2988
|
+
}),
|
|
2916
2989
|
printJson,
|
|
2917
2990
|
printTable
|
|
2918
2991
|
}
|