@jxtools/visualgit 1.0.0 → 1.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.md +15 -42
- package/bin/cli.js +9 -2
- package/dist/assets/index-CfMbMqji.js +13 -0
- package/dist/index.html +1 -1
- package/dist-server/index.js +6 -6
- package/dist-server/routes/ai.js +2 -2
- package/dist-server/services/ai.service.js +4 -4
- package/package.json +1 -1
- package/dist/assets/index-BZU2xrvr.js +0 -13
package/README.md
CHANGED
|
@@ -2,67 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
Terminal-style git diff viewer with AI-powered explanations.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
5
|
+
## Install
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
|
|
8
|
+
npm install -g @jxtools/visualgit
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Navigate to any git repository and run:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm install -g visualgit
|
|
17
16
|
visualgit
|
|
18
17
|
```
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- Detects your current branch and compares it against the base branch (upstream, develop, main, or master)
|
|
23
|
-
- Displays a colored diff with additions/deletions in a dark terminal-style UI
|
|
24
|
-
- Shows ahead/behind commit counts
|
|
25
|
-
- Provides on-demand AI analysis of your changes using Claude CLI or OpenAI
|
|
26
|
-
|
|
27
|
-
## AI Analysis
|
|
28
|
-
|
|
29
|
-
The AI panel lets you get explanations of your diff on demand. Click **"Get AI Analysis"** to trigger it - it does not run automatically.
|
|
30
|
-
|
|
31
|
-
**Supported providers:**
|
|
19
|
+
This opens a browser window with a visual diff between your current branch and its base branch.
|
|
32
20
|
|
|
33
|
-
|
|
34
|
-
- **OpenAI** - Uses your existing `openai` CLI login
|
|
21
|
+
## Features
|
|
35
22
|
|
|
36
|
-
|
|
23
|
+
- Colored diff viewer with file tree navigation
|
|
24
|
+
- Collapsible file sections with viewed tracking
|
|
25
|
+
- AI analysis of your changes on demand (Claude or OpenAI)
|
|
26
|
+
- Resizable panels and dark terminal-style UI
|
|
37
27
|
|
|
38
|
-
##
|
|
28
|
+
## Update
|
|
39
29
|
|
|
40
30
|
```bash
|
|
41
|
-
|
|
42
|
-
npm install
|
|
43
|
-
|
|
44
|
-
# Run frontend dev server
|
|
45
|
-
npm run dev
|
|
46
|
-
|
|
47
|
-
# Run backend dev server (separate terminal)
|
|
48
|
-
npm run dev:server
|
|
49
|
-
|
|
50
|
-
# Run tests
|
|
51
|
-
npm test
|
|
31
|
+
npm update -g @jxtools/visualgit
|
|
52
32
|
```
|
|
53
33
|
|
|
54
|
-
## Tech Stack
|
|
55
|
-
|
|
56
|
-
- **Frontend:** React 19 + Vite 7 + Tailwind CSS 4 + TypeScript
|
|
57
|
-
- **Backend:** Express 5 + simple-git
|
|
58
|
-
- **AI:** Claude CLI (`claude -p`) / OpenAI CLI
|
|
59
|
-
- **Testing:** Vitest
|
|
60
|
-
|
|
61
34
|
## Requirements
|
|
62
35
|
|
|
63
36
|
- Node.js 18+
|
|
64
|
-
-
|
|
65
|
-
- Claude CLI or OpenAI CLI installed
|
|
37
|
+
- Must be run inside a git repository
|
|
38
|
+
- For AI features: Claude CLI or OpenAI CLI installed
|
|
66
39
|
|
|
67
40
|
## License
|
|
68
41
|
|
package/bin/cli.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { existsSync } from 'fs'
|
|
3
|
+
import { existsSync, readFileSync } from 'fs'
|
|
4
4
|
import { resolve, dirname } from 'path'
|
|
5
5
|
import { fileURLToPath } from 'url'
|
|
6
6
|
import { spawn } from 'child_process'
|
|
7
7
|
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
9
|
+
|
|
10
|
+
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
11
|
+
const pkg = JSON.parse(readFileSync(resolve(__dirname, '..', 'package.json'), 'utf-8'))
|
|
12
|
+
console.log(`visualgit v${pkg.version}`)
|
|
13
|
+
process.exit(0)
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
const repoPath = process.cwd()
|
|
9
17
|
const isGitRepo = existsSync(resolve(repoPath, '.git'))
|
|
10
18
|
|
|
11
19
|
async function main() {
|
|
12
|
-
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
13
20
|
const serverPath = resolve(__dirname, '..', 'dist-server', 'index.js')
|
|
14
21
|
|
|
15
22
|
if (!existsSync(serverPath)) {
|