diff --git a/automation/README.md b/automation/README.md index 6571517..0f25126 100644 --- a/automation/README.md +++ b/automation/README.md @@ -166,6 +166,11 @@ cat config/ai.yml # Try environment variable override CDEV_AI_COMMAND="claude -p '{prompt}'" git commit -m "test" + +# Other provider notes +# codex-cli --stdin --model gpt-4.1-mini (requires OPENAI_API_KEY) +# gemini-cli --model=gemini-1.5-pro --stdin (requires GEMINI_API_KEY or GOOGLE_API_KEY) +# customize claude with --model or --agent to select a saved persona ``` ### Votes Not Updating diff --git a/config/ai.yml b/config/ai.yml index 5bd26d5..378bc4e 100644 --- a/config/ai.yml +++ b/config/ai.yml @@ -16,7 +16,12 @@ version: 1 runner: command_chain: + # Anthropic Claude CLI (reads prompt from stdin when -p is present) - "claude -p" + # OpenAI / Codex-compatible wrapper (expects prompt on stdin) + - "codex-cli --stdin --model gpt-4.1-mini" + # Google Gemini CLI (prompt via stdin, raw text response) + - "gemini-cli --model=gemini-1.5-pro --stdin" sentinel: "CASCADINGDEV_NO_CHANGES" ramble: @@ -28,3 +33,16 @@ ramble: kind: claude_cli command: "claude" args: [] + codex: + kind: codex_cli + command: "codex-cli" + args: + - "--stdin" + - "--model" + - "gpt-4.1-mini" + gemini: + kind: gemini_cli + command: "gemini-cli" + args: + - "--model=gemini-1.5-pro" + - "--stdin" diff --git a/docs/AUTOMATION.md b/docs/AUTOMATION.md index f454834..768d441 100644 --- a/docs/AUTOMATION.md +++ b/docs/AUTOMATION.md @@ -93,6 +93,16 @@ export CDEV_AI_PROVIDER="claude-cli" export CDEV_AI_COMMAND="claude -p '{prompt}'" ``` +Common non-interactive setups: + +| Provider | Example command | Required auth | Tips | +| --- | --- | --- | --- | +| Claude CLI | `claude -p` (reads prompt from stdin) | `ANTHROPIC_API_KEY` or `claude login` | Add `--model claude-3-5-sonnet-20241022` or `--agent my-cascading-agent` to target a specific model or saved agent persona. | +| Codex / OpenAI | `codex-cli --stdin --model gpt-4.1-mini` | `OPENAI_API_KEY` (+ `OPENAI_ORG_ID` if needed) | The stock `openai` CLI works via `openai api chat.completions.create -m gpt-4o-mini --input -`; wrap it if you prefer shorter aliases. | +| Gemini | `gemini-cli --model=gemini-1.5-pro --stdin` | `GOOGLE_API_KEY`/`GEMINI_API_KEY` with Generative Language API enabled | Some CLIs default to streaming mode—add `--no-stream` or similar so stdout is plain text. | + +Update `config/ai.yml` to match the actual binary names or wrapper scripts on your machine. + **Option 2: Direct API (Alternative)** ```bash pip install anthropic