AI-powered code review for diffs
Sight provides intelligent code review capabilities by analyzing diffs with AI. It understands context, identifies issues, and suggests improvements.
- Diff-aware analysis - Reviews only changed code with full context
- Severity classification - Categorizes findings by impact
- Provider agnostic - Works with any LLM provider through the
Providerinterface - Extensible rules - Add custom review rules for your codebase
go get github.com/GrayCodeAI/sightimport "github.com/GrayCodeAI/sight"
reviewer := sight.NewReviewer(
sight.WithProvider(myLLMProvider),
sight.Thorough,
)
result, err := reviewer.Review(ctx, diff)
for _, f := range result.Findings {
fmt.Printf("[%s] %s:%d - %s\n", f.Severity, f.File, f.Line, f.Message)
}See the examples/ directory for runnable code samples.
Implement the Provider interface to use any LLM:
type Provider interface {
Chat(ctx context.Context, messages []Message, opts ChatOpts) (*Response, error)
}go get github.com/GrayCodeAI/sight@latestRequires Go 1.26+.
Contributions are welcome — please read CONTRIBUTING.md before opening a pull request.
MIT - see LICENSE for details.