kandown 0.3.5 → 0.6.1

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/README.md +90 -378
  2. package/bin/kandown.js +212 -44
  3. package/dist/index.html +559 -4225
  4. package/package.json +5 -1
package/README.md CHANGED
@@ -13,220 +13,122 @@
13
13
  <a href="https://www.npmjs.com/package/kandown"><img src="https://img.shields.io/npm/v/kandown?color=cb3837&label=npm" alt="npm version"></a>
14
14
  <a href="https://www.npmjs.com/package/kandown"><img src="https://img.shields.io/npm/dm/kandown?color=blue" alt="npm downloads"></a>
15
15
  <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License">
16
- <img src="https://img.shields.io/badge/languages-48-purple" alt="48 languages">
17
16
  <img src="https://img.shields.io/badge/local--first-100%25-orange" alt="100% local-first">
18
17
  </p>
19
18
 
20
- <p align="center">
21
- <a href="#-quick-start">Quick Start</a> ·
22
- <a href="#-features">Features</a> ·
23
- <a href="#-cli-commands">CLI</a> ·
24
- <a href="#-board-tui">Board TUI</a> ·
25
- <a href="#-ai-agent-integration">AI Agents</a> ·
26
- <a href="#-keyboard-shortcuts">Shortcuts</a> ·
27
- <a href="#-development">Development</a>
28
- </p>
29
-
30
19
  ---
31
20
 
32
- ## 🚀 Quick Start
33
-
34
- ### 1. Install globally
21
+ ## Description
35
22
 
36
- ```bash
37
- npm i -g kandown
38
- ```
23
+ Kandown is a **local-first Kanban board** where your tasks live as plain Markdown files. No cloud, no account, no vendor lock-in — just a `.kandown/` folder in your project that you own forever.
39
24
 
40
- ### 2. Initialize in any project
25
+ - **Your data is portable** — tasks are `.md` files versioned with git, readable by any text editor or AI agent
26
+ - **AI-agent friendly** — Claude, Codex, Gemini, Goose, Aider, and OpenCode can read and update tasks directly
27
+ - **Dual interface** — a polished web UI + a full terminal TUI, both running entirely offline
28
+ - **Single-file deployment** — `kandown.html` is a self-contained app you can open in any browser
41
29
 
42
- ```bash
43
- cd my-project
44
- kandown init
45
- ```
30
+ ---
46
31
 
47
- ### 3. Launch your board
32
+ ## Installation
48
33
 
49
34
  ```bash
50
- kandown
35
+ npm install -g kandown
51
36
  ```
52
37
 
53
- > That's it. A local web UI opens in your browser, and an interactive board TUI appears in your terminal. All your data stays in `.kandown/` as plain markdown — versioned with git, readable by humans and AI agents alike.
38
+ **Requirements:** Node.js 18+
54
39
 
55
40
  ---
56
41
 
57
- ## 💡 Why Kandown?
58
-
59
- Most kanban tools trap your data in their cloud. Kandown does the opposite.
42
+ ## Usage
60
43
 
61
- | Traditional Kanban | Kandown |
62
- |---|---|
63
- | ☁️ Cloud-hosted, needs an account | 📁 100% local, no account |
64
- | 🔒 Proprietary data format | 📝 Plain Markdown + JSON |
65
- | 💰 Paid plans for teams | 🆓 Free & open-source (MIT) |
66
- | 🤖 No AI integration | 🤖 AI-agent native (Claude, Codex, Gemini…) |
67
- | 🔄 Requires sync/internet | 📂 Git-diffable, offline-first |
68
- | 🏗️ Backend, database, infra | 🚫 Zero backend, zero dependencies |
69
-
70
- **Your tasks are just `.md` files.** Move them, `grep` them, edit them in Vim, let an AI agent process them — they're yours.
44
+ ### Initialize in any project
71
45
 
72
- ---
73
-
74
- ## 📦 What Gets Installed
46
+ ```bash
47
+ cd my-project
48
+ kandown init
49
+ ```
75
50
 
76
- Running `kandown init` creates a `.kandown/` folder in your project:
51
+ This creates a `.kandown/` folder with:
77
52
 
78
53
  ```
79
54
  .kandown/
80
- ├── kandown.html Single-file web app (opens in any browser)
81
- ├── kandown.json Project preferences, columns, appearance
82
- ├── tasks/ One markdown file per task (source of truth)
83
- ├── AGENT.md AI-agent quick reference
84
- └── README.md ← Project-local user guide
55
+ ├── kandown.html # Single-file web app
56
+ ├── kandown.json # Project config (columns, appearance)
57
+ ├── tasks/ # One .md file per task
58
+ └── AGENT.md # AI-agent quick reference
85
59
  ```
86
60
 
87
- It also copies `AGENT_KANDOWN.md` to the project root and wires it into your `AGENTS.md` / `CLAUDE.md` so AI agents know how to manage your board automatically.
88
-
89
- ---
90
-
91
- ## ✨ Features
92
-
93
- ### Board & Views
94
-
95
- | Feature | Description |
96
- |---|---|
97
- | 🗂️ Board view | Horizontal kanban with drag-and-drop between columns |
98
- | 📋 List view | Dense table-like view with the same filters & search |
99
- | 🔍 Content search | Search titles, body, subtasks, tags, assignee, priority — with highlighted previews |
100
- | ⌨️ Command palette | `⌘K` / `Ctrl+K` for quick actions and task lookup |
101
- | 🏷️ Custom columns | Add, rename, delete columns — unknown statuses appear as temp columns |
102
- | 🗑️ Guarded deletion | Double-click the trash icon to delete — no accidental losses |
103
-
104
- ### Task Management
105
-
106
- | Feature | Description |
107
- |---|---|
108
- | ✏️ Rich task drawer | Edit title, metadata, subtasks, and body via WYSIWYG markdown editor |
109
- | ☑️ Subtasks | Full checklist support with progress tracking on cards |
110
- | 📊 Metadata fields | Priority, assignee, tags, due date, owner type — toggle each on/off |
111
- | 👤 Owner filtering | Separate human tasks from AI-agent tasks |
112
- | ⚡ External-change detection | Warns when a file was modified outside the app (Reload / Overwrite / Cancel) |
113
-
114
- ### Appearance & UX
115
-
116
- | Feature | Description |
117
- |---|---|
118
- | 🎨 5 built-in skins | Kandown, Graphite, Sage, Cobalt, Rose |
119
- | 🌗 Theme modes | Auto, Light, Dark |
120
- | 🔤 5 font stacks | Inter, System, Serif, Mono, Rounded |
121
- | 🌊 Animated backgrounds | WebGL fluid simulation (LiquidEther) |
122
- | 🔔 Notifications | Browser + in-page sound alerts for status changes, edits, subtask completions |
123
- | 🌍 48 languages | Full i18n support |
124
- | 📌 Recent projects | Stored in IndexedDB for quick reopening |
125
-
126
- ---
127
-
128
- ## 🖥️ CLI Commands
129
-
130
- ### Installation
131
-
132
- **Always install globally first:**
61
+ ### Launch the board
133
62
 
134
63
  ```bash
135
- npm install -g kandown
64
+ kandown
136
65
  ```
137
66
 
138
- Then run from any project directory. Upgrades are automatic — just run `kandown` again.
139
-
140
- ### Usage
67
+ This opens:
68
+ - A **web UI** in your browser (board view, list view, task editor)
69
+ - A **terminal TUI** for keyboard-driven workflow (works over SSH, no browser needed)
141
70
 
142
- ```bash
143
- kandown [command] [options]
144
- ```
145
-
146
- ### Commands
71
+ ### CLI Commands
147
72
 
148
73
  | Command | Description |
149
74
  |---|---|
150
- | `kandown` | Launch web UI + board TUI (recommended daily workflow) |
151
- | `kandown init` | Initialize Kandown in the current project |
152
- | `kandown board` | Open the board TUI only (no browser) |
153
- | `kandown settings` | Open the terminal settings editor |
154
- | `kandown update` | Update `kandown.html` to the latest version |
155
- | `kandown help` | Print CLI help |
156
-
157
- ### Init Options
158
-
159
- | Flag | Description |
160
- |---|---|
161
- | `--path <dir>` | Install `.kandown` at a custom location |
162
- | `--force` | Overwrite existing installation |
163
- | `--no-agents` | Skip AI agent docs setup |
164
-
165
- ### Serve Options
166
-
167
- | Flag | Description |
168
- |---|---|
169
- | `--port <number>` | Use a specific port (default: auto-scan 2048–2060) |
75
+ | `kandown` | Launch web UI + board TUI |
76
+ | `kandown init` | Initialize in current project |
77
+ | `kandown board` | TUI only (no browser) |
78
+ | `kandown settings` | Terminal settings editor |
79
+ | `kandown update` | Update `kandown.html` to latest |
80
+ | `kandown help` | CLI help |
170
81
 
171
82
  ---
172
83
 
173
- ## 📟 Board TUI
84
+ ## Features
174
85
 
175
- The board TUI is a full-screen terminal kanban built with [Ink](https://github.com/vadimdemedes/ink). Same columns and tasks as the web UI — plus the ability to launch AI agents on any task.
86
+ ### Board & Views
176
87
 
177
- ```
178
- KANDOWN tmux My Project
179
- ──────────────────────────────────────────────────────────────
180
- Backlog (3) │ Todo (2) │ In Progress │ Review (1) Done
181
- ──────────────│──────────────│──────────────│────────────│──────
182
- t9 │ t16 │ (empty) │ t18 │ ...
183
- t10 │ t7 │ │
184
- t11 │ │
185
- ```
88
+ | Feature | Description |
89
+ |---|---|
90
+ | Board view | Horizontal kanban with drag-and-drop |
91
+ | List view | Dense table with filters & search |
92
+ | Content search | Search titles, body, subtasks, tags, assignee, priority |
93
+ | Command palette | `⌘K` / `Ctrl+K` for quick actions |
94
+ | Custom columns | Add, rename, delete columns freely |
95
+ | Guarded deletion | Double-click to delete — no accidents |
186
96
 
187
- ### TUI Navigation
97
+ ### Task Management
188
98
 
189
- | Key | Action |
99
+ | Feature | Description |
190
100
  |---|---|
191
- | `h` / `l` or `←` / `→` | Move between columns |
192
- | `j` / `k` or `↑` / `↓` | Move between tasks |
193
- | `Enter` | Open task detail (scrollable) |
194
- | `a` | Launch AI agent picker |
195
- | `r` | Reload files from disk |
196
- | `q` / `Esc` | Quit or go back |
101
+ | Rich task drawer | WYSIWYG markdown editor for title, metadata, subtasks, body |
102
+ | Subtasks | Full checklist with progress tracking on cards |
103
+ | Metadata fields | Priority, assignee, tags, due date, owner type |
104
+ | Owner filtering | Filter human vs AI-agent tasks separately |
105
+ | External-change detection | Warns when files are modified outside the app |
197
106
 
198
- ---
107
+ ### Appearance & UX
199
108
 
200
- ## 🤖 AI Agent Integration
109
+ | Feature | Description |
110
+ |---|---|
111
+ | 5 built-in skins | Kandown, Graphite, Sage, Cobalt, Rose |
112
+ | Theme modes | Auto (system), Light, Dark |
113
+ | 5 font stacks | Inter, System, Serif, Mono, Rounded |
114
+ | Animated backgrounds | WebGL fluid simulation (LiquidEther) |
115
+ | 48 languages | Full i18n support |
116
+ | Notifications | Browser + sound alerts for status changes, edits, completions |
201
117
 
202
- Press `a` in the board TUI to launch an AI agent on the selected task. Kandown auto-detects installed agents and builds a context-rich prompt from `AGENT_KANDOWN.md` + the task file.
118
+ ### AI Agent Integration
203
119
 
204
- ### Supported Agents
120
+ Press `a` in the board TUI to launch an AI agent on any task. Supported agents:
205
121
 
206
122
  | Agent | Binary | Launch mode |
207
123
  |---|---|---|
208
- | **Claude Code** | `claude` | Interactive session with initial prompt |
209
- | **OpenAI Codex** | `codex` | Interactive session |
210
- | **Gemini CLI** | `gemini` | `-p` flag for initial prompt |
211
- | **Goose** | `goose` | `run --text` for non-interactive |
212
- | **Aider** | `aider` | `--message` for initial prompt |
213
- | **OpenCode** | `opencode` | TUI, context written to `/tmp` |
214
-
215
- ### How it works
216
-
217
- 1. Selecting an agent sets the task status to **In Progress**
218
- 2. A system prompt is built from `AGENT_KANDOWN.md` + the task file
219
- 3. Context is written to `/tmp/kandown-<id>-context.md`
220
- 4. **In tmux**: opens in a 50%-wide split pane (TUI stays visible)
221
- 5. **Without tmux**: exits TUI and hands the terminal to the agent
222
-
223
- > **Tip:** AI agents can also edit task files directly — Kandown detects external changes and syncs automatically.
224
-
225
- ---
226
-
227
- ## ⌨️ Keyboard Shortcuts
124
+ | Claude Code | `claude` | Interactive session |
125
+ | OpenAI Codex | `codex` | Interactive session |
126
+ | Gemini CLI | `gemini` | `-p` flag for initial prompt |
127
+ | Goose | `goose` | `run --text` for non-interactive |
128
+ | Aider | `aider` | `--message` for initial prompt |
129
+ | OpenCode | `opencode` | TUI, context written to `/tmp` |
228
130
 
229
- ### Web UI
131
+ ### Keyboard Shortcuts
230
132
 
231
133
  | Shortcut | Action |
232
134
  |---|---|
@@ -237,262 +139,72 @@ Press `a` in the board TUI to launch an AI agent on the selected task. Kandown a
237
139
  | `R` | Reload from disk |
238
140
  | `/` | Focus search |
239
141
  | `Esc` | Close drawer / palette |
240
- | `⌘S` / `Ctrl+S` | Save task in drawer |
142
+ | `⌘S` / `Ctrl+S` | Save task |
241
143
  | `⌘⌫` / `Ctrl+Backspace` | Delete task (with confirmation) |
242
144
 
243
- ---
244
-
245
- ## 📄 Data Model
145
+ ### Data Model
246
146
 
247
- ### Task files `tasks/<id>.md`
248
-
249
- Each task is a standalone markdown file with YAML frontmatter:
147
+ Each task is a standalone Markdown file:
250
148
 
251
149
  ```markdown
252
150
  ---
253
151
  id: t1
254
152
  title: Implement user auth
255
153
  status: Todo
256
- order: 0
257
154
  priority: P1
258
155
  tags: [backend, security]
259
156
  assignee: chacha
260
157
  created: 2026-04-10
261
- ownerType: human
262
158
  ---
263
159
 
264
160
  # Implement user auth
265
161
 
266
162
  ## Context
267
- Why this task exists and what it solves.
163
+ Why this task exists.
268
164
 
269
165
  ## Subtasks
270
166
  - [ ] Set up OAuth provider
271
167
  - [x] Create user model
272
168
  - [ ] Add session middleware
273
-
274
- ## Notes
275
- Extra details, links, decisions.
276
169
  ```
277
170
 
278
- ### Configuration — `kandown.json`
279
-
280
- <details>
281
- <summary>Full default configuration</summary>
282
-
283
- ```json
284
- {
285
- "ui": {
286
- "language": "en",
287
- "theme": "auto",
288
- "skin": "kandown",
289
- "font": "inter"
290
- },
291
- "agent": {
292
- "suggestFollowUp": false,
293
- "maxSuggestions": 3
294
- },
295
- "board": {
296
- "taskPrefix": "t",
297
- "defaultPriority": "P3",
298
- "defaultOwnerType": "human"
299
- },
300
- "fields": {
301
- "priority": false,
302
- "assignee": false,
303
- "tags": false,
304
- "dueDate": false,
305
- "ownerType": false,
306
- "tools": false
307
- },
308
- "notifications": {
309
- "browser": false,
310
- "sound": false,
311
- "soundId": "soft",
312
- "statusChanges": true,
313
- "taskEdits": true,
314
- "subtaskCompletions": true,
315
- "editDebounceMs": 2000
316
- }
317
- }
318
- ```
319
-
320
- </details>
321
-
322
- | Section | Key options |
323
- |---|---|
324
- | `ui` | Language (48 locales), theme mode, skin, font |
325
- | `board` | Task ID prefix, default priority/owner |
326
- | `fields` | Toggle visibility of priority, assignee, tags, due date, owner type |
327
- | `notifications` | Browser alerts, sound cues, debounce timing |
328
-
329
- Disabled fields are hidden from cards, list view, the task drawer, and metadata filters.
330
-
331
171
  ---
332
172
 
333
- ## 🌐 Browser Support
334
-
335
- | Browser | Supported |
336
- |---|---|
337
- | Chrome | ✅ |
338
- | Edge | ✅ |
339
- | Brave | ✅ |
340
- | Opera | ✅ |
341
- | Firefox | ❌ (no File System Access API) |
342
- | Safari | ❌ (no File System Access API) |
343
-
344
- > **Server mode** (run `kandown` from the CLI, no browser install needed) works in all browsers — it proxies file operations through a local REST API, bypassing the File System Access API requirement.
345
-
346
- ---
347
-
348
- ## 🎨 Appearance
349
-
350
- ### Skins
351
-
352
- | Skin | Description |
353
- |---|---|
354
- | `kandown` | Crisp neutral default |
355
- | `graphite` | Soft gray surfaces |
356
- | `sage` | Calm green-gray planning palette |
357
- | `cobalt` | Cool blue accent, restrained surfaces |
358
- | `rose` | Warm ink with rose accent |
359
-
360
- ### Theme Modes
361
-
362
- | Mode | Behavior |
363
- |---|---|
364
- | `auto` | Follows system `prefers-color-scheme` |
365
- | `light` | Force light theme |
366
- | `dark` | Force dark theme |
367
-
368
- ### Fonts
369
-
370
- | Font | Stack |
371
- |---|---|
372
- | `inter` | Inter-first sans stack |
373
- | `system` | Native platform sans stack |
374
- | `serif` | Editorial serif stack |
375
- | `mono` | Monospace stack |
376
- | `rounded` | Rounded system stack |
377
-
378
- ---
173
+ ## Contributing
379
174
 
380
- ## 🛠️ Development
175
+ Contributions are welcome! Please read the existing code style and conventions before submitting PRs.
381
176
 
382
- ### Setup
177
+ ### Development Setup
383
178
 
384
179
  ```bash
385
180
  git clone https://github.com/vava-nessa/kandown.git
386
181
  cd kandown
387
182
  pnpm install
388
- pnpm dev # Web UI at localhost:5173
183
+ pnpm dev # Web UI at localhost:5176
389
184
  ```
390
185
 
391
186
  ### Scripts
392
187
 
393
188
  | Script | Description |
394
189
  |---|---|
395
- | `pnpm dev` | Vite dev server for the web UI |
396
- | `pnpm dev:cli` | Watch-mode build for the CLI TUI |
397
- | `pnpm build` | Full build: typecheck → web app → CLI TUI |
398
- | `pnpm build:cli` | One-shot CLI TUI build |
399
- | `pnpm preview` | Preview the Vite production build |
400
- | `pnpm typecheck` | TypeScript check without emitting |
401
-
402
- ### Dev Workflow (CLI / TUI)
403
-
404
- ```bash
405
- # Terminal 1 — watch and rebuild on save
406
- pnpm dev:cli
407
-
408
- # Terminal 2 — test the board TUI
409
- node bin/kandown.js board
410
-
411
- # Or full experience (web server + browser + TUI):
412
- node bin/kandown.js --port 3000
413
- ```
414
-
415
- ### Build Output
416
-
417
- | File | Purpose |
418
- |---|---|
419
- | `dist/index.html` | Single-file web app → copied as `kandown.html` |
420
- | `bin/tui.js` | Bundled Ink TUI → used by `kandown board` and `kandown settings` |
421
-
422
- ---
423
-
424
- ## 🏗️ Architecture
425
-
426
- <details>
427
- <summary>Project structure</summary>
428
-
429
- ```
430
- kandown/
431
- ├── bin/
432
- │ ├── kandown.js # CLI entrypoint (hand-rolled, no deps)
433
- │ └── tui.js # Generated TUI bundle (tsup)
434
- ├── src/
435
- │ ├── App.tsx # Web app shell + global shortcuts
436
- │ ├── main.tsx # React/Vite browser entrypoint
437
- │ ├── cli/ # Ink terminal UI source
438
- │ │ ├── tui.tsx # Ink entrypoint (alternate screen buffer)
439
- │ │ ├── app.tsx # TUI screen router
440
- │ │ ├── lib/ # Node-side helpers (config, board, agents, launcher)
441
- │ │ └── screens/ # board.tsx, agent-picker.tsx, settings.tsx
442
- │ ├── components/ # React UI components (web)
443
- │ ├── hooks/ # React hooks
444
- │ ├── lib/ # Domain model, parser, serializer, store, theme, i18n
445
- │ └── styles/ # Tailwind layers + CSS tokens
446
- ├── templates/ # Files copied by `kandown init`
447
- ├── dist/index.html # Generated single-file web app
448
- ├── vite.config.ts
449
- ├── tsup.config.ts
450
- └── package.json
451
- ```
452
-
453
- </details>
454
-
455
- <details>
456
- <summary>Runtime flow</summary>
457
-
458
- 1. `main.tsx` mounts the React app
459
- 2. `App` renders header + board / list / settings / empty state
460
- 3. User selects a folder → File System Access API (or server mode)
461
- 4. `filesystem.ts` resolves `.kandown/`, `tasks/`, `kandown.json`
462
- 5. `store.ts` loads config, applies theme, scans tasks, saves recent project handles
463
- 6. `parser.ts` converts task markdown into typed data
464
- 7. Mutations flow back through store → `serializer.ts` → `filesystem.ts`
465
-
466
- </details>
467
-
468
- <details>
469
- <summary>Key modules</summary>
470
-
471
- | Module | Role |
472
- |---|---|
473
- | `src/lib/store.ts` | Zustand state machine — project loading, board mutations, drawer, search, config |
474
- | `src/lib/filesystem.ts` | File System Access API + IndexedDB helpers |
475
- | `src/lib/parser.ts` | Markdown parsing, subtask extraction, content search |
476
- | `src/lib/serializer.ts` | Markdown serialization |
477
- | `src/lib/theme.ts` | Theme engine — skins, fonts, CSS variables |
478
- | `src/lib/watcher.ts` | 500ms polling watcher with SHA-256 hashing for external change detection |
479
- | `src/lib/i18n/index.ts` | 48-locale translation system |
480
-
481
- </details>
190
+ | `pnpm dev` | Vite dev server for web UI |
191
+ | `pnpm dev:cli` | Watch-mode build for CLI TUI |
192
+ | `pnpm build` | Full build: typecheck → web app → CLI |
193
+ | `pnpm build:cli` | CLI TUI build only |
194
+ | `pnpm preview` | Preview production build |
195
+ | `pnpm typecheck` | TypeScript check |
482
196
 
483
197
  ---
484
198
 
485
- ## 📐 Design Constraints
199
+ ## License
486
200
 
487
- - **Local-first, backend-free** no servers, no sync vendors
488
- - **Markdown is the canonical data format** — always human-readable
489
- - **Task files are the single source of truth** — no index files to sync
490
- - **Single-file web app** — `kandown.html` bundles everything
491
- - **Project config in `kandown.json`** — columns, appearance, fields, notifications
492
- - **Browser state in IndexedDB** — only for convenience (recent project handles)
201
+ [MIT](LICENSE) use it, fork it, ship it.
493
202
 
494
203
  ---
495
204
 
496
- ## 📜 License
497
-
498
- [MIT](LICENSE) use it, fork it, ship it.
205
+ <p align="center">
206
+ <a href="#-quick-start">Quick Start</a> ·
207
+ <a href="#-features">Features</a> ·
208
+ <a href="#-cli-commands">CLI</a> ·
209
+ <a href="#-ai-agent-integration">AI Agents</a>
210
+ </p>