@dypt/cli 0.1.3 → 0.1.5
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/dist/index.js +76 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.5",
|
|
13
13
|
description: "Command-line interface for dypt task management",
|
|
14
14
|
license: "SEE LICENSE IN LICENSE",
|
|
15
15
|
homepage: "https://dypt.app",
|
|
@@ -403,24 +403,82 @@ var REQUIRED_FILES = [
|
|
|
403
403
|
path3.join("agents", "openai.yaml"),
|
|
404
404
|
path3.join("references", "cli-basics.md")
|
|
405
405
|
];
|
|
406
|
+
var AGENT_INSTRUCTIONS_APPEND_HINT = "To append these instructions to a repo agent file, run: dypt agent install-instructions --append AGENTS.md or dypt agent install-instructions --append CLAUDE.md";
|
|
406
407
|
var AGENT_INSTRUCTIONS_SNIPPET = `## Work Tracking with dypt
|
|
407
408
|
|
|
408
|
-
This project uses dypt tasks as the canonical work tracker.
|
|
409
|
+
This project uses dypt tasks as the canonical work tracker. Use the dypt CLI
|
|
410
|
+
before creating, changing, or reporting on repo work.
|
|
411
|
+
|
|
412
|
+
### Getting Started
|
|
413
|
+
|
|
414
|
+
Check that the CLI is available and authenticated:
|
|
415
|
+
|
|
416
|
+
\`\`\`bash
|
|
417
|
+
dypt --version
|
|
418
|
+
dypt auth status
|
|
419
|
+
\`\`\`
|
|
420
|
+
|
|
421
|
+
If the CLI is missing, install it with:
|
|
422
|
+
|
|
423
|
+
\`\`\`bash
|
|
424
|
+
npm install -g @dypt/cli
|
|
425
|
+
\`\`\`
|
|
426
|
+
|
|
427
|
+
If the dypt CLI skill is not available in this agent session, tell the user and
|
|
428
|
+
offer to install it:
|
|
429
|
+
|
|
430
|
+
\`\`\`bash
|
|
431
|
+
dypt agent install codex
|
|
432
|
+
dypt agent install claude
|
|
433
|
+
\`\`\`
|
|
409
434
|
|
|
410
435
|
When working on repo tasks:
|
|
411
436
|
|
|
412
|
-
- 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.
|
|
413
439
|
- Search before creating new tasks to avoid duplicates.
|
|
414
|
-
- 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.
|
|
415
443
|
- Capture durable context in dypt notes.
|
|
416
|
-
- Format longer dypt notes with appropriate markdown so they are readable and
|
|
417
|
-
|
|
418
|
-
- 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.
|
|
419
450
|
- Track follow-up work as dypt tasks.
|
|
420
451
|
- Do not create a parallel markdown TODO tracker.
|
|
421
|
-
- Do not set leaf tasks to in progress; dypt derives in progress for parent
|
|
422
|
-
|
|
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.
|
|
423
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
|
+
\`\`\`
|
|
424
482
|
`;
|
|
425
483
|
function metadataPath(targetPath) {
|
|
426
484
|
return path3.join(targetPath, METADATA_FILE);
|
|
@@ -712,7 +770,10 @@ async function runAgentInstallInstructions(input, deps) {
|
|
|
712
770
|
snippet: AGENT_INSTRUCTIONS_SNIPPET,
|
|
713
771
|
dryRun: input.dryRun,
|
|
714
772
|
force: input.force
|
|
715
|
-
}) : {
|
|
773
|
+
}) : {
|
|
774
|
+
snippet: AGENT_INSTRUCTIONS_SNIPPET,
|
|
775
|
+
appendHint: AGENT_INSTRUCTIONS_APPEND_HINT
|
|
776
|
+
};
|
|
716
777
|
if (input.json) {
|
|
717
778
|
deps.printJson(result);
|
|
718
779
|
return;
|
|
@@ -2079,7 +2140,11 @@ function renderAgentInstallResult(result, color) {
|
|
|
2079
2140
|
}
|
|
2080
2141
|
function renderAgentInstructions(result, color) {
|
|
2081
2142
|
if (typeof result.snippet === "string") {
|
|
2082
|
-
|
|
2143
|
+
const lines = [result.snippet.trimEnd()];
|
|
2144
|
+
if (result.appendHint) {
|
|
2145
|
+
lines.push("", dim(result.appendHint, color));
|
|
2146
|
+
}
|
|
2147
|
+
return lines.join("\n");
|
|
2083
2148
|
}
|
|
2084
2149
|
if (result.action === "append" && result.filePath) {
|
|
2085
2150
|
const verb = result.dryRun ? "Would append" : "Appended";
|