Getting Started
(Optional) Set up your app
Section titled “(Optional) Set up your app”Starting fresh? Scaffold an app first, so Ralph has a working app, linter and tests to build on. Run this from your project folder:
# 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-interactivecd lib && npx biome check --write && cd ..
# or Next.jsnpx create-next-app@latest lib --typescript --tailwind --eslint --appThis creates the app in a lib subfolder. Stay in the project folder for the next steps.
1️⃣ Step 1: Install Ralph
Section titled “1️⃣ Step 1: Install Ralph”Run this in your project folder (the parent of your app folder):
npx @pageai/ralph-loopIt 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.
2️⃣ Step 2: Create a PRD + task list
Section titled “2️⃣ Step 2: Create a PRD + task list”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.envis in.gitignore. - Describe user flows and journeys.
- Put relevant docs and UI references in
/docsand 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
- Requirement summary: confirm the scope before going into detail
- Prerequisites: confirm the keys, accounts, test users and database the app needs (listed in
.agent/prd/PREREQUISITES.md) - PRD: a short summary, then the full PRD with user flows and diagrams
- 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.
3️⃣ Step 3: Set up Docker Sandboxes
Section titled “3️⃣ Step 3: Set up Docker Sandboxes”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)
# macOSbrew 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 Dockersbx login2. Sign in to your agent (one time per project)
./ralph.sh --login # Claude Code (default)./ralph.sh --login --agent codex # or another agentThis 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 withRALPH_DEFAULT_PORTSinralph.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.
4️⃣ Step 4: Run Ralph
Section titled “4️⃣ Step 4: Run Ralph”./ralph.sh -n 50 # work through tasks, up to 50 roundsEach round, Ralph picks one task, builds it, tests it and commits it. You can leave it running.