@aaa_iii/fzv 0.1.0 → 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/README.ja.md ADDED
@@ -0,0 +1,162 @@
1
+ # fzv
2
+
3
+ [![npm](https://img.shields.io/npm/v/@aaa_iii/fzv)](https://www.npmjs.com/package/@aaa_iii/fzv)
4
+ [![CI](https://github.com/iiii1224/fzv/actions/workflows/ci.yml/badge.svg)](https://github.com/iiii1224/fzv/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/iiii1224/fzv/blob/main/LICENSE)
6
+
7
+ [English](https://github.com/iiii1224/fzv/blob/main/README.md) | 日本語
8
+
9
+ コーディングエージェントに作らせたファイルを、IDE を開かずにブラウザで探して読むための読み取り専用ビューアです。PDF、HTML、画像、ソースコード、Office 文書を、同じタブと分割画面で切り替えながら確認できます。
10
+
11
+ ```console
12
+ $ npx --yes @aaa_iii/fzv@latest --watch
13
+
14
+ fzv 0.2.0
15
+ Project ~/dev/fzv
16
+ Viewer http://127.0.0.1:29814/
17
+ Office ibisOffice (~/.local/bin/ibisOffice)
18
+
19
+ Press Ctrl+C to stop.
20
+ ```
21
+
22
+ 表示された URL をブラウザで開き、`/` でファイルを検索します。
23
+
24
+ ## 特徴
25
+
26
+ ターミナルでエージェントに指示を出しながら、生成された成果物だけを横で確かめる、という使い方を想定しています。
27
+
28
+ - **`npx` 一行で起動**: 実行時に依存パッケージを取得しません。UI、PDF.js、フォントは配布パッケージに含まれており、インストール時のビルドもありません。
29
+ - **形式が違っても操作は同じ**: PDF も Markdown も画像も、同じタブ、分割、キー操作で扱います。
30
+ - **キーボードで完結**: `/` であいまい検索、`hjkl` でスクロール、`f` で画面上のリンクやボタンへジャンプします。
31
+ - **ファイルを書き換えない**: 書き込み機能はなく、プロジェクトのルートより外へのアクセスは拒否します。
32
+
33
+ **できないこと**: ファイルの編集、ファイル内容の全文検索、`.gitignore` の解釈、旧形式の Office 文書(`.doc`、`.xls`、`.ppt`)の表示、認証付きの公開。編集や全文検索には、エディタや `rg` を併用してください。
34
+
35
+ ## 必要なもの
36
+
37
+ - Node.js 24 以降
38
+ - 現行のデスクトップブラウザ
39
+ - Office 文書を表示する場合: [ibisOffice](https://github.com/ibisjp/ibis-office) または [LibreOffice](https://www.libreoffice.org/)
40
+
41
+ ## 起動する
42
+
43
+ ```bash
44
+ # カレントディレクトリを開く
45
+ npx --yes @aaa_iii/fzv@latest
46
+
47
+ # ファイルの変更を検知して、検索対象と開いているタブを更新する
48
+ npx --yes @aaa_iii/fzv@latest --watch
49
+
50
+ # 別のディレクトリを開く
51
+ npx --yes @aaa_iii/fzv@latest --root ~/projects/example
52
+ ```
53
+
54
+ `Ctrl+C` で終了します。
55
+
56
+ ポートは、プロジェクトのパスから 20000〜29999 番の中で決まります。同じプロジェクトなら毎回同じ URL になるので、ブラウザに保存されたタブ、分割、テーマが次の起動時にも戻ります。そのポートが使用中のときは空いているポートで起動し、ターミナルに警告を出します。この場合は URL が変わるため、前回の状態は戻りません。
57
+
58
+ ## 使い方
59
+
60
+ ### ファイルを探す
61
+
62
+ `/` を押すか「Find a file」をクリックすると検索が開きます。何も入力していないときは、ルート直下のファイルとディレクトリが並びます。ディレクトリを選ぶとその中に移動し、文字を入力するとパスをあいまい検索します。スペースで区切った語は、すべて含むパスだけに絞り込みます。
63
+
64
+ ファイル一覧は検索を開くたびに裏で読み直すため、ページを開いた後に作られたファイルも見つかります。読み直している間も、直前の一覧でそのまま検索できます。
65
+
66
+ 隠しファイルと隠しディレクトリ、`node_modules`、`__pycache__` は一覧に出ません。
67
+
68
+ ### タブと分割
69
+
70
+ ファイルはタブで開きます。タブはドラッグして並べ替えたり、上下左右にドロップして画面を分割したりできます。`Ctrl` を押しながら(macOS では `Option`)ドラッグすると、移動ではなく複製になります。分割は最大 32 個で、境界をドラッグして大きさを変えられます。
71
+
72
+ 開いているタブ、分割の配置、表示モードはブラウザに保存され、再読み込みしても戻ります。
73
+
74
+ ### プレビューできる形式
75
+
76
+ | 形式 | 拡張子 | 表示 |
77
+ | -------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
78
+ | PDF | `.pdf` | 文字選択、文書内検索、ズーム |
79
+ | HTML | `.html` `.htm` | sandbox 内で描画。ソース表示に切り替え可能 |
80
+ | Markdown | `.md` | 整形表示。ソース表示に切り替え可能 |
81
+ | 画像 | `.png` `.jpg` `.jpeg` `.gif` `.webp` `.avif` `.bmp` `.svg` `.ico` | 拡大、縮小、移動 |
82
+ | Office | `.docx` `.xlsx` `.pptx` | PDF に変換して表示 |
83
+ | テキスト | `.ts` `.js` `.py` `.rs` `.go` `.json` `.yaml` `.toml` `.tex` `.csv` など、`Makefile` `Dockerfile` | 行番号とシンタックスハイライト付きのソース表示 |
84
+
85
+ 1 ファイルあたり 20 MiB までです。表示中のファイルは「Download」から元の形式で保存できます。
86
+
87
+ ## キー操作
88
+
89
+ | キー | 操作 |
90
+ | ------------------------ | -------------------------------------------- |
91
+ | `/` | ファイル検索を開く |
92
+ | `?` | キー操作の一覧を表示 |
93
+ | `f` | リンクやボタンにラベルを出し、入力でジャンプ |
94
+ | `h` `j` `k` `l` | プレビューをスクロール |
95
+ | `gg` / `G` | 先頭 / 末尾へ移動 |
96
+ | `r` | 表示中のファイルを読み直す |
97
+ | `Alt+J` / `Alt+K` | 同じ分割内で次 / 前のタブへ |
98
+ | `Ctrl/Cmd+\` | 右に分割 |
99
+ | `Ctrl/Cmd+Shift+\` | 下に分割 |
100
+ | `Ctrl/Cmd+1`〜`9` | 分割領域にフォーカス |
101
+ | `Ctrl/Cmd+F` | PDF 内を検索 |
102
+ | `Ctrl/Cmd` + `+` `-` `0` | 画像と PDF のズーム(`0` で画面に合わせる) |
103
+ | `Escape` | 検索、ヘルプ、ラベル表示を閉じる |
104
+
105
+ 入力欄では文字入力が優先されます。ブラウザが予約しているショートカットは、ブラウザの動作が優先されます。
106
+
107
+ ## Office 文書のプレビュー
108
+
109
+ `.docx`、`.xlsx`、`.pptx` は、手元の ibisOffice か LibreOffice で PDF に変換してから表示します。fzv は起動時に `PATH` から `ibisOffice`、`soffice`、`libreoffice` の順で探し、macOS では `/Applications` 内のアプリも探します。見つかった変換ソフトは起動メッセージの `Office` 行に表示されます。
110
+
111
+ 見つからない場所にある場合は、`--office-converter` でパスを指定します。
112
+
113
+ ```bash
114
+ npx --yes @aaa_iii/fzv@latest --office-converter ~/Applications/ibisOffice-0.8.4-Linux.AppImage
115
+ ```
116
+
117
+ 実行ファイル名が `soffice` または `libreoffice` で始まる場合は LibreOffice として、それ以外は ibisOffice として呼び出します。変換結果はファイルの内容ごとにキャッシュされ、内容が変わると変換し直します。
118
+
119
+ ## オプション
120
+
121
+ | オプション | 既定値 | 説明 |
122
+ | ------------------------- | -------------------------- | -------------------------------------------------------------------- |
123
+ | `--root PATH` | カレントディレクトリ | 開くプロジェクトのルート |
124
+ | `--host HOST` | `127.0.0.1` | 待ち受けるアドレス |
125
+ | `--port PORT` | プロジェクトのパスから決定 | `0` で空きポート。明示したポートが使用中なら起動しない |
126
+ | `--watch` | 無効 | ファイルの変更を検知して、検索対象と開いているタブを更新 |
127
+ | `--allow-html-network` | 無効 | HTML プレビューに外部スクリプトの読み込みとネットワーク通信を許可 |
128
+ | `--office-converter PATH` | `PATH` から自動検出 | Office 文書の変換に使う ibisOffice または LibreOffice の実行ファイル |
129
+ | `-h`, `--help` | | ヘルプを表示 |
130
+ | `-v`, `--version` | | バージョンを表示 |
131
+
132
+ ## セキュリティ
133
+
134
+ 既定では `127.0.0.1` だけで待ち受け、このマシンからしか開けません。LAN 内の別の端末から開くには、待ち受けアドレスを明示します。
135
+
136
+ ```bash
137
+ npx --yes @aaa_iii/fzv@latest --host 0.0.0.0 --port 8000
138
+ ```
139
+
140
+ **注意**: 認証も TLS もありません。接続できる人は誰でも、プロジェクト内の表示対象ファイルを読めます。信頼できるネットワークでだけ使ってください。
141
+
142
+ - サーバーは GET と HEAD だけを受け付け、別オリジンからの API リクエストを拒否します。
143
+ - HTML プレビューは sandbox 内で動き、fzv 本体のページやストレージには触れません。インラインスクリプトは動きますが、外部スクリプトと API 通信は既定で遮断します。画像、CSS、フォントは読み込まれる場合があります。`--allow-html-network` は、中身を信頼できる HTML にだけ使ってください。
144
+ - Office 文書は、検証したファイルの内容を一時ディレクトリにコピーしてから変換ソフトに渡します。変換ソフトがプロジェクトのパスを直接読むことはありません。一時ディレクトリは終了時に削除します。
145
+
146
+ ## 開発状況
147
+
148
+ 0.x 系で開発中です。オプションやキー操作は、マイナーバージョンの更新でも変わることがあります。
149
+
150
+ ## ソースから動かす
151
+
152
+ ```bash
153
+ npm ci
154
+ npm run build
155
+ node dist/server/cli.js --watch
156
+ ```
157
+
158
+ UI を変更しながら確認するときは、サーバーを起動したまま別のターミナルで `npm run dev:ui` を実行し、Vite が表示する URL を開きます。テストは `npm test` と `npm run test:browser` です。
159
+
160
+ ## ライセンス
161
+
162
+ [MIT](https://github.com/iiii1224/fzv/blob/main/LICENSE)。同梱しているコンポーネントのライセンスと、あいまい検索の実装の出典は [THIRD_PARTY_NOTICES.md](https://github.com/iiii1224/fzv/blob/main/THIRD_PARTY_NOTICES.md) にあります。
package/README.md CHANGED
@@ -1,119 +1,162 @@
1
1
  # fzv
2
2
 
3
- プロジェクトのファイルを検索して、ブラウザで読むための読み取り専用ビューアです。ターミナルやコーディングエージェントで作業を続けながら、PDF、HTML、画像、ソースコードをタブや分割画面で確認できます。
3
+ [![npm](https://img.shields.io/npm/v/@aaa_iii/fzv)](https://www.npmjs.com/package/@aaa_iii/fzv)
4
+ [![CI](https://github.com/iiii1224/fzv/actions/workflows/ci.yml/badge.svg)](https://github.com/iiii1224/fzv/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/iiii1224/fzv/blob/main/LICENSE)
4
6
 
5
- ## 必要な環境
7
+ English | [日本語](https://github.com/iiii1224/fzv/blob/main/README.ja.md)
6
8
 
7
- - Node.js 24 以降
8
- - 現行のデスクトップブラウザ
9
+ A read-only browser viewer for finding and reading the files your coding agent produces, without opening an IDE. Switch between PDFs, HTML, images, source code, and Office documents in the same tabs and split panes.
9
10
 
10
- 実行時に追加のnpmパッケージをインストールしません。配布パッケージにはUIと必要なアセットが含まれています。
11
+ ```console
12
+ $ npx --yes @aaa_iii/fzv@latest --watch
11
13
 
12
- ## 使い始める
14
+ fzv 0.2.0
15
+ Project ~/dev/fzv
16
+ Viewer http://127.0.0.1:29814/
17
+ Office ibisOffice (~/.local/bin/ibisOffice)
13
18
 
14
- npmレジストリから起動します。プロジェクトのディレクトリで実行してください。
15
-
16
- ```bash
17
- npx --yes @aaa_iii/fzv@latest --root .
19
+ Press Ctrl+C to stop.
18
20
  ```
19
21
 
20
- 自動再読み込みを有効にするには `--watch` を付けます。
22
+ Open the printed URL in your browser and press `/` to find a file.
21
23
 
22
- ```bash
23
- npx --yes @aaa_iii/fzv@latest --root . --watch
24
- ```
24
+ ## Why fzv
25
25
 
26
- ターミナルに表示されたURLをブラウザで開きます。既定では `http://127.0.0.1:8000/` で待ち受けます。終了するには `Ctrl+C` を押します。
26
+ fzv is built for keeping an eye on generated output while you keep directing an agent from the terminal.
27
27
 
28
- ## コマンドラインオプション
28
+ - **One `npx` command**: nothing is downloaded at runtime. The UI, PDF.js, and fonts ship inside the package, and there is no install-time build.
29
+ - **One workflow for every format**: PDFs, Markdown, and images all use the same tabs, splits, and keys.
30
+ - **Keyboard-driven**: `/` for fuzzy search, `hjkl` to scroll, `f` to jump to any link or button on screen.
31
+ - **Never modifies files**: there is no write path, and requests outside the project root are rejected.
29
32
 
30
- | オプション | 既定値 | 説明 |
31
- | ---------------------- | -------------------- | ------------------------------------------------------ |
32
- | `--root PATH` | カレントディレクトリ | 閲覧するプロジェクトのルート |
33
- | `--host HOST` | `127.0.0.1` | 待ち受けアドレス |
34
- | `--port PORT` | `8000` | ポート番号。`0` を指定すると空きポートを使う |
35
- | `--watch` | 無効 | プロジェクト内の変更後にブラウザを再読み込み |
36
- | `--allow-html-network` | 無効 | HTMLプレビューで外部スクリプトとネットワーク通信を許可 |
37
- | `-h`, `--help` | — | ヘルプを表示 |
38
- | `-v`, `--version` | — | バージョンを表示 |
33
+ **What it does not do**: edit files, search file contents, honor `.gitignore`, preview legacy Office formats (`.doc`, `.xls`, `.ppt`), or serve with authentication. Pair it with an editor or `rg` for editing and full-text search.
39
34
 
40
- 別のプロジェクトやポートで起動する例:
35
+ ## Requirements
36
+
37
+ - Node.js 24 or later
38
+ - A current desktop browser
39
+ - For Office documents only: [ibisOffice](https://github.com/ibisjp/ibis-office) or [LibreOffice](https://www.libreoffice.org/)
40
+
41
+ ## Start
41
42
 
42
43
  ```bash
43
- npx --yes @aaa_iii/fzv@latest --root ~/projects/example --port 8001 --watch
44
+ # Open the current directory
45
+ npx --yes @aaa_iii/fzv@latest
46
+
47
+ # Watch for changes and refresh the search index and open tabs
48
+ npx --yes @aaa_iii/fzv@latest --watch
49
+
50
+ # Open another directory
51
+ npx --yes @aaa_iii/fzv@latest --root ~/projects/example
44
52
  ```
45
53
 
46
- ## ファイルを探して読む
54
+ Press `Ctrl+C` to stop.
47
55
 
48
- `/` キーまたは「Find a file」から検索を開きます。空の検索欄には現在のディレクトリ直下の項目が表示されます。ディレクトリを選ぶとその中へ移動し、文字を入力するとパスをあいまい検索します。検索語をスペースで区切ると、すべての語を含むパスを探します。
56
+ The port is derived from the project path, in the range 20000–29999. The same project always gets the same URL, so the tabs, splits, and theme saved in your browser come back on the next run. If that port is taken, fzv starts on a free port and prints a warning. The URL then differs, so the previous session is not restored.
49
57
 
50
- ファイルはタブで開きます。タブは並べ替えられ、ドラッグして上下左右に画面を分割したり、別の領域へ移動したりできます。分割領域はドラッグでサイズを調整でき、最大32個まで作成できます。タブ、分割、選択中のファイルはブラウザに保存され、再読み込み後に復元されます。
58
+ ## Usage
51
59
 
52
- ### プレビュー形式
60
+ ### Find files
53
61
 
54
- - PDF: ページ表示、文字選択、文書内検索、ズーム
55
- - HTML (`.html`, `.htm`): Viewer / Source 切り替え
56
- - 画像: PNG、JPEG、GIF、WebP、AVIF、BMP、SVG、ICO。拡大・縮小・移動
57
- - テキスト: Markdown、JSON、JavaScript、TypeScript、Python、Rust、Go、YAML、CSVなど。ソース表示とシンタックスハイライト
62
+ Press `/` or click "Find a file" to open search. With an empty query, it lists the files and directories at the project root. Selecting a directory moves into it; typing fuzzy-matches paths. Space-separated terms narrow results to paths that contain all of them.
58
63
 
59
- Markdownは整形表示とソース表示を切り替えられます。HTML、Markdown、PDF以外のテキストはソース表示で開きます。1ファイルの上限は20 MiBです。
64
+ The file list is rescanned in the background each time search opens, so files created after the page loaded show up too. While the rescan runs, you can keep searching the previous list.
60
65
 
61
- 検索結果に新しいファイルが出てこない場合は検索画面の「Refresh」を押してください。`--watch` を使うと、対象プロジェクトの変更後にページ全体を再読み込みし、開いているタブを復元します。
66
+ Hidden files and directories, `node_modules`, and `__pycache__` are not listed.
62
67
 
63
- ## キーボード操作
68
+ ### Tabs and splits
64
69
 
65
- | キー | 操作 |
66
- | ------------------- | -------------------------------------------------- |
67
- | `/` | ファイル検索を開く |
68
- | `↑` / `↓`, `Enter` | 検索結果を選択して開く |
69
- | `Escape` | 検索やヘルプを閉じる、ヒントを解除 |
70
- | `?` | キーボード操作一覧を表示 |
71
- | `f` | 画面上のリンクや操作部品にジャンプするヒントを表示 |
72
- | `h` `j` `k` `l` | プレビューをスクロール |
73
- | `gg` / `G` | プレビューの先頭 / 末尾へ移動 |
74
- | `r` | 選択中のプレビューを再取得 |
75
- | `Alt+J` / `Alt+K` | 現在の領域で次 / 前のタブへ移動 |
76
- | `Ctrl/Cmd+\` | 右に分割 |
77
- | `Ctrl/Cmd+Shift+\` | 下に分割 |
78
- | `Ctrl/Cmd+1` 〜 `9` | 分割領域へフォーカス |
70
+ Files open in tabs. Drag a tab to reorder it, or drop it on any edge to split the view. Hold `Ctrl` (`Option` on macOS) while dragging to copy the tab instead of moving it. Up to 32 split panes are supported, and the dividers can be dragged to resize them.
79
71
 
80
- ブラウザが `Ctrl+Tab` をアプリへ渡す場合は、タブ切り替えにも使えます。ブラウザが予約しているキー操作はブラウザ側が優先されます。入力欄では文字入力を優先します。
72
+ Open tabs, the split layout, and view modes are saved in the browser and restored on reload.
81
73
 
82
- ## セキュリティとアクセス範囲
74
+ ### Supported formats
83
75
 
84
- サーバーは既定でこのマシンの `127.0.0.1` だけに接続を受け付けます。LANの別端末から開く場合は、たとえば次のように起動します。
76
+ | Format | Extensions | View |
77
+ | -------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------ |
78
+ | PDF | `.pdf` | Text selection, in-document search, zoom |
79
+ | HTML | `.html` `.htm` | Rendered in a sandbox; switchable to source |
80
+ | Markdown | `.md` | Rendered; switchable to source |
81
+ | Image | `.png` `.jpg` `.jpeg` `.gif` `.webp` `.avif` `.bmp` `.svg` `.ico` | Zoom and pan |
82
+ | Office | `.docx` `.xlsx` `.pptx` | Converted to PDF |
83
+ | Text | `.ts` `.js` `.py` `.rs` `.go` `.json` `.yaml` `.toml` `.tex` `.csv`, and more; `Makefile` `Dockerfile` | Source with line numbers and syntax highlighting |
85
84
 
86
- ```bash
87
- npx --yes @aaa_iii/fzv@latest --root . --host 0.0.0.0 --port 8001
88
- ```
85
+ Files are limited to 20 MiB each. "Download" saves the current file in its original format.
89
86
 
90
- ネットワーク公開には認証もTLSもありません。接続できる端末からプロジェクト内の公開対象ファイルを閲覧できます。信頼できるネットワークでのみ使用してください。
87
+ ## Keyboard shortcuts
91
88
 
92
- fzvはファイルを書き換えず、ルート外へのパスアクセスを拒否します。隠しファイルとディレクトリ、`node_modules`、`__pycache__` は表示・配信しません。`.gitignore` は解釈しません。
89
+ | Keys | Action |
90
+ | ------------------------ | --------------------------------------------- |
91
+ | `/` | Open file search |
92
+ | `?` | Show all shortcuts |
93
+ | `f` | Label links and buttons; type a label to jump |
94
+ | `h` `j` `k` `l` | Scroll the preview |
95
+ | `gg` / `G` | Go to the top / bottom |
96
+ | `r` | Reload the current file |
97
+ | `Alt+J` / `Alt+K` | Next / previous tab in the same pane |
98
+ | `Ctrl/Cmd+\` | Split right |
99
+ | `Ctrl/Cmd+Shift+\` | Split down |
100
+ | `Ctrl/Cmd+1`–`9` | Focus a pane |
101
+ | `Ctrl/Cmd+F` | Search within a PDF |
102
+ | `Ctrl/Cmd` + `+` `-` `0` | Zoom images and PDFs (`0` fits to the view) |
103
+ | `Escape` | Close search, help, or labels |
93
104
 
94
- HTMLプレビューはsandbox内で動作します。インラインスクリプトは実行できますが、既定では外部スクリプトの読み込みとAPI通信を許可しません。画像、CSS、フォントなどはHTMLのプレビュー方針に従って読み込まれる場合があります。信頼できるHTMLで外部スクリプトや通信が必要な場合だけ `--allow-html-network` を指定してください。この設定はHTMLからネットワークへの接続を許可します。
105
+ Text fields keep their normal typing behavior. Shortcuts reserved by the browser take precedence.
95
106
 
96
- ## ソースから実行する
107
+ ## Office documents
108
+
109
+ `.docx`, `.xlsx`, and `.pptx` files are converted to PDF with a local ibisOffice or LibreOffice before display. At startup, fzv searches `PATH` for `ibisOffice`, `soffice`, and `libreoffice`, in that order, and also checks `/Applications` on macOS. The converter it finds is shown on the `Office` line of the startup message.
110
+
111
+ If the converter lives somewhere else, pass its path with `--office-converter`:
97
112
 
98
113
  ```bash
99
- npm ci
100
- npm run build
101
- node dist/server/cli.js --root . --watch
114
+ npx --yes @aaa_iii/fzv@latest --office-converter ~/Applications/ibisOffice-0.8.4-Linux.AppImage
102
115
  ```
103
116
 
104
- 開発中にUIの変更を確認する場合は、サーバーを起動したまま別のターミナルで次を実行し、Viteが表示するURLを開きます。
117
+ Executables whose names start with `soffice` or `libreoffice` are run as LibreOffice; anything else is run as ibisOffice. Converted PDFs are cached by file content and regenerated when the content changes.
118
+
119
+ ## Options
120
+
121
+ | Option | Default | Description |
122
+ | ------------------------- | ----------------------- | --------------------------------------------------------------------- |
123
+ | `--root PATH` | Current directory | Project root to open |
124
+ | `--host HOST` | `127.0.0.1` | Address to listen on |
125
+ | `--port PORT` | Derived from the path | `0` picks a free port. An explicit port that is in use stops startup |
126
+ | `--watch` | Off | Watch for changes and refresh the search index and open tabs |
127
+ | `--allow-html-network` | Off | Let HTML previews load external scripts and make network requests |
128
+ | `--office-converter PATH` | Auto-detected on `PATH` | ibisOffice or LibreOffice executable used to convert Office documents |
129
+ | `-h`, `--help` | | Show help |
130
+ | `-v`, `--version` | | Show the version |
131
+
132
+ ## Security
133
+
134
+ By default fzv listens on `127.0.0.1` only, so it is reachable from this machine alone. To open it from another device on your LAN, set the listen address explicitly:
105
135
 
106
136
  ```bash
107
- npm run dev:ui
137
+ npx --yes @aaa_iii/fzv@latest --host 0.0.0.0 --port 8000
108
138
  ```
109
139
 
110
- 主な検証コマンド:
140
+ **Warning**: there is no authentication and no TLS. Anyone who can connect can read the viewable files in the project. Use it only on networks you trust.
141
+
142
+ - The server accepts only GET and HEAD and rejects cross-origin API requests.
143
+ - HTML previews run in a sandbox and cannot reach the fzv page or its storage. Inline scripts run, but external scripts and API requests are blocked by default. Images, CSS, and fonts may still load. Use `--allow-html-network` only for HTML you trust.
144
+ - Office documents are copied from the validated file into a temporary directory before conversion. The converter never reads project paths directly. The temporary directory is removed on exit.
145
+
146
+ ## Status
147
+
148
+ fzv is in 0.x development. Options and shortcuts may change in minor releases.
149
+
150
+ ## Run from source
111
151
 
112
152
  ```bash
113
- npm test
114
- npm run test:browser
153
+ npm ci
154
+ npm run build
155
+ node dist/server/cli.js --watch
115
156
  ```
116
157
 
117
- ## ライセンス
158
+ To work on the UI, keep the server running, run `npm run dev:ui` in another terminal, and open the URL Vite prints. Run the tests with `npm test` and `npm run test:browser`.
159
+
160
+ ## License
118
161
 
119
- MIT License。依存コンポーネントのライセンスと検索実装の帰属情報は [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) に記載しています。
162
+ [MIT](https://github.com/iiii1224/fzv/blob/main/LICENSE). Licenses for bundled components and the attribution for the fuzzy search implementation are in [THIRD_PARTY_NOTICES.md](https://github.com/iiii1224/fzv/blob/main/THIRD_PARTY_NOTICES.md).