Skip to Content
CLIAI Providers

AI Providers

SFDT’s AI features are optional and provider-agnostic. They work with Claude, Gemini, or OpenAI, configured during sfdt init or by editing .sfdt/config.json. Every AI command degrades gracefully when AI is disabled — heuristic fallbacks run where applicable (e.g. sfdt explain), and AI-only commands print how to enable it.

Enable AI

{ "features": { "ai": true }, "ai": { "provider": "claude", "model": "" } }

Providers

Requires the Claude Code CLI :

npm install -g @anthropic-ai/claude-code
{ "ai": { "provider": "claude" } }

Claude runs interactively and can read your repository files directly via tools, giving it full project context. No API key goes in sfdt config — Claude Code handles its own auth.

Claude’s interactive mode is not suitable for CI. Use Gemini or OpenAI for CI-based AI.

Which commands use AI

CommandAI role
sfdt testFailure analysis on test failure
sfdt quality --fix-planPrioritized, file-specific fix plan
sfdt manifest --ai-cleanupMissing-dependency detection
sfdt explainDeep log analysis (after the offline heuristic scan)
sfdt reviewCode review across five categories
sfdt pr-descriptionGitHub/Slack content generation
sfdt releaseRelease-note generation
sfdt changelog generateChangelog entries from commits
sfdt ai promptAd-hoc prompts

Disabling AI

{ "features": { "ai": false } }

All AI steps are skipped. AI-only commands (review, pr-description) exit with an error explaining how to enable it. Heuristic fallbacks still run in sfdt explain.

Security: the read-only tool sandbox

All AI invocations default to a read-only tool sandbox (Read,Grep,Glob) across the Claude/Gemini/Codex providers. AI-influenced content — diffs, org output, browser context — cannot drive Bash/Write/Edit. This closes the prompt-injection surface for both the streaming dashboard chat and the request/response CLI paths. Callers may pass an explicit allowed-tools list to override.

Last updated on