Self Review
Review your own code changes before committing or requesting peer review.
Usage
Direct mode
bash
bunx difit $ARGUMENTS
Common arguments:
- •
.— All uncommitted changes (staged + unstaged) - •
staged— Staged changes only - •
working— Unstaged changes only - •
@ main— Compare HEAD with main branch
Stdin mode
Pipe a git diff for full control over the diff content:
bash
git diff $ARGUMENTS | bunx difit
Use stdin mode when $ARGUMENTS contains 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:
code
📝 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