You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `--log-dir ralph-logs` | Capture output so you can debug via artifacts |
529
+
530
+
### Tips for CI usage
531
+
532
+
**Store your API key as a repository secret.** Go to Settings → Secrets and variables → Actions and add `ANTHROPIC_API_KEY`. Never hardcode keys in the workflow file.
533
+
534
+
**Use `workflow_dispatch` for manual control.** This lets you choose how many iterations to run each time. You can also add a `schedule` trigger for recurring loops:
535
+
536
+
```yaml
537
+
on:
538
+
schedule:
539
+
- cron: "0 9 * * 1-5" # 9 AM UTC on weekdays
540
+
workflow_dispatch:
541
+
inputs:
542
+
iterations:
543
+
default: "5"
544
+
type: string
545
+
```
546
+
547
+
**Create a PR instead of pushing directly.** For safer workflows, open a pull request so you can review the agent's changes before merging:
548
+
549
+
```yaml
550
+
- name: Create pull request
551
+
env:
552
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
553
+
run: |
554
+
BRANCH="ralph/run-$(date +%Y%m%d-%H%M%S)"
555
+
git checkout -b "$BRANCH"
556
+
git add -A
557
+
git diff --staged --quiet && exit 0
558
+
git commit -m "chore: apply changes from ralph loop"
559
+
git push -u origin "$BRANCH"
560
+
gh pr create \
561
+
--title "Ralph loop: automated changes" \
562
+
--body "Automated changes from ralph loop run." \
563
+
--base main
564
+
```
565
+
566
+
!!! note "Adapt for your agent"
567
+
This example uses Claude Code, but ralphify works with any CLI that reads stdin. Replace the agent install step and environment variables to match your agent. See [Using a different agent](cli.md#using-a-different-agent).
568
+
569
+
---
570
+
458
571
## Static context (no command)
459
572
460
573
Contexts don't need a command — you can use them for static text that you want to inject without editing the prompt file.
0 commit comments