Santander ralph CLI

The ralph Bash and PowerShell script loops a coding CLI, starting a fresh session with the same prompt on every iteration.

  • 99 ★ on the repository
  • Last commit
  • Apache-2.0
CLI

Broad access

Why this level

  • The agent loops without your approval and changes project files.
  • Long runs spend many tokens.
All reasons and checks

santanderai/ralph

Install

Manual install

curl -fsSL https://raw.githubusercontent.com/SantanderAI/ralph/main/install.sh | sh

The installer copies `ralph-loop.sh` to `~/.local/bin` and installs skills; the `--no-skills` flag skips skills.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The agent loops without your approval and changes project files.
  • Long runs spend many tokens.

This is third-party code. Review the repository files before installing.

What it does

ralph is a thin dependency-free Bash wrapper around CLIs already on the machine: Codex, Claude Code, Gemini CLI and Devin CLI. The `ralph-loop.sh` script starts a new agent session with the same prompt on every iteration, and work accumulates in the repository. This is the Ralph Wiggum technique for long autonomous runs. At each step the script looks for a `stop.md` signal file and exits if it exists, reloads configuration, launches the selected CLI and writes a timestamped log to `.ralph/logs/` with rotation. A call looks like `ralph-loop.sh 25 prompt.md`, where the first argument sets the number of iterations. The installer puts the script in `~/.local/bin` along with the bundled skills.

Who it is for. Developers who give an agent a large task overnight and want an automatic restart with a clean context.

Good fit when

  • A large task is split into steps and the agent must walk through them without you.
  • The agent context bloats and each iteration has to restart clean.
  • The loop has to stop safely by placing a `stop.md` file in the directory.
  • The same prompt must run on Codex, Claude Code or Gemini CLI.

Not a fit when

  • There is no plan or notes in the repository, so memory is lost between iterations.
  • Work needs your involvement at every step.
  • The agent must not change files autonomously.

Example request

Run ralph-loop.sh for 25 iterations with the prompt.md file and stop if stop.md appears.

Limitations

Bash and at least one CLI from `codex`, `claude`, `gemini` or `devin` on PATH are required. Each iteration is a new session, so all continuity lives in files of the working folder: the prompt must tell the agent to read the plan and move step by step. Autonomous runs spend tokens and change files without your approval, so run them on a separate branch and set an iteration limit. The last commit in the repository dates from October 2026.

How to disable. Delete `ralph-loop.sh` from `~/.local/bin`, the skills from the agent skills directory and the `.ralph/` directory in the project.

FAQ

How do I install it?

With `curl -fsSL https://raw.githubusercontent.com/SantanderAI/ralph/main/install.sh | sh` or by copying `ralph-loop.sh` onto PATH. A PowerShell installer exists for Windows.

How do I stop the loop?

Create a `stop.md` file in the working folder: the script checks it before every iteration and exits cleanly.

Which CLIs are supported?

Codex, Claude Code, Gemini CLI and Devin CLI. The choice is set by the `RALPH_TOOL` variable.

Where are the logs?

In the `.ralph/logs/` directory with timestamps and rotation of old files.

How do I launch it?

With `ralph-loop.sh MAX_ITERATIONS PROMPT_FILE`, for example `ralph-loop.sh 25 prompt.md`.

Discussion

No questions or reviews yet.

CLI tools
Editors’ pick

A bash loop that restarts Claude Code or Amp with a clean context until every PRD story passes its checks, plus two skills for writing the PRD

WorkflowBroad access22.2KRepository stars

A Go terminal dashboard that runs Claude Code through the tasks in prd.md, with a fresh context and one commit per task

CLIBroad access474Repository stars

A plugin for Claude Code and Codex: turns a feature request into a spec and executes it task by task with fresh context

PluginExtended access566Repository stars

This skill teaches Claude Code and Codex to share the con terminal: inspect panes, run commands in view and coordinate workers

SkillExtended access653Repository stars

Rust CLI with a terminal switcher across coding agents: list, readiness check, active harness selection and command preview

CLIExtended access139Repository stars

A set of slash commands, skills and subagents for Claude Code: review, tests, security, releases, docs and GitHub to Linear sync

PluginBroad access1.4KRepository stars

README in short

The description explains the script cycle, requirements and install paths. Settings reload on the fly and a run leaves a log. The project is released by Santander AI Lab as open source.

README badge

Report a problem