概要Overview
Drovyu Preview CLI は、静的ビルドから一時的なプレビューリンクを作成する CLI です。Vite、React、Storybook などの静的ビルドを、本番公開せずに共有したいときに使います。
CLI は各ファイルと manifest をローカルで暗号化してからアップロードします。AES 鍵は #k= URL fragment にだけ保持され、HTTP リクエストでは送信されません。
Drovyu Preview CLI creates temporary preview links for static builds. It is useful when you want to share a Vite, React, or Storybook static build without deploying it as a permanent site.
The CLI encrypts every file and its manifest locally before upload. The AES key is kept in the #k= URL fragment and is never sent in an HTTP request.
dvyu create ./distブラウザで試すBrowser trial
製品ページの「ブラウザで試す」から、CLIをインストールせずに静的プレビューを1件作成できます。index.html、静的出力フォルダ、またはZIPを選択し、内容と制限を確認してから作成します。確認前にファイルが送信されることはありません。
ファイル内容、ファイル名、パス、MIMEタイプ、エントリーポイントはブラウザ内で暗号化します。サーバーで禁止形式を拒否するため、各ファイルの拡張子だけは平文で送信します。
- 合計10MiB、100ファイルまで
- HTMLファイル必須。CLIと同じ許可拡張子だけを受付
- 作成から24時間で失効
- 1ブラウザにつき有効な試用プレビュー1件
- 更新、延長、手動削除には非対応
The “Try in browser” action creates one static preview without installing the CLI. Select an index.html file, a static output folder, or a ZIP, then review the selection and limits before creating it. No file is sent before confirmation.
File contents, names, paths, MIME types, and the entrypoint are encrypted in the browser. Only each file extension is sent in plaintext so the server can reject prohibited formats.
- Up to 10 MiB and 100 files
- An HTML file is required; only the CLI allowlist is accepted
- Expires 24 hours after creation
- One active trial preview per browser
- No update, extension, or manual deletion
インストールInstall
必要なもの:
- Node.js 20 以上
- Vite
distや Storybook の静的出力などのビルド済みディレクトリ
npm packageからpnpmまたはnpmでインストールします。
Requirements:
- Node.js 20 or later
- A static build directory such as Vite
distor Storybook static output
Install the npm package with pnpm or npm.
pnpm add -g @dvyu/cli
npm install -g @dvyu/cliインストールせずに一度だけ実行する場合:
One-off execution also works:
pnpm dlx @dvyu/cli create ./dist
npx @dvyu/cli create ./distクイックスタートQuick start
Storybook、Astro、Vite プロジェクトなら、ビルドからプレビュー作成まで 1 コマンドで完了します。
For a Storybook, Astro, or Vite project, one command builds the project and creates the preview.
dvyu preview ./my-appビルド済みディレクトリがある場合は create を使います。パスを省略した場合、dist があれば dist、なければ index.html を使います。
If you already have a build directory, use create. When no path is provided, it uses dist if it exists, otherwise index.html if it exists.
dvyu create ./dist出力された URL を相手に送ります。復号キーは URL の #k= 部分に含まれ、プレビューは 48 時間で失効します。
Send the printed URL. The decryption key lives in the #k= fragment, and the preview expires after 48 hours.
コマンドリファレンスCommand reference
dvyu create [path]
ビルド済みディレクトリまたは単一 HTML ファイルから暗号化プレビュー URL を作成します。パス省略時は dist → index.html の順に探します。選択したファイルまたはディレクトリには HTML ファイルが必要です。エントリーポイントは index.html を優先し、なければ最初の .html ファイルを使います。
Create an encrypted preview URL from a build directory or a single HTML file. Without a path it tries dist, then index.html. The selected file or directory must contain an HTML file. index.html is preferred as the entrypoint; otherwise the first .html file is used.
dvyu create
dvyu create ./dist
dvyu create ./example.html
dvyu create ./dist -p| オプションOption | 説明Description |
|---|---|
-p, --permanence supporter | アクセスが 1 ヶ月ない場合だけ削除される永続プレビューを作成します。--ttl と同時に指定できません。Keep the preview alive until it has no access for 1 month. Cannot be combined with --ttl. |
--ttl <duration> supporter | 1h から 30d までの有効期限を指定します(例: --ttl 7d)。Set a lifetime from 1h to 30d, such as --ttl 7d. |
dvyu preview [project]
対象プロジェクトの package.json を読み、静的出力としてビルドしてから出力ディレクトリをプレビューします。同じ出力パスのプレビューがローカルに残っている場合は、古いプレビューを削除して作り直します。対応ビルダーは Storybook / Astro / Vite です。
Reads the target package.json, builds the project for static output, then previews the output directory. If a local preview already exists for the same output path, it deletes the old preview and creates a new one. Supported builders are Storybook, Astro, and Vite.
dvyu preview
dvyu preview ./my-app
dvyu preview --out-dir build
dvyu preview -p
dvyu preview --ttl 7d| オプションOption | 説明Description |
|---|---|
-o, --out-dir <path> | ビルドの出力ディレクトリを指定します。Override the build output directory. |
-p, --permanence supporter | アクセスが 1 ヶ月ない場合だけ削除される永続プレビューを作成します。Keep the preview alive until it has no access for 1 month. |
--ttl <duration> supporter | 1h から 30d までの有効期限を指定します。Set a lifetime from 1h to 30d. |
dvyu update [target] [path]
最新のローカルプレビューを URL 変更なしで更新します。送ったリンクはそのまま使えます。ID とパスを指定して特定のプレビューを更新することもできます。
Update the latest local preview without changing its URL. Links you already shared keep working. You can also pass an id and a path to update a specific preview.
dvyu update
dvyu update ./dist
dvyu update <id> ./dist
dvyu update -p| オプションOption | 説明Description |
|---|---|
-p, --permanence supporter | 更新時に永続プレビューへ切り替えます。Switch the preview to permanence on update. |
--ttl <duration> supporter | 1h から 30d までの有効期限を指定します。Set a lifetime from 1h to 30d. |
dvyu recreate [target] [path]
古いプレビューを削除し、同じローカルパスから新しい URL で作り直します。URL を変えたくない場合は update を使います。
Deletes the old preview and creates a new preview URL from the same local path. Use update when the URL must stay the same.
dvyu recreate
dvyu recreate ./dist| オプションOption | 説明Description |
|---|---|
-p, --permanence supporter | 作り直したプレビューを永続にします。Make the recreated preview permanent. |
--ttl <duration> supporter | 1h から 30d までの有効期限を指定します。Set a lifetime from 1h to 30d. |
dvyu list
~/.dvyu/previews.json を読み、有効なプレビューの URL・状態・期限を一覧表示します。ローカルに復号キーがない有効なプレビューは #k= なしで表示されます。
Reads ~/.dvyu/previews.json and shows active previews with their URLs, state, and expiry. Active remote previews without a local key are shown without the #k= fragment.
dvyu list
dvyu list all
dvyu list -a| オプションOption | 説明Description |
|---|---|
all / -a, --all | 期限切れのローカル履歴も表示します。Include expired local history. |
dvyu delete <id>
ID を指定してプレビューを削除します。dvyu delete all で、この端末から作成したプレビューをすべて削除します。削除したプレビューは閲覧できなくなります。
Delete a preview by id. dvyu delete all removes every preview created from this device. Deleted previews are no longer viewable.
dvyu delete <id>
dvyu delete alldvyu usage
使用中のストレージ容量とプレビュー数を確認します。上限は通常利用で 100MB / 20 件です。
Show current storage usage and preview count. Standard limits are 100MB and 20 previews.
dvyu usagedvyu lang [en|ja]
CLI の表示言語を確認・変更します。言語設定は ~/.dvyu/settings.json に保存されます。
Show or set the CLI language. The language setting is stored in ~/.dvyu/settings.json.
dvyu lang
dvyu lang en
dvyu lang jadvyu supporter
Ko-fi 支援者特典を確認・設定します。サブコマンドなしで実行すると status と同じく特典の状態を表示します。詳しい流れは制限とサポーターを参照してください。
Show or configure Ko-fi supporter benefits. Without a subcommand it shows the benefit status, same as status. See Limits and supporter for the full flow.
dvyu supporter
dvyu supporter start
dvyu supporter status
dvyu supporter recover
dvyu supporter recovery
dvyu supporter link <recovery-token>
dvyu supporter unlink| サブコマンドSubcommand | 説明Description |
|---|---|
start | Ko-fi 支援コード(DVYU-...)を発行します。コードの有効期限は 24 時間です。Create a Ko-fi support claim code (DVYU-...). The code expires after 24 hours. |
status | 支援者特典の状態を表示します。Show supporter benefit status. |
recover | 支援コードを入れ忘れた未紐付けの支払いを、Ko-fi のメールアドレスへ届く 15 分有効の認証リンクでこの端末へ登録します。Link an unclaimed payment that omitted the support code by using a 15-minute verification link sent to the Ko-fi email address. |
recovery | 2 台目登録用の recovery token を表示します。Show the token used to link a second device. |
link <recovery-token> | 2 台目を支援者特典へ登録します。登録できる端末は同時に 2 台までです。Link a second device. At most two devices can be linked at once. |
unlink | この端末の支援者特典を解除します。解除しても作成済みプレビューは削除されず、同じ支援者容量へ計上され続けます。Unlink supporter benefits from this device. Unlinking does not delete previews created by that device; they continue to count against the same supporter storage quota. |
対応プロジェクトSupported projects
dvyu preview が対応しているビルダー:
- Storybook(既定の出力先:
storybook-static) - Astro(既定の出力先:
dist) - Vite(既定の出力先:
dist)
Vite には相対 base と選択した出力先を渡してビルドします。Astro の base はデプロイ先 pathname なので通常どおりビルドし、root asset path は Drovyu viewer 側で補完します。出力先を変えている場合は --out-dir で指定できます。
Builders supported by dvyu preview:
- Storybook (default output:
storybook-static) - Astro (default output:
dist) - Vite (default output:
dist)
Vite is built with a relative base and the selected output directory. Astro is built normally because its base option is a deployment pathname; the Drovyu viewer resolves Astro's root asset paths. Use --out-dir when your project uses a different output directory.
対応ファイルSupported files
対応していないファイルが含まれる場合、アップロードは開始前に中止されます。.DS_Store、.gitkeep、Thumbs.db などのよくあるメタファイルは自動で無視します。それ以外の非対応ファイルが見つかった場合は、確認後に除外して続行できます。
Uploads stop before starting if unsupported files are found. Common metadata files such as .DS_Store, .gitkeep, and Thumbs.db are ignored automatically. If other unsupported files are found, the CLI can exclude them after confirmation.
対応拡張子:
Supported extensions:
.html.htm.md.txt.json.xml.map.css.js.mjs.cjs.png.jpg.jpeg.gif.svg.webp.ico.avif.woff.woff2.ttf.otf.mp4.webm.mp3.wav.pdfアップロードルートに index.html がある場合は、それをプレビューのエントリーポイントとして使います。暗号化完了後のファイル送信は既定で 6 並列です。回線や proxy の制約に合わせる場合は、DVYU_UPLOAD_CONCURRENCY へ 1 から 16 を指定できます。
If index.html exists at the upload root, it is used as the preview entrypoint. Ciphertext files upload with a default concurrency of six after encryption finishes. Set DVYU_UPLOAD_CONCURRENCY from 1 to 16 when a connection or proxy needs a different limit.
DVYU_UPLOAD_CONCURRENCY=3 dvyu create ./distアセットパスAsset paths
安定して表示するには、静的サイトを相対アセットパスでビルドするのが理想です。Astro など一部のビルダーは /_astro/... のような root path を出力しますが、Drovyu Preview の viewer は下層ページも含めて同一 origin の asset link を補完します。外部 origin への完全な絶対 URL はそのまま扱います。
手動でビルドしてから dvyu create する場合は、以下を優先してください。
For the most reliable previews, build static sites with relative asset paths. Astro and some other builders emit root paths such as /_astro/.... The Drovyu Preview viewer rewrites those paths, including nested pages, but fully absolute URLs to external origins are left as-is.
If you build manually before running dvyu create, prefer:
vite build --base=./
astro build制限とサポーターLimits and supporter
| 項目Item | 通常利用Standard | 支援者Supporter |
|---|---|---|
| 有効な容量Active storage | 100MB | 300MB(2 端末合計)300MB shared by two devices |
| 有効なプレビュー数Active previews | 20 | 無制限Unlimited |
| 有効期限Lifetime | 48時間48 hours | 48時間、または --ttl で 1時間 から 30日48 hours, or 1 hour to 30 days with --ttl |
| 永続オプションPermanence | 利用不可Not available | -p, --permanence |
| プレビューバッジPreview badge | 表示Shown | 非表示Hidden |
| 登録端末Linked devices | 端末単位Device-scoped | 最大 2台Up to 2 |
サポーター特典は、Ko-fi での支援(金額自由)1 回につき通常 30 日間有効です。再支援で既存の特典期限が短くなることはありません。
有効化の流れ: 支援前に 1 台目の端末で dvyu supporter start を実行し、表示された DVYU-... コードを Ko-fi 支払い時の非公開メッセージへ含めます。コードの有効期限は 24 時間で、初回の端末登録には支援前に発行したコードが必要です。状態は dvyu supporter status で確認できます。
コードを入れ忘れた場合は、再支援せずに dvyu supporter recover を実行します。Ko-fi で使用したメールアドレスと未紐付けの支払いが一致すると、15 分有効の認証リンクが届きます。特典期限は元の支援日から 30 日間です。メールアドレスは送信のため Resend へ渡し、サーバーには平文ではなく HMAC hash を保存します。
支援期間が終了すると、新しい -p / --ttl 付きプレビューは作成できなくなります。既存の永続プレビューは直ちに削除されませんが、アクセスによる期限延長を停止し、その時点の削除予定日までは閲覧できます。
Supporter benefits are normally active for 30 days after each Ko-fi support, any amount. A later payment never shortens an existing entitlement.
Activation flow: before supporting, run dvyu supporter start on the first device and include the displayed DVYU-... code in the private message for the Ko-fi payment. A claim code expires after 24 hours, and the initial device registration requires a code created before supporting. Check the status with dvyu supporter status.
If you forgot the code, run dvyu supporter recover instead of supporting again. When the Ko-fi email address matches an unclaimed payment, a verification link valid for 15 minutes is sent. Benefits expire 30 days after the original payment. The email address is sent to Resend for delivery, while the server stores an HMAC hash rather than the plaintext address.
After the supporter period ends, new previews cannot use -p or --ttl. Existing permanent previews are not deleted immediately, but access no longer extends their expiry and they remain available only until the currently scheduled deletion time.
セキュリティと注意事項Security and notes
CLI は各ファイルと manifest を AES-256-GCM でローカル暗号化してからアップロードします。AES 鍵は URL の #k= fragment にだけ保持され、HTTP リクエストでは送信されません。サーバーは元のファイル内容・ファイル名・MIME type・entrypoint・AES 鍵を受け取りません。一方、運用に必要な preview ID、device ID、合計サイズ、ファイル数、作成・アクセス日時、有効期限、保持モードは暗号化されずに保存します。暗号化設計と検証手順は docs/ENCRYPTION.ja.md を参照してください。
注意事項:
- プレビューリンクは、信頼できる相手への一時共有を想定しています。
- Drovyu Preview は完全なセキュリティサンドボックスではありません。
- Viewer JavaScriptと配信基盤も信頼境界に含まれます。本サービスはactive-server zero-knowledgeを保証しません。
- 機密情報、NDA対象、個人情報、秘密鍵、credentialには使用しないでください。
- ビューアーは暗号化プレビュー内の同一オリジンのアセットリンクを補完しますが、特殊なランタイムルーティングや外部絶対 URL のアセットはプロジェクト側の調整が必要になる場合があります。
- 発行されたプレビューリンクは公開せず、必要な相手にだけ共有してください。
- 支援者 credential は
~/.dvyu/support.jsonへ保存されます。device token と recovery token を含むため、このファイルを共有したり repository へ commit したりしないでください。
The CLI encrypts every file and its manifest locally with AES-256-GCM before upload. The AES key is kept in the #k= URL fragment and is never sent in an HTTP request. The server does not receive original file contents, filenames, MIME types, the entrypoint, or the AES key. Operational metadata remains unencrypted, including the preview and device ids, aggregate sizes, file count, creation and access times, expiry, and retention mode. See docs/ENCRYPTION.md for the encryption design and executable verification.
Notes:
- Preview links are intended for temporary sharing with trusted recipients.
- Drovyu Preview is not a full security sandbox.
- The Viewer JavaScript and delivery infrastructure are part of the trust boundary. The service does not claim active-server zero knowledge.
- Do not use the service for confidential, NDA, or personal data, private keys, or credentials.
- The viewer rewrites same-origin asset links for encrypted previews, but unusual runtime routing or external absolute assets may still need project-side adjustment.
- Keep generated preview links private.
- Supporter credentials are stored in
~/.dvyu/support.json. It contains the device and recovery tokens, so never share it or commit it to a repository.
npm provenanceの確認Verify npm provenance
npm view @dvyu/cli@latest version gitHead dist.integrity dist.attestations --json
npm audit signaturesアンインストールUninstall
ローカルに保存された Drovyu Preview のデータ(~/.dvyu 以下の previews.json、settings.json、device.json、support.json)を削除します。
Removes local Drovyu Preview data (previews.json, settings.json, device.json, and support.json under ~/.dvyu).
dvyu uninstallCLI 本体はインストールに使ったパッケージマネージャで削除します。
Remove the CLI itself with the package manager you installed it with.