Skip to main content

Crate rs_guard

Crate rs_guard 

Source
Expand description

rs-guard — AI-powered code review CLI for GitHub Pull Requests.

This crate provides the core functionality for fetching PR diffs, sending them to an LLM for review, parsing structured verdicts, and submitting review states back to GitHub.

§Modules

  • cache — LLM response caching with SHA-256 keyed entries
  • cli — Command-line argument parsing
  • config — Environment and configuration resolution
  • diff — PR diff fetching (GitHub API and local git)
  • error — Unified error types
  • github — GitHub review submission and dismissal
  • http — Shared HTTP utilities and URL validation
  • llm — LLM provider abstraction and implementations
  • output — Terminal output and artifact writing
  • pipeline — Orchestration of the full review workflow
  • redact — Secret redaction and content filtering
  • retry — Transient failure retry logic and circuit breaker
  • verdict — Verdict parsing and review state determination

Modules§

cache
Response caching for LLM results.
cli
CLI argument definitions using clap derive macros.
config
Configuration resolution from environment variables, TOML file, and CLI arguments.
diff
Diff fetching from GitHub Pull Requests and local git staging.
error
Error types for the rs-guard application.
github
GitHub API interaction for submitting reviews and dismissing stale blockers.
http
Shared HTTP utilities for GitHub API communication.
llm
LLM provider abstraction and shared types.
output
Terminal output formatting and review artifact writing.
pipeline
Pipeline orchestration and result types.
redact
Secret redaction and content filtering.
retry
Retry logic for transient API failures.
verdict
Verdict parsing and review state determination.