Documentation
¶
Overview ¶
Package cli handles detection, invocation, and version extraction for LLM CLI tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaudeInvoker ¶
type ClaudeInvoker struct {
// contains filtered or unexported fields
}
ClaudeInvoker runs the Anthropic Claude CLI. Uses stdin pipe similar to Gemini.
type CodexInvoker ¶
type CodexInvoker struct {
// contains filtered or unexported fields
}
CodexInvoker runs the OpenAI Codex CLI. Note: Actual CLI invocation pattern needs verification - current implementation may not work correctly. Disabled by default pending confirmation.
type GeminiInvoker ¶
type GeminiInvoker struct {
// contains filtered or unexported fields
}
GeminiInvoker runs the Google Gemini CLI. Uses: git diff | gemini -p "Review these changes for bugs and security issues"
type Invoker ¶
type Invoker interface {
Review(ctx context.Context, diff string) (string, error)
// RunPrompt sends a raw prompt to the LLM without wrapping it in a code-review context
RunPrompt(ctx context.Context, prompt string) (string, error)
}
Invoker runs an LLM CLI with a diff and returns the review output.
func NewInvoker ¶
NewInvoker creates an invoker for the given LLM. Returns nil if the LLM name is unknown.
type LLM ¶
type LLM struct {
Name string // "claude", "gemini", "codex"
Path string // full path to the binary (e.g., "/usr/local/bin/claude")
Version string // version string (e.g., "2.1.0")
Available bool // true if CLI is found in PATH
TimeoutSec int // timeout in seconds for this LLM (from config)
}
LLM represents a detected CLI tool with its metadata.