@fukuchang/taskchute-cli 0.1.1 → 0.2.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/CHANGELOG.md +180 -0
- package/README.md +38 -4
- package/dist/index.js +1600 -145
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,184 @@
|
|
|
2
2
|
|
|
3
3
|
このパッケージの変更履歴。[Keep a Changelog](https://keepachangelog.com/) 準拠。
|
|
4
4
|
|
|
5
|
+
## [0.2.0] - 2026-05-28 — Web パリティ完全達成 ✨
|
|
6
|
+
|
|
7
|
+
5 PR (PR1〜5) で MCP/CLI を Web 機能パリティまで拡張し、PR6 で SOLID 観点の
|
|
8
|
+
リファクタを実施。タスク操作系 5 command → 17 commands、トップレベル group
|
|
9
|
+
1 → 6 個に拡張。詳細は下記の PR 単位サブセクション。
|
|
10
|
+
|
|
11
|
+
### PR6 — 付け焼き刃清算 (refactor)
|
|
12
|
+
|
|
13
|
+
- DRY: `tasks/add.ts` / `tasks/update.ts` の手書き prefix 解決を
|
|
14
|
+
`resolveResourceIdByPrefix` に統一 (合計 -59 行)
|
|
15
|
+
- YAGNI: `tasks/update.ts` の `void date;` デッドコード除去
|
|
16
|
+
- fail-fast: `update_routine` の auditingTask undefined fallback を削除し、
|
|
17
|
+
設定ミスは早期失敗に
|
|
18
|
+
- 重複集約: 4 ファイルの error wrap パターンを `wrapDomainErrors` ヘルパー
|
|
19
|
+
(`crypto-context.ts`) に集約
|
|
20
|
+
- type predicate 化: `routines/update.ts` / `time-blocks/update.ts` の
|
|
21
|
+
status enum `as` キャストを `isRoutineStatus` / `isTimeBlockStatus` で除去
|
|
22
|
+
- 機能変更ゼロ、テスト 608 件全 pass
|
|
23
|
+
|
|
24
|
+
### PR5: 高度な task 操作 4 command / Web パリティ完全達成 ✨
|
|
25
|
+
|
|
26
|
+
PR1〜4 で揃えた基本 CRUD + リソース管理に加え、Web Today で可能な高度な操作
|
|
27
|
+
4 種を実装。これで **Web 機能パリティを完全達成**。
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- `taskchute tasks set-actual-times <id-prefix>` — 実績開始/終了時刻を直接
|
|
32
|
+
指定 (Play 押し忘れリカバリ)。`--start HH:MM --end HH:MM` で completed、
|
|
33
|
+
`--start` のみで running、`--reset` で planned リセット。`--clear-end` の
|
|
34
|
+
みでも (start は維持) 対応。end < start は日跨ぎセッション扱い
|
|
35
|
+
- `taskchute tasks interrupt <target-id-prefix> <title> --estimated <dur>` —
|
|
36
|
+
走行中タスクへの割り込み。Domain `interruptTaskWithAudit` で 3 タスクを
|
|
37
|
+
1 操作生成 + split note 3 件自動記録
|
|
38
|
+
- `taskchute tasks parallel <title> --estimated <dur> [...]` — 並列タスク
|
|
39
|
+
追加。既定で即計測開始 (running)、`--no-start-immediately` で planned 作成
|
|
40
|
+
のみ。`--background` でバックグラウンドタスク化
|
|
41
|
+
- `taskchute tasks reorder <id-prefix> --order-index <n> [...]` — 並び順を
|
|
42
|
+
直接指定 (慣習 10 単位)。`--scheduled HH:MM` 同時指定で別タイムブロック
|
|
43
|
+
へ移動、`--clear-scheduled` で未割当グループへ
|
|
44
|
+
|
|
45
|
+
### 全 PR 達成サマリー
|
|
46
|
+
|
|
47
|
+
- PR1: Task CRUD 拡張 (4 → 9 command)
|
|
48
|
+
- PR2: List 5 group + tasks recent + audit lookups 有効化
|
|
49
|
+
- PR3: Project / Tag / Context CRUD 12 command
|
|
50
|
+
- PR4: Routine + TimeBlock CRUD 8 command + propagation
|
|
51
|
+
- **PR5: 高度な task 操作 4 command / Web パリティ完全達成 ✨**
|
|
52
|
+
|
|
53
|
+
### PR4: Routine + TimeBlock CRUD 8 command / propagation 含む
|
|
54
|
+
|
|
55
|
+
Web の Routine / TimeBlock ページの write 操作を CLI から完結できるよう拡張。
|
|
56
|
+
2 リソース × 4 op を追加 (各 group の list と合わせ 5 op に)。
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- `taskchute routines create <title> --estimated <dur> --frequency <spec> [...]`
|
|
61
|
+
— ルーチン新規作成。`--frequency` の短縮表記は parse-frequency.ts で解釈
|
|
62
|
+
(`daily` / `weekly:1,3,5` / `monthly:1,15` / `custom:CRON_STRING`)
|
|
63
|
+
- `taskchute routines update <id-prefix> [...]` — 部分更新。**未来 planned
|
|
64
|
+
task に自動伝播**。`auditingTask` 経由で `routine-propagation` cause を
|
|
65
|
+
audit に記録 (CLI でも Web と同じ挙動)。`propagated to N future task(s)`
|
|
66
|
+
を結果メッセージに含める
|
|
67
|
+
- `taskchute routines archive <id-prefix>` — アーカイブ (既存 task の
|
|
68
|
+
routine_id 維持)
|
|
69
|
+
- `taskchute routines delete <id-prefix>` (alias `rm`) — 物理削除 (task の
|
|
70
|
+
routine_id は NULL 化)
|
|
71
|
+
- `taskchute time-blocks create <name> --start-time HH:MM --end-time HH:MM
|
|
72
|
+
--weekdays 1,2,3,4,5 [...]` — タイムブロック新規作成
|
|
73
|
+
- `taskchute time-blocks update / archive / delete (rm)` (同パターン)
|
|
74
|
+
- `src/format/parse-frequency.ts` を新設。`parseFrequencySpec` で `--frequency`
|
|
75
|
+
の短縮表記を domain の discriminated union に変換。`parseWeekdaysList` で
|
|
76
|
+
`--weekdays 1,2,3` を `number[]` に変換 (0-6 範囲チェック込み)
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
79
|
+
|
|
80
|
+
- `src/resolve-resource-id.ts` の `NamedResource` を `LabeledResource` に
|
|
81
|
+
汎化 (`{id, name}` または `{id, title}`)。Routine は title 持ち、その他は
|
|
82
|
+
name 持ちなので、duck-typing で受け取り曖昧時表示用ラベルを存在する方から拾う
|
|
83
|
+
|
|
84
|
+
### PR3: Project / Tag / Context CRUD 12 command
|
|
85
|
+
|
|
86
|
+
Web の Project / Tag / Context ページの write 操作を CLI から完結できるよう拡張。
|
|
87
|
+
3 リソース × 4 op (create / update / archive / delete) を追加。
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
|
|
91
|
+
- `taskchute projects create <name>` — プロジェクト新規作成 (`--description` /
|
|
92
|
+
`--color` / `--parent <prefix>` / `--started-at YYYY-MM-DD` /
|
|
93
|
+
`--target-end YYYY-MM-DD`)
|
|
94
|
+
- `taskchute projects update <id-prefix>` — 部分更新。`--clear-*` で明示クリア。
|
|
95
|
+
自己参照は `A project cannot be its own parent.` エラー
|
|
96
|
+
- `taskchute projects archive <id-prefix>` — アーカイブ (タスクの project_id 維持)
|
|
97
|
+
- `taskchute projects delete <id-prefix>` (alias `rm`) — 物理削除 (タスクの
|
|
98
|
+
project_id は `ON DELETE SET NULL` で自動 NULL 化、子プロジェクトの
|
|
99
|
+
parent_project_id も NULL 化)
|
|
100
|
+
- `taskchute tags create / update / archive / delete` (同パターン)
|
|
101
|
+
- `taskchute contexts create / update / archive / delete` (icon フィールドあり)
|
|
102
|
+
- `src/resolve-resource-id.ts` を新設。`resolveTaskIdByPrefix` と同じ趣旨の
|
|
103
|
+
リソース汎用 prefix 解決ヘルパー。MIN_PREFIX_LENGTH=4 統一、曖昧プレフィックス時
|
|
104
|
+
は候補一覧を `id name` で表示
|
|
105
|
+
|
|
106
|
+
### Notes
|
|
107
|
+
|
|
108
|
+
- tag delete はタスクの `tag_ids` 配列 (UUID[]) に**孤児 id**を残す。UI 表示時
|
|
109
|
+
に「不明なタグ」扱いになるので、履歴尊重なら `archive` を使うこと
|
|
110
|
+
(description / README に明示)
|
|
111
|
+
|
|
112
|
+
### PR2: List 6 種 + tasks recent
|
|
113
|
+
|
|
114
|
+
Web の Today / Resource ページで参照できる一覧を CLI からも引けるよう拡張。
|
|
115
|
+
tasks 配下に `recent` を追加 + 新規トップレベルコマンドグループ 5 つ
|
|
116
|
+
(`projects` / `tags` / `contexts` / `routines` / `time-blocks`) を追加。
|
|
117
|
+
|
|
118
|
+
### Added
|
|
119
|
+
|
|
120
|
+
- `taskchute projects list` (alias `ls`) — プロジェクト一覧。`--archived` /
|
|
121
|
+
`--all` で表示範囲切替
|
|
122
|
+
- `taskchute tags list` — タグ一覧
|
|
123
|
+
- `taskchute contexts list` — コンテキスト一覧
|
|
124
|
+
- `taskchute routines list` — ルーチン一覧。`--paused` / `--archived` / `--all`。
|
|
125
|
+
`frequency` は `weekly:1,3,5` のような短縮表記で表示
|
|
126
|
+
- `taskchute time-blocks list` — タイムブロック一覧。`weekdays` は日月火水木金土の
|
|
127
|
+
漢字 1 文字で表示 (例: `月火水木金`)
|
|
128
|
+
- `taskchute tasks recent [--days 90] [--query <text>] [--limit 100]` —
|
|
129
|
+
過去 N 日のタスク。`--query` で fuzzy match (ひらがな↔カタカナ正規化込み)
|
|
130
|
+
- 5 つの format helper (`project-row` / `tag-row` / `context-row` /
|
|
131
|
+
`routine-row` / `time-block-row`) を新設
|
|
132
|
+
|
|
133
|
+
### Changed
|
|
134
|
+
|
|
135
|
+
- `taskchute --help` のトップレベルに 5 コマンドグループ追加
|
|
136
|
+
(`projects` / `tags` / `contexts` / `routines` / `time-blocks`)
|
|
137
|
+
- audit 機構が CLI 経由でも有効化された (PR2 で `createNodeAppContext` が
|
|
138
|
+
`getLookups` を渡すように変更)。`taskchute tasks update` を実行すると
|
|
139
|
+
TaskNote に変更履歴が自動記録される
|
|
140
|
+
|
|
141
|
+
### PR1: Task CRUD パリティ
|
|
142
|
+
|
|
143
|
+
Web の Today で当たり前にできる task 操作を CLI からも全部できるよう拡張。
|
|
144
|
+
タスク操作系 5 command → **9 command** に。
|
|
145
|
+
|
|
146
|
+
### Added
|
|
147
|
+
|
|
148
|
+
- `taskchute tasks update <id-prefix>` — フィールド部分更新。flag は
|
|
149
|
+
`--title` / `--description` / `--clear-description` / `--estimated <duration>` /
|
|
150
|
+
`--project <prefix>` / `--clear-project` / `--context <prefix>` /
|
|
151
|
+
`--clear-context` / `--tag <prefix>` (繰り返し可) / `--no-tags` /
|
|
152
|
+
`--scheduled HH:MM` / `--clear-scheduled` / `--notify` / `--no-notify` /
|
|
153
|
+
`--background` / `--no-background`。`--clear-X` で明示クリア、`--no-tags` で
|
|
154
|
+
全タグ外し。
|
|
155
|
+
- `taskchute tasks delete <id-prefix>` (alias `rm`) — タスク削除。既定は
|
|
156
|
+
Routine 由来タスクを今日以降に消す時 `routine_expansions` に skip 記録、
|
|
157
|
+
`--hard` で物理削除のみ。
|
|
158
|
+
- `taskchute tasks skip <id-prefix>` — タスクをスキップ (status → skipped)。
|
|
159
|
+
- `taskchute tasks reopen <id-prefix>` — completed / skipped を planned に
|
|
160
|
+
戻す。
|
|
161
|
+
|
|
162
|
+
### Changed
|
|
163
|
+
|
|
164
|
+
- `taskchute tasks add <title>` に `--project` / `--context` / `--tag` /
|
|
165
|
+
`--scheduled` / `--notify` / `--background` flag を追加。project / context /
|
|
166
|
+
tag は id prefix で指定可能 (4 文字以上、曖昧なら候補表示)。
|
|
167
|
+
|
|
168
|
+
## [0.1.2] - 2026-05-23
|
|
169
|
+
|
|
170
|
+
### Fixed
|
|
171
|
+
|
|
172
|
+
- `taskchute --version` が `0.0.0` を表示していたバグを修正。
|
|
173
|
+
`src/index.ts` に literal 文字列で書いていたバージョンを、tsup の
|
|
174
|
+
`define` 機能で build 時に `package.json` の version に置換するように
|
|
175
|
+
変更。以降は version bump 時に build を走らせれば CLI 表示も自動
|
|
176
|
+
追従する。
|
|
177
|
+
|
|
178
|
+
### Added
|
|
179
|
+
|
|
180
|
+
- `src/build-globals.d.ts`: tsup が build 時に置換する識別子
|
|
181
|
+
(`__PKG_VERSION__`) の TypeScript 型定義。
|
|
182
|
+
|
|
5
183
|
## [0.1.1] - 2026-05-23
|
|
6
184
|
|
|
7
185
|
### Changed
|
|
@@ -57,5 +235,7 @@
|
|
|
57
235
|
`.github/workflows/publish-cli.yml` workflow からのみ publish 可能な
|
|
58
236
|
構成に切り替えた。
|
|
59
237
|
|
|
238
|
+
[0.2.0]: https://github.com/fukuchang/TaskChute/releases/tag/cli-v0.2.0
|
|
239
|
+
[0.1.2]: https://github.com/fukuchang/TaskChute/releases/tag/cli-v0.1.2
|
|
60
240
|
[0.1.1]: https://github.com/fukuchang/TaskChute/releases/tag/cli-v0.1.1
|
|
61
241
|
[0.1.0]: https://github.com/fukuchang/TaskChute/releases/tag/cli-v0.1.0
|
package/README.md
CHANGED
|
@@ -76,10 +76,44 @@ taskchute tasks done <taskId-or-index>
|
|
|
76
76
|
| `taskchute unlock` | E2EE passphrase を keyring に保存し、以降のコマンドを対話なしに走らせる |
|
|
77
77
|
| `taskchute lock` | keyring から passphrase を削除 (session は維持) |
|
|
78
78
|
| `taskchute tasks list [--date YYYY-MM-DD]` | タスク一覧表示 |
|
|
79
|
-
| `taskchute tasks add <title> [--
|
|
80
|
-
| `taskchute tasks
|
|
81
|
-
| `taskchute tasks
|
|
82
|
-
| `taskchute tasks
|
|
79
|
+
| `taskchute tasks add <title> [--estimated 30m] [--date <date>] [--project <prefix>] [--context <prefix>] [--tag <prefix>...] [--scheduled HH:MM] [--description <text>] [--notify] [--background]` | タスク追加 |
|
|
80
|
+
| `taskchute tasks update <id-prefix> [--title ...] [--description ...] [--clear-description] [--estimated 1h] [--project <prefix>] [--clear-project] [--context <prefix>] [--clear-context] [--tag <prefix>...] [--no-tags] [--scheduled HH:MM] [--clear-scheduled] [--notify] [--no-notify] [--background] [--no-background]` | フィールド部分更新。`--clear-X` で明示クリア、`--no-tags` で全タグ外し |
|
|
81
|
+
| `taskchute tasks delete <id-prefix> [--hard]` / `rm` | タスク削除。既定は Routine 由来なら今日以降は skip 記録、`--hard` で物理削除のみ |
|
|
82
|
+
| `taskchute tasks start <id-prefix>` | タスク開始 |
|
|
83
|
+
| `taskchute tasks pause <id-prefix>` | タスク中断 |
|
|
84
|
+
| `taskchute tasks done <id-prefix>` | タスク完了 |
|
|
85
|
+
| `taskchute tasks skip <id-prefix>` | タスクをスキップ (status → skipped) |
|
|
86
|
+
| `taskchute tasks reopen <id-prefix>` | completed / skipped を planned に戻す |
|
|
87
|
+
| `taskchute tasks recent [--days 90] [--query <text>] [--limit 100]` | 過去 N 日のタスク (fuzzy match 対応) |
|
|
88
|
+
| `taskchute projects list [--archived | --all]` | プロジェクト一覧 |
|
|
89
|
+
| `taskchute tags list [--archived | --all]` | タグ一覧 |
|
|
90
|
+
| `taskchute contexts list [--archived | --all]` | コンテキスト一覧 |
|
|
91
|
+
| `taskchute routines list [--paused | --archived | --all]` | ルーチン一覧 (frequency は `weekly:1,3,5` のような短縮表記で表示) |
|
|
92
|
+
| `taskchute time-blocks list [--archived | --all]` | タイムブロック一覧 |
|
|
93
|
+
| `taskchute projects create <name> [--description ...] [--color ...] [--parent <prefix>] [--started-at YYYY-MM-DD] [--target-end YYYY-MM-DD]` | プロジェクト新規作成 |
|
|
94
|
+
| `taskchute projects update <id-prefix> [--name ...] [--description ...] [--clear-description] [--color ...] [--clear-color] [--parent <prefix>] [--clear-parent] [--started-at YYYY-MM-DD] [--clear-started-at] [--target-end YYYY-MM-DD] [--clear-target-end]` | プロジェクト部分更新 |
|
|
95
|
+
| `taskchute projects archive <id-prefix>` | アーカイブ (タスクの project_id 維持) |
|
|
96
|
+
| `taskchute projects delete <id-prefix>` / `rm` | 物理削除 (タスクの project_id は NULL 化) |
|
|
97
|
+
| `taskchute tags create <name> [--description ...] [--color ...]` | タグ新規作成 |
|
|
98
|
+
| `taskchute tags update <id-prefix> [--name ...] [--description ...] [--clear-description] [--color ...] [--clear-color]` | タグ部分更新 |
|
|
99
|
+
| `taskchute tags archive <id-prefix>` | アーカイブ (タスクの tag_ids 配列維持) |
|
|
100
|
+
| `taskchute tags delete <id-prefix>` / `rm` | 物理削除 (tag_ids 配列に孤児 id が残るので注意) |
|
|
101
|
+
| `taskchute contexts create <name> [--description ...] [--icon ...] [--color ...]` | コンテキスト新規作成 |
|
|
102
|
+
| `taskchute contexts update <id-prefix> [--name ...] [--description ...] [--clear-description] [--icon ...] [--clear-icon] [--color ...] [--clear-color]` | コンテキスト部分更新 |
|
|
103
|
+
| `taskchute contexts archive <id-prefix>` | アーカイブ |
|
|
104
|
+
| `taskchute contexts delete <id-prefix>` / `rm` | 物理削除 (タスクの context_id は NULL 化) |
|
|
105
|
+
| `taskchute routines create <title> --estimated <dur> --frequency <spec> [...]` | ルーチン新規作成。`--frequency` は `daily` / `weekly:1,3,5` / `monthly:1,15` / `custom:CRON` |
|
|
106
|
+
| `taskchute routines update <id-prefix> [...]` | ルーチン部分更新 (**未来 planned task に自動伝播**) |
|
|
107
|
+
| `taskchute routines archive <id-prefix>` | アーカイブ (既存 task の routine_id 維持) |
|
|
108
|
+
| `taskchute routines delete <id-prefix>` / `rm` | 物理削除 (task の routine_id は NULL 化) |
|
|
109
|
+
| `taskchute time-blocks create <name> --start-time HH:MM --end-time HH:MM --weekdays 1,2,3 [...]` | タイムブロック新規作成 (`weekdays` は 0=日 ~ 6=土) |
|
|
110
|
+
| `taskchute time-blocks update <id-prefix> [...]` | タイムブロック部分更新 |
|
|
111
|
+
| `taskchute time-blocks archive <id-prefix>` | アーカイブ |
|
|
112
|
+
| `taskchute time-blocks delete <id-prefix>` / `rm` | 物理削除 |
|
|
113
|
+
| `taskchute tasks set-actual-times <id-prefix> [--start HH:MM] [--end HH:MM] [--clear-start] [--clear-end] [--reset]` | 実績開始/終了時刻を直接指定 (Play 押し忘れリカバリ用) |
|
|
114
|
+
| `taskchute tasks interrupt <target-id-prefix> <title> --estimated <dur> [...]` | 走行中タスクを「割り込み」で分割 (3 タスクを 1 操作で生成) |
|
|
115
|
+
| `taskchute tasks parallel <title> --estimated <dur> [--no-start-immediately] [--background] [...]` | 並列タスク追加 (既定で即計測開始) |
|
|
116
|
+
| `taskchute tasks reorder <id-prefix> --order-index <n> [--scheduled HH:MM] [--clear-scheduled]` | 並び順 (orderIndex) と所属タイムブロックを直接指定 |
|
|
83
117
|
|
|
84
118
|
詳細オプションは `taskchute <command> --help` で確認。
|
|
85
119
|
|