Documentation
Using Trevyn AI
Interact with Trevyn AI directly from your GitHub Pull Requests using comment commands. Trigger new reviews, apply suggestions automatically, and teach Trevyn new rules.
Automated Reviews
By default, Trevyn AI automatically reviews your code whenever a Pull Request is opened or when new commits are pushed (synchronized). As long as the repository is activated in your dashboard, no manual action is required to get the initial review.
Triggering On-Demand Reviews
If you want Trevyn to perform a fresh review of an open Pull Request outside of the automated flow, you can invoke it manually. Simply leave a comment on the PR with one of the following commands:
@trevynai review@trevynai re-review@trevynai rereview@trevynai analyze
Once triggered, Trevyn will acknowledge the request and post a new comprehensive review.
Requesting a Summary
If you only want a high-level summary of the PR rather than a line-by-line review, use the summary command:
@trevynai summary
This will provide a concise overview of the changes without generating individual review comments on specific lines.
Applying Code Suggestions
When Trevyn AI identifies potential improvements, it provides actionable code suggestions. You can command Trevyn to automatically commit these suggestions directly to your branch.
Apply a single suggestion
Reply to Trevyn's review comment to apply a specific suggestion by its index number:
@trevynai apply 1
You can also provide a custom commit message by using the | separator:
@trevynai apply 1 | refactor: optimize sorting logic
Apply all suggestions
To accept and commit all suggestions provided in the review at once, use:
@trevynai apply-all
Teaching Trevyn via Replies
Trevyn gets smarter through conversation. If you disagree with a suggestion or want to clarify a project-specific convention, simply reply to Trevyn's review comment with your feedback.
Trevyn automatically analyzes your reply. If the feedback is educational or establishes a pattern (e.g., "We prefer using TanStack Query for all data fetching instead of useEffect"), Trevyn will record it as a Learning. This learning is stored in your team's knowledge base and will influence how Trevyn evaluates future Pull Requests, ensuring it aligns more closely with your team's unique standards over time.