recent-project-checker 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yuki Shindo
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.ja.md ADDED
@@ -0,0 +1,256 @@
1
+ # recent-project-checker
2
+
3
+ ![Logo](https://github.com/shinshin86/recent-project-checker/raw/main/images/logo.png)
4
+
5
+ シェル履歴から最近作業していたプロジェクトを推定し、再開しやすい順にランキング表示する CLI ツールです。
6
+
7
+ [English README (README.md)](README.md)
8
+
9
+ ## Install
10
+
11
+ インストール不要で試す:
12
+
13
+ ```bash
14
+ npx recent-project-checker --root ~/projects
15
+ ```
16
+
17
+ グローバルインストール:
18
+
19
+ ```bash
20
+ npm install -g recent-project-checker
21
+ ```
22
+
23
+ `recent-project-checker` と短縮エイリアス `recent-projects` の 2 つのコマンドが登録されます。
24
+
25
+ ## Quick Start
26
+
27
+ ```bash
28
+ # 最近のプロジェクトをランキング表示(テキスト出力)
29
+ recent-project-checker --root ~/projects
30
+
31
+ # アクセス回数順で並べる
32
+ recent-project-checker --root ~/projects --sort count
33
+
34
+ # ローカル Web UI をブラウザで開く
35
+ recent-project-checker --root ~/projects --web --open
36
+ ```
37
+
38
+ ## Features
39
+
40
+ - `--root` 配下の `<root>/<project>/...` 構造からプロジェクトルートを推定
41
+ - シェルコマンドから候補パスを抽出: `cd`, `pushd`, `git -C`, `git clone`, `make -C`, `docker compose -f`, `npm/pnpm/yarn --prefix|--cwd`, エディタ起動コマンド
42
+ - `mkdir <dir> -> cd <dir> -> git init` のような新規作成フローも候補化
43
+ - 頻度 + 最近性を組み合わせたスコアでランキング
44
+ - `score` / `count` / `recent` / `timeline` でソート可能
45
+ - テキストまたは構造化 JSON で出力(`--format text|json`)
46
+ - ローカル Web UI 内蔵(`--web` / `--ui`)、フィルタリングとライブ再集計対応
47
+ - 出現回数(`--min-count`)や期間(`--days`)でフィルタ
48
+
49
+ ## Usage
50
+
51
+ ### Options
52
+
53
+ | オプション | 説明 | デフォルト |
54
+ |---|---|---|
55
+ | `--root <path>` | **必須。** プロジェクトを含むルートディレクトリ。 | — |
56
+ | `--days <n>` | 集計対象の履歴日数。 | `60` |
57
+ | `--limit <n>` | 表示する最大件数。 | `100` |
58
+ | `--max-results <n>` | `--limit` の別名。 | `100` |
59
+ | `--min-count <n>` | 候補に含める最低出現回数。 | `1` |
60
+ | `--history <mode>` | 履歴ソース: `auto`, `zsh`, `bash`, `file`。 | `auto` |
61
+ | `--file <path>` | 履歴ファイルのパス(`--history file` 時に必須)。 | — |
62
+ | `--format <mode>` | 出力形式: `text` または `json`。 | `text` |
63
+ | `--sort <mode>` | ソート: `score`, `count`, `recent`, `timeline`。 | `score` |
64
+ | `--web`, `--ui` | 解析後にローカル Web UI を起動。 | — |
65
+ | `--host <host>` | Web サーバーのホスト。 | `127.0.0.1` |
66
+ | `--port <n>` | Web サーバーのポート。 | `4173` |
67
+ | `--allow-remote` | ループバック以外のホストを許可(`--token` 必須)。 | — |
68
+ | `--token <value>` | リモート公開時の Web UI/API アクセストークン。 | — |
69
+ | `--open` | ブラウザを自動起動。 | — |
70
+ | `--no-open` | ブラウザを自動起動しない。 | (デフォルト) |
71
+ | `--help`, `-h` | ヘルプを表示。 | — |
72
+
73
+ ### Examples
74
+
75
+ ```bash
76
+ # 直近 90 日に絞り、上位 40 件を表示
77
+ recent-project-checker --root ~/projects --days 90 --limit 40
78
+
79
+ # 特定の履歴ファイルを読み込み、JSON で出力
80
+ recent-project-checker --root ~/projects --history file --file /path/to/.zsh_history --format json
81
+
82
+ # 2 回以上アクセスしたプロジェクトのみ表示
83
+ recent-project-checker --root /work/projects --min-count 2
84
+
85
+ # 最終アクセス順で Web UI を起動
86
+ recent-project-checker --root ~/projects --sort recent --web
87
+
88
+ # LAN に公開(トークン必須)
89
+ recent-project-checker --root ~/projects --web --host 0.0.0.0 --allow-remote --token 'your-token'
90
+
91
+ # 起動後、Web UI の token 欄にトークンを入力
92
+ ```
93
+
94
+ ## Web UI (`--web` / `--ui`)
95
+
96
+ ```bash
97
+ recent-project-checker --root ~/projects --web
98
+ ```
99
+
100
+ - `http://127.0.0.1:4173` でローカル HTTP サーバーを起動します(デフォルトではブラウザを**自動起動しません**。`--open` で自動起動できます)。
101
+ - フィルター入力欄でプロジェクト名を素早く絞り込めます。
102
+ - UI 上で `days`、`limit`、`min-count`、`sort` を変更し、その場で再集計できます。
103
+ - 各行の **copy** を押すと `cd "<repo-path>"` をクリップボードにコピーします。
104
+ - ポートが衝突する場合は `--port` で変更してください。
105
+ - 基本的には localhost での利用を想定しています。
106
+ - ループバック以外で待受ける場合は `--allow-remote --token <value>` を併用し、Web UI の token 欄に入力してください。
107
+ - リモート公開時は平文 HTTP なので、信頼できるネットワーク内でのみ利用するか、HTTPS/TLS 終端の背後で運用してください。
108
+ - API クライアントからは `x-rpc-token` または `Authorization: Bearer <token>` ヘッダでトークンを送信してください。
109
+
110
+ ## How it works
111
+
112
+ ### Root structure
113
+
114
+ `recent-project-checker` は以下の構造でリポジトリを推定します:
115
+
116
+ ```
117
+ <root>/<project>/...
118
+ ```
119
+
120
+ 例:
121
+
122
+ - `/workspace/cli-tool/src` -> プロジェクトルートは `/workspace/cli-tool`
123
+ - `mkdir my-new-app && cd my-new-app && git init` の場合も、`--root` 配下であれば候補として登録されます。
124
+
125
+ ### Processing pipeline
126
+
127
+ 1. 履歴ファイルを読み込み(`--history auto` の場合、`~/.zsh_history` と `~/.bash_history` を順に探索)。
128
+ 2. 各コマンドを解析し、関連パスを抽出。
129
+ 3. `--root` 配下のパスのみ残し、プロジェクト単位に正規化。
130
+ 4. `mkdir -> cd -> git init` フローからも候補を追加。
131
+ 5. プロジェクトごとに `count` と最終アクセス時刻を集計。
132
+ 6. スコアを算出してソート。
133
+
134
+ ### パス判定ルール
135
+
136
+ - 候補パスは、パスを伴うコマンドのみから抽出します: `cd`, `pushd`, `git -C`, `git clone`, `make -C`, `docker compose -f`, `npm/pnpm/yarn --prefix|--cwd`, エディタ起動コマンド(`code`, `vim`, `nvim`, `open`, `cursor`, `subl`)。
137
+ - `--sort recent` は並び順のみを変更します。表示されるには、まず抽出・フィルタ条件を通過している必要があります。
138
+ - `--root` の外側のパスは除外します。
139
+ - 通常のコマンド由来パスは `<root>/<root配下の先頭セグメント>` に正規化します。
140
+ - `mkdir <dir> -> cd <dir> -> git init` の場合は、`git init` されたディレクトリ自体(`--root` 配下のネスト含む)を候補として保持します。
141
+
142
+ ### 疑似 cwd 追跡
143
+
144
+ 各履歴ファイルごとに、コマンドを先頭から順に読みながら疑似 `cwd` を更新します。
145
+
146
+ - 初期 `cwd` は `--root` です。
147
+ - `cd` はシェルに近いルールで疑似 `cwd` を更新します:
148
+ - `cd` または `cd --` -> `$HOME`
149
+ - `cd -` -> 直前の `cwd`
150
+ - `cd <relative|absolute>` -> 解決後のパス
151
+ - `pushd <path>` でも疑似 `cwd` を更新します。
152
+ - 安全策として、遷移先が「実在ディレクトリ」または同一履歴内で先に `mkdir` 済みのときだけ更新します。
153
+
154
+ ### Scoring
155
+
156
+ ```
157
+ score = log2(1 + count) + recency
158
+ recency = max(0, 1.2 - 経過日数 / 30)
159
+ ```
160
+
161
+ `zsh` では履歴内タイムスタンプを使用します。
162
+ `bash` の通常形式にタイムスタンプがない場合は、行の位置から簡易推定を行い `--days` フィルタに対応します。
163
+
164
+ ## JSON output (`--format json`)
165
+
166
+ ```json
167
+ {
168
+ "generatedAt": "2026-02-13T00:00:00.000Z",
169
+ "options": {
170
+ "root": "...",
171
+ "historyFiles": ["..."],
172
+ "days": 60,
173
+ "minCount": 1,
174
+ "limit": 100,
175
+ "sort": "score",
176
+ "format": "json",
177
+ "version": "0.1.0"
178
+ },
179
+ "results": [
180
+ {
181
+ "repo": "/path/to/root/owner/repo",
182
+ "count": 3,
183
+ "last": {
184
+ "unix": 1700000000,
185
+ "iso": "2024-11-14T22:13:20.000Z"
186
+ },
187
+ "score": 4.2
188
+ }
189
+ ]
190
+ }
191
+ ```
192
+
193
+ ## Troubleshooting
194
+
195
+ - **履歴に `cd` が少ない / 検出されない**
196
+ `--days` を広げるか、`--history file --file <path>` で別の履歴ファイルを指定してみてください。
197
+ - **`bash` 履歴にタイムスタンプがない**
198
+ zsh の履歴ソースが使える場合はそちらを使用するか、`--days` を大きくしてください。`HISTTIMEFORMAT` で拡張履歴を有効化すると推定精度が上がります。
199
+ - **`--root` の配下が `<root>/<project>` 形式でない**
200
+ `--root` の指定や階層構造を見直してください。
201
+ - **テキストと JSON で表示が違う**
202
+ ランキングロジックは同一です。表示形式の違いのみです。
203
+
204
+ ## Requirements
205
+
206
+ - Node.js >= 18
207
+ - macOS / Linux(Windows は主要ターゲットではありませんが、パス処理は安全に劣化するよう設計されています)
208
+
209
+ ## Development
210
+
211
+ ソースから直接実行(インストール不要):
212
+
213
+ ```bash
214
+ node src/cli.js --root ~/projects
215
+ ```
216
+
217
+ リポジトリからローカルインストール:
218
+
219
+ ```bash
220
+ npm install -g .
221
+ ```
222
+
223
+ ### Testing
224
+
225
+ ```bash
226
+ npm test
227
+ ```
228
+
229
+ テストスイートの構成:
230
+
231
+ - 単体テスト(20 件以上): `parseZshLine`, `extractDirsFromCmd`, `toRepoRoot`, スコアリング, 引数パース
232
+ - E2E テスト(2 件以上): テキスト出力, JSON 出力
233
+
234
+ ### Lint & Format
235
+
236
+ ```bash
237
+ npm run lint
238
+ npm run format
239
+ ```
240
+
241
+ <details>
242
+ <summary>Design decisions and alternatives</summary>
243
+
244
+ - **`--root` は常に必須** — 環境固有パスをハードコードせず、誤検出を防止しています。
245
+ - 代替案: `~/workspace` などをデフォルト値にすることも可能ですが、誤検出のリスクが高いと判断しました。
246
+ - **`--max-results` は `--limit` の別名** — 互換性を維持しつつオプションの重複を回避しています。
247
+ - 代替案: 片方を廃止する方法もありますが、既存の呼び出しを壊す可能性があります。
248
+ - **`bash` タイムスタンプの位置ベースフォールバック** — `bash` 履歴にタイムスタンプがない場合、行の位置から概算で推定します。
249
+ - 代替案: シェルレベルのトレース解析でより高精度にできますが、現段階ではコスト対効果に見合いません。
250
+ - **本ツールは完全復元ではなく「再開支援」のためのヒント生成ツールです。** 依存は意図的に最小限にしています。
251
+
252
+ </details>
253
+
254
+ ## License
255
+
256
+ MIT
package/README.md ADDED
@@ -0,0 +1,256 @@
1
+ # recent-project-checker
2
+
3
+ ![Logo](https://github.com/shinshin86/recent-project-checker/raw/main/images/logo.png)
4
+
5
+ Estimate recently used projects from shell history and show a ranked list to quickly resume work.
6
+
7
+ [日本語版 README はこちら (README.ja.md)](README.ja.md)
8
+
9
+ ## Install
10
+
11
+ Try without installing:
12
+
13
+ ```bash
14
+ npx recent-project-checker --root ~/projects
15
+ ```
16
+
17
+ Or install globally:
18
+
19
+ ```bash
20
+ npm install -g recent-project-checker
21
+ ```
22
+
23
+ The package registers two commands: `recent-project-checker` and the shorter alias `recent-projects`.
24
+
25
+ ## Quick Start
26
+
27
+ ```bash
28
+ # Ranked list of recent projects (text output)
29
+ recent-project-checker --root ~/projects
30
+
31
+ # Sort by how many times each project was accessed
32
+ recent-project-checker --root ~/projects --sort count
33
+
34
+ # Open the local Web UI in your browser
35
+ recent-project-checker --root ~/projects --web --open
36
+ ```
37
+
38
+ ## Features
39
+
40
+ - Infers project roots under `--root` using the `<root>/<project>/...` structure
41
+ - Extracts candidate paths from shell commands: `cd`, `pushd`, `git -C`, `git clone`, `make -C`, `docker compose -f`, `npm/pnpm/yarn --prefix|--cwd`, and editor launchers
42
+ - Detects newly created projects from `mkdir <dir> -> cd <dir> -> git init` flows
43
+ - Ranks candidates by a combined frequency + recency score
44
+ - Supports sorting by `score`, `count`, `recent`, and `timeline`
45
+ - Outputs text or structured JSON (`--format text|json`)
46
+ - Built-in local Web UI (`--web` / `--ui`) with filtering and live re-aggregation
47
+ - Filters by minimum occurrences (`--min-count`) and date range (`--days`)
48
+
49
+ ## Usage
50
+
51
+ ### Options
52
+
53
+ | Option | Description | Default |
54
+ |---|---|---|
55
+ | `--root <path>` | **Required.** Root directory containing project directories. | — |
56
+ | `--days <n>` | Number of days of history to consider. | `60` |
57
+ | `--limit <n>` | Maximum number of results to show. | `100` |
58
+ | `--max-results <n>` | Alias for `--limit`. | `100` |
59
+ | `--min-count <n>` | Minimum times a candidate must appear. | `1` |
60
+ | `--history <mode>` | History source: `auto`, `zsh`, `bash`, or `file`. | `auto` |
61
+ | `--file <path>` | Path to history file (required when `--history file`). | — |
62
+ | `--format <mode>` | Output format: `text` or `json`. | `text` |
63
+ | `--sort <mode>` | Sort mode: `score`, `count`, `recent`, or `timeline`. | `score` |
64
+ | `--web`, `--ui` | Start local Web UI after analysis. | — |
65
+ | `--host <host>` | Host for the web server. | `127.0.0.1` |
66
+ | `--port <n>` | Port for the web server. | `4173` |
67
+ | `--allow-remote` | Allow non-loopback host (requires `--token`). | — |
68
+ | `--token <value>` | Access token for Web UI/API when remote. | — |
69
+ | `--open` | Open browser automatically. | — |
70
+ | `--no-open` | Do not open browser automatically. | (default) |
71
+ | `--help`, `-h` | Show help. | — |
72
+
73
+ ### Examples
74
+
75
+ ```bash
76
+ # Narrow to last 90 days, show top 40
77
+ recent-project-checker --root ~/projects --days 90 --limit 40
78
+
79
+ # Read a specific history file and output JSON
80
+ recent-project-checker --root ~/projects --history file --file /path/to/.zsh_history --format json
81
+
82
+ # Only show projects accessed 2+ times
83
+ recent-project-checker --root /work/projects --min-count 2
84
+
85
+ # Web UI sorted by most recent access
86
+ recent-project-checker --root ~/projects --sort recent --web
87
+
88
+ # Expose Web UI to LAN (token required)
89
+ recent-project-checker --root ~/projects --web --host 0.0.0.0 --allow-remote --token 'your-token'
90
+
91
+ # Then enter the token in the Web UI token field
92
+ ```
93
+
94
+ ## Web UI (`--web` / `--ui`)
95
+
96
+ ```bash
97
+ recent-project-checker --root ~/projects --web
98
+ ```
99
+
100
+ - Starts a local HTTP server at `http://127.0.0.1:4173` (browser is **not** opened by default; use `--open` to auto-launch).
101
+ - Filter input to quickly narrow project names.
102
+ - Adjust `days`, `limit`, `min-count`, and `sort` in the UI, then re-aggregate on the fly.
103
+ - Click **copy** to copy `cd "<repo-path>"` to the clipboard.
104
+ - If the port is busy, specify another with `--port`.
105
+ - This feature is primarily intended for localhost use.
106
+ - For non-loopback hosts, use `--allow-remote --token <value>`, then enter the token in the UI token field.
107
+ - Remote mode serves plain HTTP; use only trusted networks or place it behind HTTPS/TLS.
108
+ - For API clients, send token via `x-rpc-token` or `Authorization: Bearer <token>` header.
109
+
110
+ ## How it works
111
+
112
+ ### Root structure
113
+
114
+ `recent-project-checker` assumes repositories live under:
115
+
116
+ ```
117
+ <root>/<project>/...
118
+ ```
119
+
120
+ For example:
121
+
122
+ - `/workspace/cli-tool/src` -> project root is `/workspace/cli-tool`
123
+ - `mkdir my-new-app && cd my-new-app && git init` also registers the new directory as a candidate under `--root`.
124
+
125
+ ### Processing pipeline
126
+
127
+ 1. Load history files (`~/.zsh_history` and `~/.bash_history` when `--history auto`).
128
+ 2. Parse each command and extract relevant paths.
129
+ 3. Keep only paths under `--root` and normalize to the project level.
130
+ 4. Add candidates from `mkdir -> cd -> git init` flows.
131
+ 5. Aggregate `count` and latest access time per project.
132
+ 6. Calculate score and sort.
133
+
134
+ ### Path decision rules
135
+
136
+ - Candidate paths are extracted from path-bearing commands only: `cd`, `pushd`, `git -C`, `git clone`, `make -C`, `docker compose -f`, `npm/pnpm/yarn --prefix|--cwd`, and editor launchers (`code`, `vim`, `nvim`, `open`, `cursor`, `subl`).
137
+ - `--sort recent` only changes ordering. A directory must first pass extraction and filtering to appear in results.
138
+ - Paths outside `--root` are excluded.
139
+ - Normal command-derived paths are normalized to `<root>/<first-segment-under-root>`.
140
+ - For `mkdir <dir> -> cd <dir> -> git init`, the initialized directory itself is preserved as a candidate (including nested paths under `--root`).
141
+
142
+ ### Simulated cwd tracking
143
+
144
+ For each history file, this tool tracks a simulated `cwd` while scanning commands in order.
145
+
146
+ - Initial `cwd` is `--root`.
147
+ - `cd` updates simulated `cwd` with shell-like semantics:
148
+ - `cd` or `cd --` -> `$HOME`
149
+ - `cd -` -> previous `cwd`
150
+ - `cd <relative|absolute>` -> resolved path
151
+ - `pushd <path>` also updates simulated `cwd`.
152
+ - Safety guard: the simulated `cwd` is updated only when destination is an existing directory, or a directory created earlier in the same history stream (`mkdir` tracking).
153
+
154
+ ### Scoring
155
+
156
+ ```
157
+ score = log2(1 + count) + recency
158
+ recency = max(0, 1.2 - elapsedDays / 30)
159
+ ```
160
+
161
+ `zsh` history timestamps are used when present.
162
+ For `bash` entries without timestamps, a positional fallback estimation is used so that `--days` filtering still works.
163
+
164
+ ## JSON output (`--format json`)
165
+
166
+ ```json
167
+ {
168
+ "generatedAt": "2026-02-13T00:00:00.000Z",
169
+ "options": {
170
+ "root": "...",
171
+ "historyFiles": ["..."],
172
+ "days": 60,
173
+ "minCount": 1,
174
+ "limit": 100,
175
+ "sort": "score",
176
+ "format": "json",
177
+ "version": "0.1.0"
178
+ },
179
+ "results": [
180
+ {
181
+ "repo": "/path/to/root/owner/repo",
182
+ "count": 3,
183
+ "last": {
184
+ "unix": 1700000000,
185
+ "iso": "2024-11-14T22:13:20.000Z"
186
+ },
187
+ "score": 4.2
188
+ }
189
+ ]
190
+ }
191
+ ```
192
+
193
+ ## Troubleshooting
194
+
195
+ - **Few or no `cd` commands are detected**
196
+ Increase `--days` or specify another history file with `--history file --file <path>`.
197
+ - **No timestamps in `bash` history**
198
+ Use the zsh history source if available, or increase `--days`.
199
+ - **`--root` path structure does not follow `<root>/<project>`**
200
+ Adjust `--root` or your repository layout.
201
+ - **Output differs between text and JSON**
202
+ Ranking logic is the same; only the presentation format differs.
203
+
204
+ ## Requirements
205
+
206
+ - Node.js >= 18
207
+ - macOS / Linux (Windows is not a primary target, but path handling degrades safely)
208
+
209
+ ## Development
210
+
211
+ Run from source (without installing):
212
+
213
+ ```bash
214
+ node src/cli.js --root ~/projects
215
+ ```
216
+
217
+ Install locally from the repo:
218
+
219
+ ```bash
220
+ npm install -g .
221
+ ```
222
+
223
+ ### Testing
224
+
225
+ ```bash
226
+ npm test
227
+ ```
228
+
229
+ Test suite includes:
230
+
231
+ - Unit tests (20+ cases): `parseZshLine`, `extractDirsFromCmd`, `toRepoRoot`, scoring, arg parsing
232
+ - End-to-end tests (2+ cases): text output, JSON output
233
+
234
+ ### Lint & Format
235
+
236
+ ```bash
237
+ npm run lint
238
+ npm run format
239
+ ```
240
+
241
+ <details>
242
+ <summary>Design decisions and alternatives</summary>
243
+
244
+ - **`--root` is always required** — no default root is assumed to avoid environment-specific assumptions and accidental misdetection.
245
+ - Alternative: hardcode a default like `~/workspace`, but the risk of false positives is too high.
246
+ - **`--max-results` as an alias for `--limit`** — keeps compatibility while avoiding option duplication.
247
+ - Alternative: drop one of them, but that could break existing invocations.
248
+ - **Positional fallback for `bash` timestamps** — when `bash` history has no timestamps, line position is used as a rough estimate.
249
+ - Alternative: shell-level trace parsing for better precision, but the complexity cost is not justified at this stage.
250
+ - **This is a restart-assistance tool, not a full restoration mechanism.** Dependencies are intentionally minimal.
251
+
252
+ </details>
253
+
254
+ ## License
255
+
256
+ MIT
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "recent-project-checker",
3
+ "version": "0.1.0",
4
+ "description": "Estimate recently used projects from shell history and show restart-ready candidates.",
5
+ "type": "module",
6
+ "main": "src/cli.js",
7
+ "bin": {
8
+ "recent-project-checker": "./src/cli.js",
9
+ "recent-projects": "./src/cli.js"
10
+ },
11
+ "files": [
12
+ "src"
13
+ ],
14
+ "scripts": {
15
+ "test": "node --test",
16
+ "lint": "biome check src tests",
17
+ "format": "biome format src tests"
18
+ },
19
+ "engines": {
20
+ "node": ">=18"
21
+ },
22
+ "keywords": [
23
+ "cli",
24
+ "history",
25
+ "project",
26
+ "resume",
27
+ "node"
28
+ ],
29
+ "license": "MIT",
30
+ "devDependencies": {
31
+ "@biomejs/biome": "^1.8.3"
32
+ }
33
+ }