You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-14Lines changed: 26 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,15 +23,16 @@ npm i -g hunkdiff
23
23
Requirements:
24
24
25
25
- Node.js 18+
26
+
- Currently supported on macOS and Linux
26
27
- Git is recommended for most workflows
27
28
28
-
## Basic usage
29
+
## Usage
30
+
31
+
### Basics
29
32
30
33
```bash
31
-
hunk # show help
32
-
hunk --version # show the installed version
33
-
hunk diff before.ts after.ts # compare two files directly
34
-
git diff --no-color | hunk patch - # review a patch from stdin
34
+
hunk # show help
35
+
hunk --version # get version
35
36
```
36
37
37
38
### Working with Git
@@ -43,6 +44,13 @@ hunk show # review the latest commit
43
44
hunk show HEAD~1 # review an earlier commit
44
45
```
45
46
47
+
### Working with raw files/patches
48
+
49
+
```bash
50
+
hunk diff before.ts after.ts # compare two files directly
51
+
git diff --no-color | hunk patch - # review a patch from stdin
52
+
```
53
+
46
54
## Feature comparison
47
55
48
56
| Capability | hunk | difftastic | delta | diff |
@@ -90,24 +98,28 @@ Ready-to-run demo diffs live in [`examples/`](examples/README.md).
90
98
91
99
Each example includes the exact command to run from the repository root.
92
100
93
-
## Advanced features
101
+
## Config
94
102
95
-
-`hunk patch [file|-]` opens patch files or patch stdin
96
-
-`hunk pager` opens Hunk for diff-like stdin and falls back to plain-text paging otherwise
97
-
-`hunk diff --agent-context <file>` loads inline agent rationale from a JSON sidecar
98
-
-`hunk mcp serve` runs the local MCP daemon for agent-to-diff communication
99
-
- Hunk reads config from `~/.config/hunk/config.toml` and `.hunk/config.toml`
103
+
Hunk reads config from:
104
+
105
+
-`~/.config/hunk/config.toml`
106
+
-`.hunk/config.toml`
100
107
101
-
Minimal config example:
108
+
Example:
102
109
103
110
```toml
104
-
theme = "midnight"
105
-
mode = "auto"
111
+
theme = "midnight"# midnight, graphite, paper, ember
112
+
mode = "auto"# auto, split, stack
106
113
line_numbers = true
107
114
wrap_lines = false
108
115
agent_notes = false
109
116
```
110
117
118
+
## Advanced workflows
119
+
120
+
-`hunk diff --agent-context <file>` loads inline agent rationale from a JSON sidecar
121
+
-`hunk mcp serve` runs the local MCP daemon for agent-to-diff communication
122
+
111
123
## Performance notes
112
124
113
125
Hunk spends more startup time than plain diff output tools because it launches an interactive UI with syntax highlighting, navigation state, and optional agent context. In exchange, it is optimized for reviewing a full changeset instead of printing static diff text and exiting.
0 commit comments