Skip to content

Commit f285f3a

Browse files
docs: update readme
1 parent 614e40e commit f285f3a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

+33
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,39 @@ GitHub, GitLab, or any other git provider diffs are often overwhelming - endless
9797

9898
## Usage
9999

100+
### Installation
101+
102+
```bash
103+
# Global installation (accessible everywhere)
104+
npm install -g gitloom-diff
105+
106+
# Local installation (project-specific)
107+
npm install gitloom-diff
108+
```
109+
110+
When installed locally, you can add it to your package.json scripts for common workflows:
111+
```json
112+
{
113+
"scripts": {
114+
"diff:main": "gitloom-diff -s HEAD -e main",
115+
"diff:staged": "gitloom-diff -s HEAD -e --staged",
116+
"pr:diff": "gitloom-diff -s $npm_config_branch -e main"
117+
}
118+
}
119+
```
120+
121+
Then run:
122+
```bash
123+
# Compare current branch with main
124+
npm run diff:main
125+
126+
# Review staged changes
127+
npm run diff:staged
128+
129+
# Compare specific branch with main
130+
npm run pr:diff --branch=feature/awesome
131+
```
132+
100133
### Basic Commands
101134

102135
```bash

0 commit comments

Comments
 (0)