Overview
After Qoder modifies code, you usually want to see what it changed and give the changes a review. Qoder CLI CN provides two capabilities: view the concrete code differences with /diff, and run a structured code review on the changes with /review to find fixable issues.
Both capabilities are based on Git, so they must be used inside a Git repository.
Viewing changes (/diff)
Use /diff to view the code differences in the current workspace:
Reviewing changes (/review)
/review runs a review over the code changes and finds fixable issues. It can be used in two ways:
Interactively choose the review scope
Run without arguments and /review lets you choose the review scope:
- Current changes: review staged, unstaged, and untracked files.
- Base branch: pick a local branch and review the current branch's changes relative to it.
- Commit: pick one commit from the recent commit list to review (up to 100 commits listed).
- Custom instructions: enter custom review requirements.
Give review instructions directly
Run with arguments, and the arguments are submitted to Qoder directly as review instructions:
Review scopes explained
| Scope | What is reviewed |
|---|---|
| Current changes | Staged, unstaged, and untracked files in the workspace |
| Base branch | The current branch's diff relative to the selected local branch |
| Commit | The changes introduced by the selected commit |
| Custom instructions | A review according to the requirements you enter |
main or master branch exists, it is preferred as the default comparison branch.
Suggested flow
A common "change — view — review" flow:
- Have Qoder complete a modification.
- Use
/diffto quickly see what it changed. - Use
/reviewto run a structured review and surface potential issues. - Have Qoder keep fixing based on the review findings.
Both/reviewand/diffmust run inside a Git repository. If you are not in a Git repository, or there is no usable branch/commit, Qoder shows a corresponding message.