specv 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 daiki-beppu
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.md CHANGED
@@ -1,79 +1,85 @@
1
- # mdv
1
+ # specv
2
2
 
3
- カレントディレクトリの Markdown ファイルを GitHub 風にブラウザプレビューする CLI ツール。
3
+ A CLI tool that previews Markdown files in the current directory with GitHub-style rendering in your browser.
4
4
 
5
5
  ## Features
6
6
 
7
- - GitHub Flavored Markdown (GFM) レンダリング
8
- - シンタックスハイライト付きコードブロック + コピーボタン
9
- - Preview / Source 切替
10
- - ファイルツリー (サイドバー) + 検索
11
- - VSCode Quick Open (`Cmd+P`) with fzf ファジー検索
12
- - サイドバートグル (`Cmd+B`)
13
- - ダーク / ライトモード切替 (OS 追従 + 手動切替)
14
- - GitHub ダークテーマ準拠の配色
15
- - ポート自動検出 (衝突時に次のポートを試行)
7
+ - GitHub Flavored Markdown (GFM) rendering
8
+ - Syntax-highlighted code blocks with copy button
9
+ - Preview / Source toggle
10
+ - File tree (sidebar) with search
11
+ - VSCode-style Quick Open (`Cmd+P`) with fzf fuzzy search
12
+ - Sidebar toggle (`Cmd+B`)
13
+ - Dark / Light mode (follows OS preference + manual toggle)
14
+ - GitHub dark theme color scheme
15
+ - Automatic port detection (tries next port on conflict)
16
16
 
17
17
  ## Install
18
18
 
19
19
  ```bash
20
- # ローカルビルド
21
- git clone https://github.com/daiki-beppu/mdv.git
22
- cd mdv
23
- pnpm install
24
- pnpm build
25
- npm link
20
+ npm install -g specv
26
21
  ```
27
22
 
28
23
  ## Usage
29
24
 
30
25
  ```bash
31
- # カレントディレクトリの .md をプレビュー
32
- mdv
26
+ # Preview .md files in the current directory
27
+ specv
33
28
 
34
- # ポート指定
35
- mdv -p 3000
29
+ # Specify a port
30
+ specv -p 3000
36
31
  ```
37
32
 
38
- ブラウザが自動で開き、Markdown ファイルを GitHub 風にレンダリング表示します。
33
+ A browser window opens automatically, rendering your Markdown files with GitHub-style formatting.
39
34
 
40
35
  ## Keyboard Shortcuts
41
36
 
42
- | Shortcut | Action |
43
- | ------------------ | ------------------------- |
44
- | `Cmd+P` / `Ctrl+P` | Quick Open (ファイル検索) |
45
- | `Cmd+B` / `Ctrl+B` | サイドバー開閉 |
37
+ | Shortcut | Action |
38
+ | ------------------ | ------------------- |
39
+ | `Cmd+P` / `Ctrl+P` | Quick Open (search) |
40
+ | `Cmd+B` / `Ctrl+B` | Toggle sidebar |
46
41
 
47
42
  ## Architecture
48
43
 
49
44
  ```
50
- Express Server (API) ─── React SPA (Vite build)
51
- /api/files FileTree + Preview + Source
52
- /api/file?path=... react-markdown + prism-react-renderer
45
+ Hono Server (API) ─── React SPA (Vite build)
46
+ /api/files FileTree + Preview + Source
47
+ /api/file?path=... react-markdown + prism-react-renderer
53
48
  ```
54
49
 
55
- - **Server:** Express 5 + commander (CLI)
50
+ - **Server:** Hono + @hono/node-server + commander (CLI)
56
51
  - **Client:** React 19 + Vite + Tailwind CSS v4
57
- - **Markdown:** react-markdown + remark-gfm + github-markdown-css
52
+ - **Markdown:** react-markdown + remark-gfm
58
53
  - **Search:** fzf (fuzzy finder) + TanStack Hotkeys
59
- - **Security:** パストラバーサル検証、.md ファイルのみアクセス許可
54
+ - **Security:** Path traversal protection, restricted to .md files only
60
55
 
61
56
  ## Development
62
57
 
63
58
  ```bash
64
- # クライアント開発サーバー (HMR)
59
+ # Client dev server (HMR)
65
60
  pnpm dev:client
66
61
 
67
- # サーバー開発
62
+ # Server development
68
63
  pnpm dev:server
69
64
 
70
- # テスト
65
+ # Run tests
71
66
  pnpm test
72
67
 
73
- # ビルド
68
+ # Build
74
69
  pnpm build
75
70
  ```
76
71
 
72
+ ## CI/CD
73
+
74
+ Automated via GitHub Actions:
75
+
76
+ - **CI** — Runs lint / knip / typecheck / test / build on PRs and main pushes
77
+ - **Publish** — Publishes to npm on GitHub Release creation (Trusted Publishing)
78
+
79
+ ## Contributing
80
+
81
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
82
+
77
83
  ## License
78
84
 
79
- MIT
85
+ [MIT](LICENSE)