md-task-viewer 0.1.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 ADDED
@@ -0,0 +1,142 @@
1
+ # md-task-viewer
2
+
3
+ A local task viewer/editor that treats Markdown files as tasks.
4
+
5
+ Each Markdown file (`1 file = 1 task`) is managed through a browser UI, and all changes are written back to local files.
6
+
7
+ ## Features
8
+
9
+ - List Markdown tasks
10
+ - Create, edit, and delete tasks
11
+ - Frontmatter-based `MUST` / `WANT` priority and `TODO` / `WIP` / `DONE` status
12
+ - Drag-and-drop reordering
13
+ - Persistent ordering via a dedicated metadata file
14
+ - Auto-reload on external file changes
15
+
16
+ ## Requirements
17
+
18
+ - Node.js `18.18.0` or later
19
+
20
+ ## Quick Start
21
+
22
+ ```bash
23
+ npx md-task-viewer [rootDir]
24
+ ```
25
+
26
+ Examples:
27
+
28
+ ```bash
29
+ npx md-task-viewer .
30
+ npx md-task-viewer ./tasks --port 4011 --no-open
31
+ ```
32
+
33
+ If `rootDir` is omitted, the current directory is used.
34
+
35
+ ## CLI Options
36
+
37
+ - `--port <number>`: Port to listen on
38
+ - `--host <host>`: Host to bind to (default: `127.0.0.1`)
39
+ - `--no-open`: Do not open the browser automatically
40
+
41
+ ## Task Format
42
+
43
+ Each Markdown file should have frontmatter with the following keys:
44
+
45
+ ```yaml
46
+ ---
47
+ title: Release notes
48
+ priority: MUST
49
+ status: WIP
50
+ createdAt: 2026-03-15T08:00:00.000Z
51
+ updatedAt: 2026-03-15T09:30:00.000Z
52
+ ---
53
+
54
+ # Notes
55
+
56
+ Free-form body text.
57
+ ```
58
+
59
+ ### Required frontmatter
60
+
61
+ - `title`
62
+ - `priority`: `MUST` or `WANT`
63
+ - `status`: `TODO`, `WIP`, or `DONE`
64
+ - `createdAt`: UTC ISO 8601
65
+ - `updatedAt`: UTC ISO 8601
66
+
67
+ Unknown frontmatter keys are preserved as-is.
68
+
69
+ Files missing required keys are displayed with default values and normalized on save.
70
+
71
+ Files with unparseable YAML frontmatter are excluded from the list and shown in the error panel.
72
+
73
+ ## Ordering Metadata
74
+
75
+ Settings are stored in `.md-task-viewer.json` at the root directory:
76
+
77
+ ```json
78
+ {
79
+ "version": 1,
80
+ "taskDirs": ["."],
81
+ "order": [
82
+ "alpha.md",
83
+ "planning/release-notes.md"
84
+ ]
85
+ }
86
+ ```
87
+
88
+ - `taskDirs`: Directories to scan for `.md` files (relative to `rootDir`). Defaults to `["."]`.
89
+ - `order`: Task display order.
90
+
91
+ ## File Discovery
92
+
93
+ Directories listed in `taskDirs` are scanned recursively. The following extensions are treated as tasks:
94
+
95
+ - `.md`
96
+ - `.markdown`
97
+
98
+ The following are excluded:
99
+
100
+ - `.git`
101
+ - `node_modules`
102
+ - `.md-task-viewer.json`
103
+
104
+ ## Development
105
+
106
+ ```bash
107
+ npm install
108
+ ```
109
+
110
+ Build:
111
+
112
+ ```bash
113
+ npm run build
114
+ ```
115
+
116
+ Run locally:
117
+
118
+ ```bash
119
+ npm run start:local
120
+ ```
121
+
122
+ Unit / integration tests:
123
+
124
+ ```bash
125
+ npm test
126
+ ```
127
+
128
+ E2E tests:
129
+
130
+ ```bash
131
+ npm run test:e2e
132
+ ```
133
+
134
+ ## Tech Stack
135
+
136
+ - Node.js + TypeScript
137
+ - Fastify
138
+ - React
139
+ - Vite
140
+ - `gray-matter`
141
+ - `chokidar`
142
+ - `@dnd-kit`