difit 2.0.10 → 2.0.11

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,177 @@
1
+ <h1 align="center">
2
+ <img src="public/logo.png" alt="difit" width="260">
3
+ </h1>
4
+
5
+ <p align="center">
6
+ <a href="./README.md">English</a> | 日本語 | <a href="./README.zh.md">简体中文</a> | <a href="./README.ko.md">한국어</a>
7
+ </p>
8
+
9
+ **difit**は、ローカルのgit上にある差分をGitHub風のビューアで閲覧・レビューできるCLIツールです。見やすい表示に加え、コメントはAIへのプロンプトとしてコピーできます。AI時代のローカルコードレビューツール!
10
+
11
+ ## ✨ 機能
12
+
13
+ - ⚡ **Zero Config**: `npx difit` を実行するだけ
14
+ - 💬 **ローカルレビュー**: 差分にコメントをつけて、AI向けにファイルパス・行番号つきでコピー
15
+ - 🖥️ **WebUI/TerminalUI**: ブラウザで見るWeb UIの他、ターミナルのまま閲覧できる `--tui` も
16
+
17
+ ## ⚡ クイックスタート
18
+
19
+ ```bash
20
+ npx difit # 最新コミットのdiffをWebUIで表示
21
+ ```
22
+
23
+ ## 🚀 使い方
24
+
25
+ ### 基本的な使い方
26
+
27
+ ```bash
28
+ npx difit <target> # 単一コミットのdiffを表示
29
+ npx difit <target> [compare-with] # 2つのコミット/ブランチを比較
30
+ npx difit --pr <github-pr-url> # GitHubプルリクエストをレビュー
31
+ ```
32
+
33
+ ### 単一コミットのレビュー
34
+
35
+ ```bash
36
+ npx difit # HEAD(最新)のコミット
37
+ npx difit 6f4a9b7 # 特定のコミット
38
+ npx difit feature # featureブランチの最新コミット
39
+ ```
40
+
41
+ ### 2つのコミットを比較
42
+
43
+ ```bash
44
+ npx difit HEAD main # HEADとmainブランチを比較
45
+ npx difit feature main # ブランチ間を比較
46
+ npx difit . origin/main # 作業ディレクトリとリモートmainを比較
47
+ ```
48
+
49
+ ### 特別な引数
50
+
51
+ difitは一般的なdiffシナリオ用の特別なキーワードをサポートしています:
52
+
53
+ ```bash
54
+ npx difit . # すべての未コミット差分(ステージングエリア + 未ステージ)
55
+ npx difit staged # ステージングエリアの差分
56
+ npx difit working # 未ステージ差分のみ
57
+ ```
58
+
59
+ ### GitHub PR
60
+
61
+ ```bash
62
+ npx difit --pr https://github.com/owner/repo/pull/123
63
+ ```
64
+
65
+ difitは以下の方法でGitHub認証を自動的に処理します:
66
+
67
+ 1. **GitHub CLI**(推奨):`gh auth login`でログイン済みの場合、既存の認証情報を使用
68
+ 2. **環境変数**:`GITHUB_TOKEN`環境変数を設定
69
+ 3. **認証なし**:パブリックリポジトリは認証なしで動作(レート制限あり)
70
+
71
+ #### GitHub Enterprise Server
72
+
73
+ Enterprise ServerのPRを表示する場合、あなたのEnterprise Serverインスタンスで生成されたトークンを設定する必要があります:
74
+
75
+ 1. `https://YOUR-ENTERPRISE-SERVER/settings/tokens`にアクセス
76
+ 2. 適切なスコープでパーソナルアクセストークンを生成
77
+ 3. `GITHUB_TOKEN`環境変数として設定
78
+
79
+ ## ⚙️ CLIオプション
80
+
81
+ | フラグ | デフォルト | 説明 |
82
+ | ---------------- | ------------ | --------------------------------------------------------------------------------- |
83
+ | `<target>` | HEAD | コミットハッシュ、タグ、HEAD~n、ブランチ、または特別な引数 |
84
+ | `[compare-with]` | - | 比較対象の2番目のコミット(2つの間のdiffを表示) |
85
+ | `--pr <url>` | - | レビューするGitHub PRのURL(例:https://github.com/owner/repo/pull/123) |
86
+ | `--port` | 3000 | 優先ポート。使用中の場合は+1にフォールバック |
87
+ | `--host` | 127.0.0.1 | サーバーをバインドするホストアドレス(外部からアクセスしたい場合は0.0.0.0を指定) |
88
+ | `--no-open` | false | ブラウザを自動的に開かない |
89
+ | `--mode` | side-by-side | 表示モード。inline`または`side-by-side` |
90
+ | `--tui` | false | WebUIの代わりにターミナルUIを使用 |
91
+ | `--clean` | false | 起動時にすべての既存コメントをクリア |
92
+
93
+ ## 💬 コメントシステム
94
+
95
+ difitにはAIコーディングエージェントへフィードバックしやすいレビューコメントシステムが含まれています:
96
+
97
+ 1. **コメント追加**:diffの任意の行のコメントボタンをクリック or 範囲ドラッグしてコメントを追加
98
+ 2. **コメント編集**:編集ボタンで既存のコメントを編集
99
+ 3. **プロンプト生成**:コメントには、AIコーディングエージェント用にコンテキストをフォーマットする「Copy Prompt」ボタンが含まれます
100
+ 4. **すべてコピー**:「Copy All Prompt」を使用して、すべてのコメントを構造化された形式でコピー
101
+ 5. **永続的な保存**:コメントはコミットごとにブラウザのlocalStorageに保存されます
102
+
103
+ ### コメントプロンプトフォーマット
104
+
105
+ ```sh
106
+ src/components/Button.tsx:L42 # この行が自動的に追加されます
107
+ ここの変数名をもっとわかりやすくして
108
+ ```
109
+
110
+ 範囲指定した場合
111
+
112
+ ```sh
113
+ src/components/Button.tsx:L42-L48 # この行が自動的に追加されます
114
+ この部分は不要です
115
+ ```
116
+
117
+ ## 🎨 シンタックスハイライト対応言語
118
+
119
+ - **JavaScript/TypeScript**:`.js`、`.jsx`、`.ts`、`.tsx`
120
+ - **Web技術**:HTML、CSS、JSON、XML、Markdown
121
+ - **シェルスクリプト**:`.sh`、`.bash`、`.zsh`、`.fish`
122
+ - **バックエンド言語**:PHP、SQL、Ruby、Java、Scala
123
+ - **システム言語**:C、C++、C#、Rust、Go
124
+ - **モバイル言語**:Swift、Kotlin、Dart
125
+ - **その他**:Python、YAML、Solidity、Vimスクリプト
126
+
127
+ ## 🛠️ 開発
128
+
129
+ ```bash
130
+ # 依存関係のインストール
131
+ pnpm install
132
+
133
+ # 開発サーバーの起動(ホットリロード付き)
134
+ # これはViteの開発サーバーとCLIの両方をNODE_ENV=developmentで実行します
135
+ pnpm run dev
136
+
137
+ # プロダクションビルドとサーバーの起動
138
+ pnpm run start <target>
139
+
140
+ # プロダクション用ビルド
141
+ pnpm run build
142
+
143
+ # テストの実行
144
+ pnpm test
145
+
146
+ # リントとフォーマット
147
+ pnpm run lint
148
+ pnpm run format
149
+ pnpm run typecheck
150
+ ```
151
+
152
+ ### 開発ワークフロー
153
+
154
+ - **`pnpm run dev`**:Vite開発サーバー(ホットリロード付き)とCLIサーバーを同時に起動
155
+ - **`pnpm run start <target>`**:すべてをビルドしてプロダクションサーバーを起動(最終ビルドのテスト用)
156
+ - **開発モード**:ホットリロードと高速開発のためにViteの開発サーバーを使用
157
+ - **プロダクションモード**:ビルド済みの静的ファイルを提供(npxとプロダクションビルドで使用)
158
+
159
+ ## 🏗️ アーキテクチャ
160
+
161
+ - **CLI**:包括的なバリデーションを備えたCommander.jsでの引数解析
162
+ - **バックエンド**:diff処理用のsimple-gitを備えたExpressサーバー
163
+ - **GitHub統合**:自動認証(GitHub CLI + 環境変数)を備えたOctokitでのGitHub API
164
+ - **フロントエンド**:React 18 + TypeScript + Vite
165
+ - **スタイリング**:GitHubライクなダークテーマを備えたTailwind CSS v4
166
+ - **シンタックスハイライト**:動的言語ロードを備えたPrism.js
167
+ - **テスト**:同じ場所に配置されたテストファイルを使用したVitestユニットテスト
168
+ - **品質**:ESLint、Prettier、lefthookプリコミットフック
169
+
170
+ ## 📋 要件
171
+
172
+ - Node.js ≥ 21.0.0
173
+ - レビューするコミットを含むGitリポジトリ
174
+
175
+ ## 📄 ライセンス
176
+
177
+ MIT
package/README.ko.md ADDED
@@ -0,0 +1,177 @@
1
+ <h1 align="center">
2
+ <img src="public/logo.png" alt="difit" width="260">
3
+ </h1>
4
+
5
+ <p align="center">
6
+ <a href="./README.md">English</a> | <a href="./README.ja.md">日本語</a> | <a href="./README.zh.md">简体中文</a> | 한국어
7
+ </p>
8
+
9
+ **difit**은 GitHub 스타일 뷰어로 로컬 git diff를 보고 검토할 수 있는 CLI 도구입니다. 깔끔한 시각적 효과와 함께 코멘트를 AI용 프롬프트로 복사할 수 있습니다. AI 시대의 로컬 코드 리뷰 도구!
10
+
11
+ ## ✨ 기능
12
+
13
+ - ⚡ **제로 설정**: `npx difit`만 실행하면 작동
14
+ - 💬 **로컬 리뷰**: diff에 코멘트를 추가하고 파일 경로와 줄 번호와 함께 AI용으로 복사
15
+ - 🖥️ **WebUI/터미널UI**: 브라우저의 Web UI 또는 `--tui`로 터미널에서 사용
16
+
17
+ ## ⚡ 빠른 시작
18
+
19
+ ```bash
20
+ npx difit # WebUI에서 최신 커밋 diff 보기
21
+ ```
22
+
23
+ ## 🚀 사용법
24
+
25
+ ### 기본 사용법
26
+
27
+ ```bash
28
+ npx difit <target> # 단일 커밋 diff 보기
29
+ npx difit <target> [compare-with] # 두 커밋/브랜치 비교
30
+ npx difit --pr <github-pr-url> # GitHub 풀 리퀘스트 검토
31
+ ```
32
+
33
+ ### 단일 커밋 검토
34
+
35
+ ```bash
36
+ npx difit # HEAD (최신) 커밋
37
+ npx difit 6f4a9b7 # 특정 커밋
38
+ npx difit feature # feature 브랜치의 최신 커밋
39
+ ```
40
+
41
+ ### 두 커밋 비교
42
+
43
+ ```bash
44
+ npx difit HEAD main # HEAD와 main 브랜치 비교
45
+ npx difit feature main # 브랜치 간 비교
46
+ npx difit . origin/main # 작업 디렉토리와 원격 main 비교
47
+ ```
48
+
49
+ ### 특수 인수
50
+
51
+ difit은 일반적인 diff 시나리오를 위한 특수 키워드를 지원합니다:
52
+
53
+ ```bash
54
+ npx difit . # 모든 커밋되지 않은 변경 사항 (스테이징 영역 + 미스테이징)
55
+ npx difit staged # 스테이징 영역 변경 사항
56
+ npx difit working # 미스테이징 변경 사항만
57
+ ```
58
+
59
+ ### GitHub PR
60
+
61
+ ```bash
62
+ npx difit --pr https://github.com/owner/repo/pull/123
63
+ ```
64
+
65
+ difit은 다음 방법으로 GitHub 인증을 자동으로 처리합니다:
66
+
67
+ 1. **GitHub CLI** (권장): `gh auth login`으로 로그인한 경우 기존 자격 증명 사용
68
+ 2. **환경 변수**: `GITHUB_TOKEN` 환경 변수 설정
69
+ 3. **인증 없음**: 공개 저장소는 인증 없이 작동 (속도 제한 있음)
70
+
71
+ #### GitHub Enterprise Server
72
+
73
+ Enterprise Server PR의 경우 귀하의 Enterprise Server 인스턴스에서 생성된 토큰을 설정해야 합니다:
74
+
75
+ 1. `https://YOUR-ENTERPRISE-SERVER/settings/tokens`로 이동
76
+ 2. 적절한 범위로 개인 액세스 토큰 생성
77
+ 3. `GITHUB_TOKEN` 환경 변수로 설정
78
+
79
+ ## ⚙️ CLI 옵션
80
+
81
+ | 플래그 | 기본값 | 설명 |
82
+ | ---------------- | ------------ | ----------------------------------------------------------------- |
83
+ | `<target>` | HEAD | 커밋 해시, 태그, HEAD~n, 브랜치 또는 특수 인수 |
84
+ | `[compare-with]` | - | 비교할 선택적 두 번째 커밋 (둘 사이의 diff 표시) |
85
+ | `--pr <url>` | - | 검토할 GitHub PR URL (예: https://github.com/owner/repo/pull/123) |
86
+ | `--port` | 3000 | 선호 포트; 사용 중인 경우 +1로 대체 |
87
+ | `--host` | 127.0.0.1 | 서버를 바인딩할 호스트 주소 (외부 액세스는 0.0.0.0 사용) |
88
+ | `--no-open` | false | 브라우저를 자동으로 열지 않음 |
89
+ | `--mode` | side-by-side | 표시 모드: `inline` 또는 `side-by-side` |
90
+ | `--tui` | false | WebUI 대신 터미널 UI 모드 사용 |
91
+ | `--clean` | false | 시작 시 모든 기존 코멘트 지우기 |
92
+
93
+ ## 💬 코멘트 시스템
94
+
95
+ difit은 AI 코딩 에이전트에 피드백을 쉽게 제공할 수 있는 리뷰 코멘트 시스템을 포함합니다:
96
+
97
+ 1. **코멘트 추가**: diff 줄의 코멘트 버튼을 클릭하거나 드래그하여 범위 선택
98
+ 2. **코멘트 편집**: 편집 버튼으로 기존 코멘트 편집
99
+ 3. **프롬프트 생성**: 코멘트에는 AI 코딩 에이전트용 컨텍스트를 포맷하는 "프롬프트 복사" 버튼 포함
100
+ 4. **모두 복사**: "모든 프롬프트 복사"를 사용하여 구조화된 형식으로 모든 코멘트 복사
101
+ 5. **영구 저장**: 코멘트는 커밋별로 브라우저 localStorage에 저장
102
+
103
+ ### 코멘트 프롬프트 형식
104
+
105
+ ```sh
106
+ src/components/Button.tsx:L42 # 이 줄은 자동으로 추가됩니다
107
+ 이 변수 이름을 더 설명적으로 만드세요
108
+ ```
109
+
110
+ 범위 선택의 경우:
111
+
112
+ ```sh
113
+ src/components/Button.tsx:L42-L48 # 이 줄은 자동으로 추가됩니다
114
+ 이 부분은 불필요합니다
115
+ ```
116
+
117
+ ## 🎨 구문 강조 언어
118
+
119
+ - **JavaScript/TypeScript**: `.js`, `.jsx`, `.ts`, `.tsx`
120
+ - **웹 기술**: HTML, CSS, JSON, XML, Markdown
121
+ - **셸 스크립트**: `.sh`, `.bash`, `.zsh`, `.fish`
122
+ - **백엔드 언어**: PHP, SQL, Ruby, Java, Scala
123
+ - **시스템 언어**: C, C++, C#, Rust, Go
124
+ - **모바일 언어**: Swift, Kotlin, Dart
125
+ - **기타**: Python, YAML, Solidity, Vim 스크립트
126
+
127
+ ## 🛠️ 개발
128
+
129
+ ```bash
130
+ # 의존성 설치
131
+ pnpm install
132
+
133
+ # 개발 서버 시작 (핫 리로드 포함)
134
+ # Vite 개발 서버와 CLI를 NODE_ENV=development로 동시에 실행
135
+ pnpm run dev
136
+
137
+ # 프로덕션 서버 빌드 및 시작
138
+ pnpm run start <target>
139
+
140
+ # 프로덕션용 빌드
141
+ pnpm run build
142
+
143
+ # 테스트 실행
144
+ pnpm test
145
+
146
+ # 린트 및 포맷
147
+ pnpm run lint
148
+ pnpm run format
149
+ pnpm run typecheck
150
+ ```
151
+
152
+ ### 개발 워크플로우
153
+
154
+ - **`pnpm run dev`**: Vite 개발 서버 (핫 리로드 포함)와 CLI 서버를 동시에 시작
155
+ - **`pnpm run start <target>`**: 모든 것을 빌드하고 프로덕션 서버 시작 (최종 빌드 테스트용)
156
+ - **개발 모드**: 핫 리로드와 빠른 개발을 위해 Vite의 개발 서버 사용
157
+ - **프로덕션 모드**: 빌드된 정적 파일 제공 (npx 및 프로덕션 빌드에서 사용)
158
+
159
+ ## 🏗️ 아키텍처
160
+
161
+ - **CLI**: 포괄적인 검증을 갖춘 Commander.js로 인수 구문 분석
162
+ - **백엔드**: diff 처리를 위한 simple-git이 포함된 Express 서버
163
+ - **GitHub 통합**: 자동 인증 (GitHub CLI + 환경 변수)을 갖춘 GitHub API용 Octokit
164
+ - **프론트엔드**: React 18 + TypeScript + Vite
165
+ - **스타일링**: GitHub과 유사한 다크 테마를 갖춘 Tailwind CSS v4
166
+ - **구문 강조**: 동적 언어 로딩을 갖춘 Prism.js
167
+ - **테스트**: 동일 위치에 배치된 테스트 파일을 사용하는 Vitest 단위 테스트
168
+ - **품질**: ESLint, Prettier, lefthook 사전 커밋 훅
169
+
170
+ ## 📋 요구 사항
171
+
172
+ - Node.js ≥ 21.0.0
173
+ - 검토할 커밋이 포함된 Git 저장소
174
+
175
+ ## 📄 라이선스
176
+
177
+ MIT
package/README.md CHANGED
@@ -2,18 +2,22 @@
2
2
  <img src="public/logo.png" alt="difit" width="260">
3
3
  </h1>
4
4
 
5
- **difit** is a zero-config CLI that launches a GitHub-style diff viewer right on your machine. Review commits in a clean “Files changed” layout, add inline comments, and copy those comments as ready-to-paste AI prompts. Perfect for code review workflows without leaving the terminal! 🚀
5
+ <p align="center">
6
+ English | <a href="./README.ja.md">日本語</a> | <a href="./README.zh.md">简体中文</a> | <a href="./README.ko.md">한국어</a>
7
+ </p>
8
+
9
+ **difit** is a CLI tool that lets you view and review local git diffs with a GitHub-style viewer. In addition to clean visuals, comments can be copied as prompts for AI. The local code review tool for the AI era!
6
10
 
7
11
  ## ✨ Features
8
12
 
9
- - ⚡ **Zero Config**: Just run `npx difit <commit>` and it works
10
- - 🌙 **Review for AI**: Add comments and copy prompts for AI coding agent
11
- - 🖥️ **Terminal UI**: View diffs directly in terminal with `--tui`
13
+ - ⚡ **Zero Config**: Just run `npx difit` and it works
14
+ - 💬 **Local Review**: Add comments to diffs and copy them with file paths and line numbers for AI
15
+ - 🖥️ **WebUI/TerminalUI**: Web UI in browser, or stay in terminal with `--tui`
12
16
 
13
17
  ## ⚡ Quick Start
14
18
 
15
19
  ```bash
16
- npx difit # View HEAD commit changes in a beautiful diff viewer
20
+ npx difit # View the latest commit diff in WebUI
17
21
  ```
18
22
 
19
23
  ## 🚀 Usage
@@ -21,17 +25,17 @@ npx difit # View HEAD commit changes in a beautiful diff viewer
21
25
  ### Basic Usage
22
26
 
23
27
  ```bash
24
- npx difit <commit-ish> # View single commit diff
25
- npx difit <commit-ish> [compare-with] # Compare two commits/branches
28
+ npx difit <target> # View single commit diff
29
+ npx difit <target> [compare-with] # Compare two commits/branches
26
30
  npx difit --pr <github-pr-url> # Review GitHub pull request
27
31
  ```
28
32
 
29
33
  ### Single commit review
30
34
 
31
35
  ```bash
36
+ npx difit # HEAD (latest) commit
32
37
  npx difit 6f4a9b7 # Specific commit
33
- npx difit HEAD^ # Previous commit
34
- npx difit feature # Latest commit on branch
38
+ npx difit feature # Latest commit on feature branch
35
39
  ```
36
40
 
37
41
  ### Compare two commits
@@ -47,18 +51,11 @@ npx difit . origin/main # Compare working directory with remote main
47
51
  difit supports special keywords for common diff scenarios:
48
52
 
49
53
  ```bash
50
- npx difit # HEAD commit changes
51
- npx difit . # All uncommitted changes (staged + unstaged)
52
- npx difit staged # Staged changes ready for commit
53
- npx difit working # Unstaged changes only (cannot use compare-with)
54
+ npx difit . # All uncommitted changes (staging area + unstaged)
55
+ npx difit staged # Staging area changes
56
+ npx difit working # Unstaged changes only
54
57
  ```
55
58
 
56
- | Keyword | Description | Compare-with Support |
57
- | --------- | ------------------------------------------------------ | -------------------- |
58
- | `.` | Shows all uncommitted changes (both staged & unstaged) | ✅ Yes |
59
- | `staged` | Shows staged changes ready to be committed | ✅ Yes |
60
- | `working` | Shows unstaged changes in your working directory | ❌ No |
61
-
62
59
  ### GitHub PR
63
60
 
64
61
  ```bash
@@ -71,57 +68,62 @@ difit automatically handles GitHub authentication using:
71
68
  2. **Environment Variable**: Set `GITHUB_TOKEN` environment variable
72
69
  3. **No Authentication**: Public repositories work without authentication (rate-limited)
73
70
 
71
+ #### GitHub Enterprise Server
72
+
73
+ For Enterprise Server PRs, you must set a token generated on YOUR Enterprise Server instance:
74
+
75
+ 1. Go to `https://YOUR-ENTERPRISE-SERVER/settings/tokens`
76
+ 2. Generate a personal access token with appropriate scopes
77
+ 3. Set it as `GITHUB_TOKEN` environment variable
78
+
74
79
  ## ⚙️ CLI Options
75
80
 
76
81
  | Flag | Default | Description |
77
82
  | ---------------- | ------------ | ---------------------------------------------------------------------- |
78
- | `<commit-ish>` | HEAD | Any Git reference: hash, tag, HEAD~n, branch, or Special Arguments |
79
- | `[compare-with]` | (optional) | Optional second commit to compare with (shows diff between the two) |
83
+ | `<target>` | HEAD | Commit hash, tag, HEAD~n, branch, or special arguments |
84
+ | `[compare-with]` | - | Optional second commit to compare with (shows diff between the two) |
80
85
  | `--pr <url>` | - | GitHub PR URL to review (e.g., https://github.com/owner/repo/pull/123) |
81
- | `--port` | auto | Preferred port; falls back if occupied |
86
+ | `--port` | 3000 | Preferred port; falls back to +1 if occupied |
82
87
  | `--host` | 127.0.0.1 | Host address to bind server to (use 0.0.0.0 for external access) |
83
88
  | `--no-open` | false | Don't automatically open browser |
84
- | `--mode` | side-by-side | Diff mode: `inline` or `side-by-side` |
85
- | `--tui` | false | Use terminal UI mode instead of web interface |
89
+ | `--mode` | side-by-side | Display mode: `inline` or `side-by-side` |
90
+ | `--tui` | false | Use terminal UI mode instead of WebUI |
91
+ | `--clean` | false | Clear all existing comments on startup |
86
92
 
87
93
  ## 💬 Comment System
88
94
 
89
- difit includes an inline commenting system that integrates with AI coding agent:
95
+ difit includes a review comment system that makes it easy to provide feedback to AI coding agents:
90
96
 
91
- 1. **Add Comments**: Click on any diff line to add a comment
97
+ 1. **Add Comments**: Click the comment button on any diff line or drag to select a range
92
98
  2. **Edit Comments**: Edit existing comments with the edit button
93
- 3. **Generate Prompts**: Comments include a "Copy Prompt" button that formats the context for AI coding agent
99
+ 3. **Generate Prompts**: Comments include a "Copy Prompt" button that formats the context for AI coding agents
94
100
  4. **Copy All**: Use "Copy All Prompt" to copy all comments in a structured format
95
101
  5. **Persistent Storage**: Comments are saved in browser localStorage per commit
96
102
 
97
103
  ### Comment Prompt Format
98
104
 
99
105
  ```sh
100
- src/components/Button.tsx:42 # Automatically added this line
101
- This name should probably be more specific.
106
+ src/components/Button.tsx:L42 # This line is automatically added
107
+ Make this variable name more descriptive
102
108
  ```
103
109
 
104
- ## 🎨 Syntax Highlighting
110
+ For range selections:
105
111
 
106
- difit supports syntax highlighting for multiple programming languages with dynamic loading:
112
+ ```sh
113
+ src/components/Button.tsx:L42-L48 # This line is automatically added
114
+ This section is unnecessary
115
+ ```
107
116
 
108
- ### Supported Languages
117
+ ## 🎨 Syntax Highlighting Languages
109
118
 
110
119
  - **JavaScript/TypeScript**: `.js`, `.jsx`, `.ts`, `.tsx`
111
120
  - **Web Technologies**: HTML, CSS, JSON, XML, Markdown
112
- - **Shell Scripts**: `.sh`, `.bash`, `.zsh`, `.fish` files
121
+ - **Shell Scripts**: `.sh`, `.bash`, `.zsh`, `.fish`
113
122
  - **Backend Languages**: PHP, SQL, Ruby, Java, Scala
114
123
  - **Systems Languages**: C, C++, C#, Rust, Go
115
124
  - **Mobile Languages**: Swift, Kotlin, Dart
116
125
  - **Others**: Python, YAML, Solidity, Vim script
117
126
 
118
- ### Dynamic Language Loading
119
-
120
- - Languages are loaded on-demand for better performance
121
- - Automatic language detection from file extensions
122
- - Fallback to plain text for unsupported languages
123
- - Safe dependency resolution (e.g., PHP requires markup-templating)
124
-
125
127
  ## 🛠️ Development
126
128
 
127
129
  ```bash
@@ -133,7 +135,7 @@ pnpm install
133
135
  pnpm run dev
134
136
 
135
137
  # Build and start production server
136
- pnpm run start <commit-ish>
138
+ pnpm run start <target>
137
139
 
138
140
  # Build for production
139
141
  pnpm run build
@@ -150,7 +152,7 @@ pnpm run typecheck
150
152
  ### Development Workflow
151
153
 
152
154
  - **`pnpm run dev`**: Starts both Vite dev server (with hot reload) and CLI server simultaneously
153
- - **`pnpm run start <commit-ish>`**: Builds everything and starts production server (for testing final build)
155
+ - **`pnpm run start <target>`**: Builds everything and starts production server (for testing final build)
154
156
  - **Development mode**: Uses Vite's dev server for hot reload and fast development
155
157
  - **Production mode**: Serves built static files (used by npx and production builds)
156
158
 
@@ -172,4 +174,4 @@ pnpm run typecheck
172
174
 
173
175
  ## 📄 License
174
176
 
175
- MIT 📝
177
+ MIT