Self Review
Review your own code changes before committing or requesting peer review.
Usage
Direct mode
bunx difit $ARGUMENTS
Common arguments:
staged— Staged changes onlyworking— Unstaged changes only@ main— Compare HEAD with main branch
Stdin mode
Pipe a git diff for full control over the diff content:
git diff $ARGUMENTS | bunx difit
Common arguments:
HEAD— All uncommitted changes (staged + unstaged)--merge-base main— Changes since diverging from main
Use stdin mode for all uncommitted changes (git diff HEAD) or when using git diff flags (e.g., --merge-base, revision ranges).
Workflow
- Run
difitwith the target diff - User reviews in the browser and adds comments on specific lines
- When the user closes the browser tab, comments are output to stdout
- Parse the comments and apply the requested changes
Comment Format
Comments are output in this format:
📝 Comments from review session:
==================================================
path/to/file.ts:L42
Comment text here
=====
path/to/other.ts:L10-L20
Comment on a range of lines
==================================================
Total comments: 2
Applying Feedback
For each comment:
- Read the referenced file and lines
- Understand the requested change
- Apply the edit using the Edit tool
- Confirm the change was made correctly
Converted and distributed by TomeVault — claim your Tome and manage your conversions.