@difflab/difflab-cli 0.3.0 → 0.4.0
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 +13 -0
- package/dist/index.js +1238 -63
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,6 +46,19 @@ Clients are selected explicitly. Supported names: `pi`, `cursor`, `codex`, `clau
|
|
|
46
46
|
|
|
47
47
|
MCP clients launch `npx -y @difflab/difflab-cli mcp serve` over stdio, so no daemon or port is needed. Bun must be on the client's PATH.
|
|
48
48
|
|
|
49
|
+
## Document templates
|
|
50
|
+
|
|
51
|
+
List the available templates or scaffold a new document from one:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
difflab-cli templates list
|
|
55
|
+
difflab-cli templates scaffold spec-driven-plan docs/plans first-plan.md --cwd /absolute/project/path
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The CLI defaults `--cwd` to its current directory. The MCP server exposes `template_list({})` and `scaffold({"name":"spec-driven-plan","cwd":"/absolute/project/path","path":"docs/plans","filename":"first-plan.md"})`. Both interfaces take a hyphenated template name, a relative destination **directory** (`path`, or `.` for `cwd`), and a separate **filename**. MCP always requires an absolute existing `cwd`. Missing destination directories are created. Available names: `spec-driven-plan`, `software-architecture-design`, `architecture-decision-record`, `product-requirements-document`, `code-review`, `planning-intent`, `ui-component-architecture`, and `pull-request-description` (adapted from Diffpi's PR template).
|
|
59
|
+
|
|
60
|
+
On first use, missing bundled templates and filled examples are copied to `~/.difflab/templates` and `~/.difflab/templates/examples`. Edit the installed templates to customize future documents. Later runs add missing files but never replace existing ones, even after an upgrade. Examples are for reference, not selectable templates. Copying is literal: prompts and placeholders are not substituted. An unknown name, missing or invalid source, unsafe path, symlink, or existing destination causes an error; destination files are never overwritten. The target directory must remain inside `cwd` and the filename must be a single file name without separators. To restore a bundled default, move your installed copy aside before listing again.
|
|
61
|
+
|
|
49
62
|
## Develop
|
|
50
63
|
|
|
51
64
|
```bash
|