difit 1.1.11 → 2.0.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 reviewit
3
+ Copyright (c) 2025 difit
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,21 +1,19 @@
1
- <div align="center">
2
- <img src="public/logo.png" alt="ReviewIt" width="400">
3
- </div>
1
+ <h1 align="center">
2
+ <img src="public/logo.png" alt="difit" width="260">
3
+ </h1>
4
4
 
5
- # ReviewIt 🔍
6
-
7
- A lightweight command-line tool that spins up a local web server to display Git commit diffs in a GitHub-like Files changed view. Perfect for code review workflows without leaving the terminal! 🚀
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! 🚀
8
6
 
9
7
  ## ✨ Features
10
8
 
11
- - ⚡ **Zero Config**: Just run `npx reviewit <commit>` and it works
9
+ - ⚡ **Zero Config**: Just run `npx difit <commit>` and it works
12
10
  - 🌙 **Review for AI**: Add comments and generate Claude Code prompts
13
11
  - 🖥️ **Terminal UI**: View diffs directly in terminal with `--tui`
14
12
 
15
13
  ## ⚡ Quick Start
16
14
 
17
15
  ```bash
18
- npx reviewit # View HEAD commit changes in a beautiful diff viewer
16
+ npx difit # View HEAD commit changes in a beautiful diff viewer
19
17
  ```
20
18
 
21
19
  ## 🚀 Usage
@@ -23,36 +21,36 @@ npx reviewit # View HEAD commit changes in a beautiful diff viewer
23
21
  ### Basic Usage
24
22
 
25
23
  ```bash
26
- npx reviewit <commit-ish> # View single commit diff
27
- npx reviewit <commit-ish> [compare-with] # Compare two commits/branches
28
- npx reviewit --pr <github-pr-url> # Review GitHub pull request
24
+ npx difit <commit-ish> # View single commit diff
25
+ npx difit <commit-ish> [compare-with] # Compare two commits/branches
26
+ npx difit --pr <github-pr-url> # Review GitHub pull request
29
27
  ```
30
28
 
31
29
  ### Single commit review
32
30
 
33
31
  ```bash
34
- npx reviewit 6f4a9b7 # Specific commit
35
- npx reviewit HEAD^ # Previous commit
36
- npx reviewit feature # Latest commit on branch
32
+ npx difit 6f4a9b7 # Specific commit
33
+ npx difit HEAD^ # Previous commit
34
+ npx difit feature # Latest commit on branch
37
35
  ```
38
36
 
39
37
  ### Compare two commits
40
38
 
41
39
  ```bash
42
- npx reviewit HEAD main # Compare HEAD with main branch
43
- npx reviewit feature main # Compare branches
44
- npx reviewit . origin/main # Compare working directory with remote main
40
+ npx difit HEAD main # Compare HEAD with main branch
41
+ npx difit feature main # Compare branches
42
+ npx difit . origin/main # Compare working directory with remote main
45
43
  ```
46
44
 
47
45
  ### Special Arguments
48
46
 
49
- ReviewIt supports special keywords for common diff scenarios:
47
+ difit supports special keywords for common diff scenarios:
50
48
 
51
49
  ```bash
52
- npx reviewit # HEAD commit changes
53
- npx reviewit . # All uncommitted changes (staged + unstaged)
54
- npx reviewit staged # Staged changes ready for commit
55
- npx reviewit working # Unstaged changes only (cannot use compare-with)
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)
56
54
  ```
57
55
 
58
56
  | Keyword | Description | Compare-with Support |
@@ -64,12 +62,12 @@ npx reviewit working # Unstaged changes only (cannot use compare-with)
64
62
  ### GitHub PR
65
63
 
66
64
  ```bash
67
- npx reviewit --pr https://github.com/owner/repo/pull/123
65
+ npx difit --pr https://github.com/owner/repo/pull/123
68
66
  ```
69
67
 
70
- ReviewIt automatically handles GitHub authentication using:
68
+ difit automatically handles GitHub authentication using:
71
69
 
72
- 1. **GitHub CLI** (recommended): If you're logged in with `gh auth login`, ReviewIt uses your existing credentials
70
+ 1. **GitHub CLI** (recommended): If you're logged in with `gh auth login`, difit uses your existing credentials
73
71
  2. **Environment Variable**: Set `GITHUB_TOKEN` environment variable
74
72
  3. **No Authentication**: Public repositories work without authentication (rate-limited)
75
73
 
@@ -88,7 +86,7 @@ ReviewIt automatically handles GitHub authentication using:
88
86
 
89
87
  ## 💬 Comment System
90
88
 
91
- ReviewIt includes an inline commenting system that integrates with Claude Code:
89
+ difit includes an inline commenting system that integrates with Claude Code:
92
90
 
93
91
  1. **Add Comments**: Click on any diff line to add a comment
94
92
  2. **Edit Comments**: Edit existing comments with the edit button
@@ -105,7 +103,7 @@ This name should probably be more specific.
105
103
 
106
104
  ## 🎨 Syntax Highlighting
107
105
 
108
- ReviewIt supports syntax highlighting for multiple programming languages with dynamic loading:
106
+ difit supports syntax highlighting for multiple programming languages with dynamic loading:
109
107
 
110
108
  ### Supported Languages
111
109
 
@@ -114,7 +112,7 @@ ReviewIt supports syntax highlighting for multiple programming languages with dy
114
112
  - **Shell Scripts**: `.sh`, `.bash`, `.zsh`, `.fish` files
115
113
  - **Backend Languages**: PHP, SQL, Ruby, Java, Scala
116
114
  - **Systems Languages**: C, C++, Rust, Go
117
- - **Others**: Python, Swift, Kotlin, YAML
115
+ - **Others**: Python, Swift, Kotlin, YAML, Solidity
118
116
 
119
117
  ### Dynamic Language Loading
120
118
 
package/dist/cli/index.js CHANGED
@@ -10,7 +10,7 @@ function isSpecialArg(arg) {
10
10
  }
11
11
  const program = new Command();
12
12
  program
13
- .name('reviewit')
13
+ .name('difit')
14
14
  .description('A lightweight Git diff viewer with GitHub-like interface')
15
15
  .version(pkg.version)
16
16
  .argument('[commit-ish]', 'Git commit, tag, branch, HEAD~n reference, or "working"/"staged"/"."', 'HEAD')
@@ -95,7 +95,7 @@ program
95
95
  openBrowser: options.open,
96
96
  mode: options.mode,
97
97
  });
98
- console.log(`\n🚀 ReviewIt server started on ${url}`);
98
+ console.log(`\n🚀 difit server started on ${url}`);
99
99
  console.log(`📋 Reviewing: ${targetCommitish}`);
100
100
  if (isEmpty) {
101
101
  console.log('\n! \x1b[33mNo differences found. Browser will not open automatically.\x1b[0m');
@@ -108,7 +108,7 @@ program
108
108
  console.log('💡 Use --open to automatically open browser\n');
109
109
  }
110
110
  process.on('SIGINT', async () => {
111
- console.log('\n👋 Shutting down ReviewIt server...');
111
+ console.log('\n👋 Shutting down difit server...');
112
112
  // Try to fetch comments before shutting down
113
113
  try {
114
114
  const response = await fetch(`http://localhost:${port}/api/comments-output`);
@@ -384,7 +384,7 @@ describe('CLI index.ts', () => {
384
384
  openBrowser: options.open,
385
385
  mode: options.mode,
386
386
  });
387
- console.log(`\n🚀 ReviewIt server started on ${url}`);
387
+ console.log(`\n🚀 difit server started on ${url}`);
388
388
  console.log(`📋 Reviewing: ${commitish}`);
389
389
  if (isEmpty) {
390
390
  console.log('\n! No differences found. Browser will not open automatically.');
@@ -398,7 +398,7 @@ describe('CLI index.ts', () => {
398
398
  }
399
399
  });
400
400
  await program.parseAsync([], { from: 'user' });
401
- expect(console.log).toHaveBeenCalledWith('\n🚀 ReviewIt server started on http://localhost:3000');
401
+ expect(console.log).toHaveBeenCalledWith('\n🚀 difit server started on http://localhost:3000');
402
402
  expect(console.log).toHaveBeenCalledWith('📋 Reviewing: HEAD');
403
403
  });
404
404
  it('displays correct message when no differences found', async () => {
@@ -427,7 +427,7 @@ describe('CLI index.ts', () => {
427
427
  openBrowser: options.open,
428
428
  mode: options.mode,
429
429
  });
430
- console.log(`\n🚀 ReviewIt server started on ${url}`);
430
+ console.log(`\n🚀 difit server started on ${url}`);
431
431
  console.log(`📋 Reviewing: ${commitish}`);
432
432
  if (isEmpty) {
433
433
  console.log('\n! No differences found. Browser will not open automatically.');