Skip to main content

ops ai

AI assistant commands. Provides a unified interface to Claude (via the Claude Code CLI) and Google Gemini (via the google-genai API). Use auto to let the CLI pick the best available provider.

Provider Routing

Use Claude for code intelligence (planning, implementation, review) and Gemini Flash for text formatting (classification, branch names, commit messages). auto honors this convention when both providers are available.

Subcommands

SubcommandDescription
statusShow status of available AI providers
autoAuto-select the best available provider
claudeRun a prompt with Claude Code CLI
geminiRun a prompt with Google Gemini API

Providers at a Glance

🧠

Claude

Best for code intelligence — planning, implementation, debugging, code review. Routed through the Claude Code CLI for full tool access.

Gemini Flash

Best for text formatting — commit messages, classification, summaries. ~98% cheaper per call than spawning a Claude agentic loop.

🎯

Auto-Select

ops ai auto picks the right provider based on availability and prompt shape — no need to remember which is configured.


ops ai status

Show which AI providers are configured and reachable.

Verify provider configuration and connectivity
Terminal
$ops ai status
Pre-flight Check

Run ops ai status to verify both providers are configured before running ops agent broadcast commands. A missing provider will silently degrade broadcast quality.


ops ai auto

Auto-select the best available AI provider for the prompt.

Let the CLI choose the right provider
Terminal
$ops ai auto "Summarize the last week of pipeline failures"

ops ai claude

Run a prompt explicitly through the Claude Code CLI.

Force Claude — useful for code-heavy prompts
Terminal
$ops ai claude "Review this SQL query for performance issues"
Tool Access

ops ai claude runs inside the Claude Code CLI, so the model has access to file reads, shell, and other tools. This is heavier than gemini but far more capable for codebase-aware tasks.


ops ai gemini

Run a prompt explicitly through the Google Gemini API (google-genai).

Force Gemini — fast and cheap for text formatting
Terminal
$ops ai gemini "Generate a commit message for these changes"
Cost Optimization

Use gemini for short, well-bounded text tasks — commit messages, classification, branch names. The cost difference vs. Claude adds up quickly across CI loops and ADW pipelines.