# Integrations — opencode-ralph-loop-cli
> "From shell scripts to Kubernetes CronJobs — integrations for every workflow."
## Summary Table
| Claude Code | AI Agent | any | `opencode-ralph-loop-cli init` in CLAUDE.md setup step |
| Codex (OpenAI) | AI Agent | any | Add `init` to Codex workspace bootstrap script |
| Gemini CLI | AI Agent | any | Add `init` to `.gemini/` project setup hook |
| Opencode | AI Agent | any | Place `check --strict` in Opencode pre-session hook |
| Cursor | AI Agent | any | Add `init` to Cursor `.cursorrules` setup instructions |
| Windsurf | AI Agent | any | Add `init` to Windsurf workspace onboarding rules |
| VS Code Copilot | AI Agent | any | Add `init` to `.vscode/tasks.json` preLaunchTask |
| GitHub Copilot | AI Agent | any | Add `check --strict` to CI workflow before Copilot steps |
| Zed | AI Agent | any | Add `init` to Zed workspace setup task |
| Aider | AI Agent | any | Add `init` call to `.aider.conf.yml` startup commands |
| Jules | AI Agent | any | Add `init` to Jules project bootstrap hooks |
| JetBrains AI | AI Agent | any | Add `init` to JetBrains run configuration before-launch step |
| Kilo Code | AI Agent | any | Add `init` to Kilo Code workspace setup instructions |
| Roo Code | AI Agent | any | Add `init` to Roo Code project initialization hook |
| Cline | AI Agent | any | Add `init` to Cline `.clinerules` setup block |
| Continue | AI Agent | any | Add `init` to Continue context provider setup |
| Factory | AI Agent | any | Add `init` to Factory project onboarding pipeline |
| Augment | AI Agent | any | Add `init` to Augment workspace bootstrap command |
| Minimax | AI Agent | any | Add `init` to Minimax project initialization hook |
| Z.ai | AI Agent | any | Add `init` to Z.ai agent workspace setup step |
| Google Antigravity | AI Agent | any | Add `init` to Antigravity project configuration hook |
| Bash | Shell | 4.0 | Source completion script, use with `--output json` |
| Zsh | Shell | 5.0 | Source completion script via `$fpath` |
| Fish | Shell | 3.0 | Source completion script via `~/.config/fish/completions/` |
| PowerShell | Shell | 7.0 | Import completion script via profile |
| Nushell | Shell | 0.80 | Source completion script via `config.nu` |
| GitHub Actions | CI/CD | N/A | `check --strict` in workflow step |
| GitLab CI | CI/CD | N/A | `check --strict` in `.gitlab-ci.yml` script block |
| CircleCI | CI/CD | N/A | `check --strict` in `run` step |
| Docker | Container | 20.10 | `init --skip-install` in multi-stage Dockerfile |
| Alpine | Container | 3.18 | `init --skip-install` in minimal Alpine image |
| Kubernetes | Container | 1.25 | CronJob running `check --strict` on schedule |
| cargo install | Package Manager | Rust 1.85 | `cargo install opencode-ralph-loop-cli` |
| Homebrew | Package Manager | N/A | Tap placeholder — coming soon |
| Scoop | Package Manager | N/A | Manifest placeholder — coming soon |
## AI Agent Integrations
### Claude Code
- Add `opencode-ralph-loop-cli init` to the project setup section of `CLAUDE.md`
- Use `check --strict` as a pre-session gate to verify template integrity
- Place the binary in `PATH` so Claude Code can call it from any working directory
- Exit code 0 confirms the environment is ready for AI-assisted development
```bash
# CLAUDE.md setup step
opencode-ralph-loop-cli doctor && opencode-ralph-loop-cli init
```
### Codex (OpenAI)
- Add `init` to the Codex workspace bootstrap script that runs before sessions
- Use `check --output json` to feed drift status into Codex context
- Verify the binary is available in the Codex sandbox PATH before invoking
- Pipe JSON output through `jaq` to extract relevant fields for prompts
```bash
# Codex bootstrap
opencode-ralph-loop-cli init --skip-install
opencode-ralph-loop-cli check --output json
```
### Gemini CLI
- Add `init` to the `.gemini/` project setup hook that runs on workspace open
- Use `check --strict` in pre-session validation to block sessions on drift
- The `--output quiet` flag keeps Gemini CLI context clean of tool output
- Expose the `doctor` exit code to Gemini to surface environment issues
```bash
# Gemini setup hook
opencode-ralph-loop-cli init --skip-install
opencode-ralph-loop-cli check --strict --output quiet
```
### Opencode
- Place `check --strict` in the Opencode pre-session hook configuration
- Use `init` in the workspace onboarding step to scaffold templates
- Opencode reads exit codes natively — use 0 for pass, non-zero for block
- The `--output json` format integrates with Opencode structured context
```bash
# Opencode pre-session hook
opencode-ralph-loop-cli check --strict
```
### Cursor
- Add `opencode-ralph-loop-cli init` to the setup instructions in `.cursorrules`
- Instruct Cursor to run `check --strict` before starting AI-assisted sessions
- The binary name is short enough to include in natural language instructions
- Use `--output json` so Cursor can parse drift status programmatically
```
# .cursorrules setup block
Run: opencode-ralph-loop-cli init
Verify: opencode-ralph-loop-cli check --strict --output quiet
```
### Windsurf
- Add `init` to the Windsurf workspace onboarding rules file
- Use `doctor` to verify the environment as the first onboarding step
- Windsurf agent reads exit codes — non-zero blocks session continuation
- Combine `check --strict` with `--output quiet` for clean agent output
```bash
# Windsurf onboarding
opencode-ralph-loop-cli doctor && opencode-ralph-loop-cli init
```
### VS Code Copilot
- Add `init` to `.vscode/tasks.json` as a `preLaunchTask` for the workspace
- Use `check --strict` in a dedicated validation task for CI-style feedback
- The task output appears in VS Code's Terminal panel for easy inspection
- Chain with `doctor` to verify the environment before scaffolding
```json
{
"label": "Setup AI Templates",
"type": "shell",
"command": "opencode-ralph-loop-cli init",
"group": "build",
"presentation": { "reveal": "always" }
}
```
### GitHub Copilot
- Add `check --strict` to the CI workflow before any Copilot-assisted steps
- Use `--output json` to surface drift details in workflow run logs
- The binary runs in any Linux, macOS, or Windows GitHub Actions runner
- Install via `cargo install opencode-ralph-loop-cli` in workflow setup
```yaml
- name: Verify AI Templates
run: opencode-ralph-loop-cli check --strict
```
### Zed
- Add `init` to the Zed workspace setup task in `.zed/tasks.json`
- Use `check --strict` as a pre-session task to enforce template integrity
- Zed tasks display output in the task panel for visibility
- Combine with `doctor` to validate the environment on workspace open
```json
{
"label": "Setup AI Templates",
"command": "opencode-ralph-loop-cli",
"args": ["init"]
}
```
### Aider
- Add `init` call to the `.aider.conf.yml` startup commands section
- Use `check --output json` to feed template status into Aider context
- The binary is a single static executable with no runtime dependencies besides bun
- Pipe JSON output to `jaq` to extract file paths for Aider context injection
```yaml
# .aider.conf.yml
auto-commits: false
message: |
Run: opencode-ralph-loop-cli init --skip-install
```
### Jules
- Add `init` to the Jules project bootstrap hooks that run before sessions
- Use `check --strict` as a gate that blocks session start on drift
- Jules reads exit codes — use the 0 vs non-zero distinction for flow control
- The `--output quiet` flag prevents tool output from polluting Jules context
```bash
# Jules bootstrap hook
opencode-ralph-loop-cli init --skip-install
opencode-ralph-loop-cli check --strict --output quiet
```
### JetBrains AI
- Add `init` to the JetBrains run configuration as a before-launch external tool step
- Use `doctor` in the before-launch step to verify environment readiness
- JetBrains run configurations support exit code checks — non-zero blocks launch
- Configure the working directory to the project root for correct path resolution
```xml
<ExternalSystemBeforeLaunchTask ... />
```
### Kilo Code
- Add `init` to the Kilo Code workspace setup instructions
- Use `check --strict` as a pre-session verification step
- The binary reads the current directory as project root automatically
- Exit code 0 signals readiness to Kilo Code's environment validation
```bash
# Kilo Code setup
opencode-ralph-loop-cli init && opencode-ralph-loop-cli check --strict
```
### Roo Code
- Add `init` to the Roo Code project initialization hook
- Use `check --output json` to expose template status to Roo Code context
- Roo Code can parse JSON output natively for structured decision-making
- Combine `doctor` and `init` in a single bootstrap command for efficiency
```bash
# Roo Code initialization hook
opencode-ralph-loop-cli doctor && opencode-ralph-loop-cli init
```
### Cline
- Add `init` to the `.clinerules` setup block that runs on workspace open
- Use `check --strict` as a pre-task gate to prevent drift-affected sessions
- Cline reads exit codes to determine whether to proceed with AI tasks
- The `--skip-install` flag is useful in environments where bun is unavailable
```
# .clinerules setup block
Run: opencode-ralph-loop-cli init --skip-install
Gate: opencode-ralph-loop-cli check --strict --output quiet
```
### Continue
- Add `init` to the Continue context provider setup script
- Use `check --output json` to inject template status into Continue context
- Continue can use JSON output fields to conditionally include context snippets
- Pipe the `list` command output to expose managed template hashes to Continue
```bash
# Continue setup
opencode-ralph-loop-cli init
opencode-ralph-loop-cli list --output json
```
### Factory
- Add `init` to the Factory project onboarding pipeline as the first step
- Use `check --strict` as a pipeline gate before AI-assisted code generation
- Factory pipelines support exit code routing — use 0 for continue, non-zero for halt
- The `--output json` format integrates with Factory structured pipeline data
```bash
# Factory onboarding pipeline step
opencode-ralph-loop-cli init
opencode-ralph-loop-cli check --strict --output json
```
### Augment
- Add `init` to the Augment workspace bootstrap command list
- Use `doctor` first to verify environment, then `init` to scaffold templates
- Augment can use `check --output json` to surface template status in context
- The `--skip-install` flag enables use in restricted sandbox environments
```bash
# Augment bootstrap
opencode-ralph-loop-cli doctor
opencode-ralph-loop-cli init --skip-install
```
### Minimax
- Add `init` to the Minimax project initialization hook configuration
- Use `check --strict` to enforce template integrity before AI sessions
- Minimax agents read exit codes for flow control — 0 continues, non-zero halts
- Combine with `--output quiet` for clean agent context without tool noise
```bash
# Minimax initialization hook
opencode-ralph-loop-cli init && opencode-ralph-loop-cli check --strict --output quiet
```
### Z.ai
- Add `init` to the Z.ai agent workspace setup step
- Use `check --output json` to feed template status into Z.ai agent context
- The binary is self-contained and requires no additional configuration files
- Exit codes map cleanly to Z.ai flow control: 0 for pass, non-zero for fail
```bash
# Z.ai workspace setup
opencode-ralph-loop-cli init
opencode-ralph-loop-cli check --output json
```
### Google Antigravity
- Add `init` to the Antigravity project configuration hook
- Use `check --strict` as a pre-session gate to block sessions on drift
- Antigravity agents can parse `--output json` for structured context injection
- The `doctor` command surfaces environment issues before scaffolding begins
```bash
# Antigravity configuration hook
opencode-ralph-loop-cli doctor && opencode-ralph-loop-cli init
opencode-ralph-loop-cli check --strict
```
## Shell Integrations
### Bash
- Generate and install completions with the commands below
- Reload your shell or source `.bashrc` to activate immediately
- All subcommands, flags, and `--output` values are covered by completions
```bash
opencode-ralph-loop-cli completions bash \
> ~/.local/share/bash-completion/completions/opencode-ralph-loop-cli
source ~/.bashrc
```
### Zsh
- Generate the completion script and place it on your `$fpath`
- Run `compinit` after installing if completions do not load automatically
```zsh
opencode-ralph-loop-cli completions zsh \
> ~/.zsh/completions/_opencode-ralph-loop-cli
autoload -U compinit && compinit
```
### Fish
- Place the completion script in the Fish completions directory
- Fish auto-loads all scripts in that directory on shell start
```fish
opencode-ralph-loop-cli completions fish \
> ~/.config/fish/completions/opencode-ralph-loop-cli.fish
```
### PowerShell
- Generate the completion script and add it to your PowerShell profile
- Restart PowerShell or dot-source your profile to activate
```powershell
opencode-ralph-loop-cli completions powershell | Out-String | Invoke-Expression
# To persist: add the above line to $PROFILE
```
### Nushell
- Generate the completion script and source it in `config.nu`
- Nushell completions are defined as `def` blocks with `@` annotations
```nu
## CI/CD Integrations
### GitHub Actions
```yaml
name: Verify AI Templates
on:
push:
branches: [main]
pull_request:
jobs:
template-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.85
- name: Install opencode-ralph-loop-cli
run: cargo install opencode-ralph-loop-cli
- name: Verify doctor
run: opencode-ralph-loop-cli doctor
- name: Check template drift
run: opencode-ralph-loop-cli check --strict --output json
```
### GitLab CI
```yaml
template-check:
stage: validate
image: rust:1.85
before_script:
- cargo install opencode-ralph-loop-cli
script:
- opencode-ralph-loop-cli doctor
- opencode-ralph-loop-cli check --strict --output json
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "main"'
```
### CircleCI
```yaml
version: 2.1
jobs:
template-check:
docker:
- image: rust:1.85
steps:
- checkout
- run:
name: Install opencode-ralph-loop-cli
command: cargo install opencode-ralph-loop-cli
- run:
name: Verify environment
command: opencode-ralph-loop-cli doctor
- run:
name: Check template drift
command: opencode-ralph-loop-cli check --strict --output json
workflows:
validate:
jobs:
- template-check
```
## Container Integrations
### Docker Multi-Stage Build
```dockerfile
FROM rust:1.85-slim AS tool-builder
RUN cargo install opencode-ralph-loop-cli
FROM node:20-slim AS template-setup
COPY --from=tool-builder /usr/local/cargo/bin/opencode-ralph-loop-cli /usr/local/bin/
WORKDIR /app
COPY . .
RUN opencode-ralph-loop-cli init
RUN cd .opencode && npm install
FROM node:20-slim AS final
WORKDIR /app
COPY --from=template-setup /app .
```
### Alpine Minimal Image
```dockerfile
FROM rust:1.85-alpine AS builder
RUN apk add --no-cache musl-dev
RUN cargo install opencode-ralph-loop-cli
FROM alpine:3.18
COPY --from=builder /usr/local/cargo/bin/opencode-ralph-loop-cli /usr/local/bin/
WORKDIR /workspace
# Skip bun install — run it at container startup or in a separate stage
RUN opencode-ralph-loop-cli init --skip-install
```
### Kubernetes CronJob
```yaml
apiVersion: batch/v1
kind: CronJob
metadata:
name: template-drift-check
namespace: default
spec:
schedule: "0 * * * *"
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: drift-checker
image: rust:1.85-slim
command:
- /bin/sh
- -c
- |
cargo install opencode-ralph-loop-cli && \
opencode-ralph-loop-cli check --strict --output json
volumeMounts:
- name: workspace
mountPath: /workspace
volumes:
- name: workspace
persistentVolumeClaim:
claimName: workspace-pvc
```
## Package Manager Integrations
### cargo install
```bash
# Install latest version
cargo install opencode-ralph-loop-cli
# Install specific version
cargo install opencode-ralph-loop-cli --version 0.1.0
# Verify installation
opencode-ralph-loop-cli --version
```
- Requires Rust 1.85 or later
- Binary is installed to `~/.cargo/bin/` by default
- Ensure `~/.cargo/bin/` is in your `PATH`
### Homebrew (coming soon)
```bash
# Tap placeholder — not yet available
# brew tap TODO/opencode-ralph-loop-cli
# brew install opencode-ralph-loop-cli
```
- Homebrew formula will be published after the first stable release
- Watch the repository for updates on availability
### Scoop (coming soon)
```powershell
# Scoop manifest placeholder — not yet available
# scoop bucket add TODO https://github.com/TODO/scoop-bucket
# scoop install opencode-ralph-loop-cli
```
- Scoop manifest will be published alongside the Windows release binaries
- Watch the repository for updates on availability
Also available in [Português](INTEGRATIONS.pt-BR.md)