@difflab/difflab-cli 0.1.0-rc.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -0
  3. package/dist/index.js +29834 -0
  4. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 cloudvoyant
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # difflab-cli
2
+
3
+ A Bun command-line application with a local Difflab MCP server.
4
+
5
+ ## Run
6
+
7
+ ```bash
8
+ bunx @difflab/difflab-cli Premise
9
+ ```
10
+
11
+ ## MCP todo tools
12
+
13
+ After installing the CLI so `difflab-cli` is on your PATH, register it with the MCP clients you use:
14
+
15
+ ```bash
16
+ difflab-cli mcp setup --client pi
17
+ difflab-cli mcp setup --client cursor --client codex
18
+ ```
19
+
20
+ Clients are selected explicitly. Supported names: `pi`, `cursor`, `codex`, `claude-code`, and `claude-desktop`. Pi uses the shared `~/.config/mcp/mcp.json` file (through the Pi MCP adapter), Cursor uses `~/.cursor/mcp.json`, Codex uses its CLI, Claude Code uses its CLI with user scope, and Claude Desktop uses its platform-specific user config. These clients do **not** all read one common file. Setup adds Difflab only when absent, leaves other servers in place, and refuses to replace a conflicting `difflab` entry. Codex and Claude Code must have their CLIs installed if selected. Restart or reload the selected client after setup.
21
+
22
+ `mcp setup` does **not** create a todo file. Use the `todo_init` MCP tool to create a list. 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.
23
+
24
+ Each todo call requires **`cwd` (an absolute path to an existing directory)** and **`path` (a relative path to a JSON todo file inside that directory)**. They are supplied per call, not in the MCP server configuration. For example, with `cwd` set to `/home/alex`:
25
+
26
+ ```text
27
+ todo_init({"cwd":"/home/alex","path":"todos.json"})
28
+ todo_add({"cwd":"/home/alex","path":"todos.json","text":"Review PR"})
29
+ ```
30
+
31
+ `todo_list`, `todo_complete`, and `todo_remove` also require both fields; the latter two require a task `id` returned by `todo_list` or `todo_add`. Call `todo_init` before other operations on a new file. Parent traversal outside `cwd`, absolute `path` values, and symlinked paths are rejected. Keep personal todo files outside the repository or add their paths to `.gitignore`. Concurrent writes to the same file are not yet coordinated.
32
+
33
+ Agents in this repo can load `skills/difflab-todo/SKILL.md` for usage instructions.
34
+
35
+ ## Develop
36
+
37
+ ```bash
38
+ mise run install
39
+ mise run test
40
+ mise run build
41
+ mise run run
42
+ bun src/index.ts mcp serve # stdio MCP server; a client starts this process
43
+ ```
44
+
45
+ The package requires Bun 1.4.2 or later.