Skip to content
RALPH LOOP

Getting Started

Starting fresh? Scaffold an app first, so Ralph has a working app, linter and tests to build on. Run this from your project folder:

Terminal window
# TanStack Start (React, Biome, TanStack Form + Query, Nitro)
npx @tanstack/cli@latest create lib --framework React --toolchain biome --deployment nitro --add-ons form,tanstack-query --no-examples --no-git --no-intent --non-interactive
cd lib && npx biome check --write && cd ..
# or Next.js
npx create-next-app@latest lib --typescript --tailwind --eslint --app

This creates the app in a lib subfolder. Stay in the project folder for the next steps.

Run this in your project folder (the parent of your app folder):

Terminal window
npx @pageai/ralph-loop

It asks a few quick questions: where your code lives, your dev server URL and which agent you use.

It also plays a few short, quiet sounds (never in CI or over SSH). To turn them off, run npx @pageai/ralph-loop --no-sound or set RALPH_NO_SOUND=1.

Describe what you want to build, and the prd-creator skill turns it into a plan (PRD) and a task list. Do this in your usual agent (Claude Code, Cursor…), not in Ralph. Open the agent in your project, switch to plan mode and paste a prompt like this:

Use the prd-creator skill to help me create a PRD and task list for the requirements below.
An app is already set up with React, Tailwind CSS and TypeScript.
Requirements:
- A finance app for freelancers: track income and expenses, send invoices, see reports.
- Use shadcn/ui for components, Stripe for payments and Supabase for the database.
- Env variables (SUPABASE_URL, STRIPE_SECRET_KEY, etc.) are in .env.example.
✨ Tips for writing requirements
  • Mention the libraries and frameworks you want to use.
  • Mention env variables (DB, API keys…). Keep them in .env, and make sure .env is in .gitignore.
  • Describe user flows and journeys.
  • Put relevant docs and UI references in /docs and mention them in the requirements.
  • Be as descriptive as possible.
  • It’s fine to write in your own language.

For a realistic example, watch the video.

Then answer the skill’s questions. It checks with you before each step.

What the skill walks you through
  1. Requirement summary: confirm the scope before going into detail
  2. Prerequisites: confirm the keys, accounts, test users and database the app needs (listed in .agent/prd/PREREQUISITES.md)
  3. PRD: a short summary, then the full PRD with user flows and diagrams
  4. Task outline: choose priorities, scope (MVP / MVP+ / full) and what to defer, then confirm before task files are written

Each task is one small feature that works end to end, with its own tests. Anything you defer goes to the Backlog.

Ralph runs your agent in a Docker sandbox, so it can work unattended without touching the rest of your machine.

1. Install sbx (and jq) and sign in to Docker (one time)

Terminal window
# macOS
brew trust docker/tap && brew install docker/tap/sbx jq
# Linux (Ubuntu)
curl -fsSL https://get.docker.com | sudo REPO_ONLY=1 sh && sudo apt install docker-sbx jq
# Windows (PowerShell)
winget install -h Docker.sbx
# then sign in to Docker
sbx login

2. Sign in to your agent (one time per project)

Terminal window
./ralph.sh --login # Claude Code (default)
./ralph.sh --login --agent codex # or another agent

This opens the agent in its sandbox. Sign in when it asks, then exit. In Claude Code, run /login if it doesn’t prompt you, and choose Yes for Bypass Permissions mode (it’s safe because it runs inside the sandbox).

More: viewing the app, sandbox names, API keys
  • See the app in your browser: after the first run, run ./ralph.sh --ports. It uses the dev server port you chose during install (change it with RALPH_DEFAULT_PORTS in ralph.sh).
  • Sandbox names: each project and agent gets its own sandbox, named ralph-<agent>-<current-dir>-<hash8>. Print it with ./ralph.sh --print-name.
  • API keys: you can give agents API keys instead of signing in, but it’s usually more expensive. See Docker’s supported agents docs.
  • Other agents: see Running with a different agentic CLI.
Terminal window
./ralph.sh -n 50 # work through tasks, up to 50 rounds

Each round, Ralph picks one task, builds it, tests it and commits it. You can leave it running.