A terminal interface for checking git diff of repositories
npm install gitsum-cliA powerful terminal interface for checking git diff of repositories. GitSum provides an intuitive CLI tool to analyze git changes with beautiful colored output and comprehensive diff options.
- 🎨 Colored Output: Beautiful colored diff output for better readability
- 📊 Multiple Diff Types: Check staged, unstaged, or all changes
- 🔍 Branch Comparison: Compare with any branch or commit
- 🔀 Visual Branch Diff: Dedicated command to visualize differences between two branches
- 📁 File Filtering: Show diff for specific files
- 📈 Status Summary: Get overview of repository changes
- 📊 Commit Statistics: See how many commits ahead/behind branches are
- ⚡ Fast & Lightweight: Quick execution with minimal dependencies
bash
npm install -g gitsum
`$3
`bash
npm install gitsum
`$3
`bash
git clone
cd gitsum
pnpm install
pnpm build
`Usage
$3
`bash
Show default diff (unstaged changes)
gitsum diffShow staged changes
gitsum diff --stagedShow all changes (staged + unstaged)
gitsum diff --allCompare with a specific branch
gitsum diff --branch mainCompare with a specific commit
gitsum diff --commit HEAD~1Show diff for a specific file
gitsum diff --file src/index.tsCompare two branches (visualize differences)
gitsum compare --base main --compare feature-branchCompare current branch with another branch
gitsum compare --compare mainShow only summary without full diff
gitsum compare --base main --compare feature-branch --summaryShow repository status
gitsum statusShow repository information
gitsum info
`$3
`bash
Show word-level diff
gitsum diff --word-diffSet number of context lines
gitsum diff --context 5Disable colored output
gitsum diff --no-colorCombine multiple options
gitsum diff --staged --context 10 --word-diff
`$3
####
gitsum diff
- -s, --staged: Show staged changes only
- -u, --unstaged: Show unstaged changes only
- -a, --all: Show all changes (staged + unstaged)
- -b, --branch : Compare with specific branch
- -c, --commit : Compare with specific commit
- -f, --file : Show diff for specific file
- -C, --context : Number of context lines (default: 3)
- --no-color: Disable colored output
- -w, --word-diff: Show word-level diff####
gitsum status
Shows repository status and information including:
- Current branch
- Remote URL
- Last commit
- Number of modified files####
gitsum compare
Compare two branches and visualize the differences with detailed statistics.-
-b, --base : Base branch to compare from (default: current branch)
- -c, --compare : Branch to compare against (default: current branch)
- -s, --summary: Show only summary without full diff
- -C, --context : Number of context lines in diff (default: 3)
- --no-color: Disable colored output
- -f, --file : Show diff for specific file onlyThe compare command shows:
- Branch information (commit, author, date, message)
- Commit statistics (ahead/behind counts)
- File changes (added, modified, deleted, renamed)
- Diff statistics (lines changed)
- Full diff output (unless
--summary is used)####
gitsum info
Same as status command - shows repository information.Examples
$3
`bash
gitsum diff --staged
`$3
`bash
gitsum diff --all
`$3
`bash
gitsum diff --branch main
`$3
`bash
Compare feature-branch with main
gitsum compare --base main --compare feature-branchCompare current branch with main (summary only)
gitsum compare --compare main --summary
`$3
`bash
gitsum diff --file package.json
`$3
`bash
gitsum status
`Development
$3
`bash
pnpm build
`$3
`bash
pnpm dev
`$3
`bash
Run the CLI tool in any git repository
cd /path/to/git/repo
gitsum diff
``- Node.js 14+
- Git repository (for diff operations)
ISC