ralph
22,207
Stars
2,115
Forks
115
Watchers
75
Open Issues
MIT
许可证
TypeScript
语言
2026-01-07
创建时间
2026-02-02
最近更新
项目能做什么
自主运行的 AI Agent 循环系统,可持续迭代直至完成 PRD 需求文档中的所有任务。
来源:AI 基于仓库事实生成
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Ralph

Ralph is an autonomous AI agent loop that runs AI coding tools ([Amp](https://ampcode.com) or [Claude Code](https://docs.anthropic.com/en/docs/claude-code)) repeatedly until all PRD items are complete. Each iteration is a fresh instance with clean context. Memory persists via git history, `progress.txt`, and `prd.json`.
Based on [Geoffrey Huntley's Ralph pattern](https://ghuntley.com/ralph/).
[Read my in-depth article on how I use Ralph](https://x.com/ryancarson/status/2008548371712135632)
## Prerequisites
- One of the following AI coding tools installed and authenticated:
- [Amp CLI](https://ampcode.com) (default)
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (`npm install -g @anthropic-ai/claude-code`)
- `jq` installed (`brew install jq` on macOS)
- A git repository for your project
## Setup
### Option 1: Copy to your project
Copy the ralph files into your project:
```bash
# From your project root
mkdir -p scripts/ralph
cp /path/to/ralph/ralph.sh scripts/ralph/
# Copy the prompt template for your AI tool of choice:
cp /path/to/ralph/prompt.md scripts/ralph/prompt.md # For Amp
# OR
cp /path/to/ralph/CLAUDE.md scripts/ralph/CLAUDE.md # For Claude Code
chmod +x scripts/ralph/ralph.sh
```
### Option 2: Install skills globally (Amp)
Copy the skills to your Amp or Claude config for use across all projects:
For AMP
```bash
cp -r skills/prd ~/.config/amp/skills/
cp -r skills/ralph ~/.config/amp/skills/
```
For Claude Code (manual)
```bash
cp -r skills/prd ~/.claude/skills/
cp -r skills/ralph ~/.claude/skills/
```
### Option 3: Use as Claude Code Marketplace
Add the Ralph marketplace to Claude Code:
```bash
/plugin marketplace add snarktank/ralph
```
Then install the skills:
```bash
/plugin install ralph-skills@ralph-marketplace
```
Available skills after installation:
- `/prd` - Generate Product Requirements Documents
- `/ralph` - Convert PRDs to prd.json format
Skills are automatically invoked when you ask Claude to:
- "create a prd", "write prd for", "plan this feature"
- "convert this prd", "turn into ralph format", "create prd.json"
### Configure Amp auto-handoff (recommended)
Add to `~/.config/amp/settings.json`:
```json
{
"amp.experimental.autoHandoff": { "context": 90 }
}
```
This enables automatic handoff when context fills up, allowing Ralph to handle large stories that exceed a single context window.
## Workflow
### 1. Create a PRD
Use the PRD skill to generate a detailed requirements document:
```
Load the prd skill and create a PRD for [your feature description]
```
Answer the clarifying questions. The skill saves output to `tasks/prd-[feature-name].md`.
### 2. Convert PRD to Ralph format
Use the Ralph skill to convert the markdown PRD to JSON:
```
Load the ralph skill and convert tasks/prd-[feature-name].md to prd.json
```
This creates `prd.json` with user stories structured for autonomous execution.
### 3. Run Ralph
```bash
# Using Amp (defaul
阅读完整原文
商业机会分析 AI 生成
Ralph Cloud / 无人值守云端编码流水线 (SaaS)
| 产品构想 | 将本地的 bash 循环与 CLI 工具封装为云端托管服务。用户只需关联 GitHub 仓库并上传 PRD,系统在云端隔离容器中运行自动化编码循环,完成测试后自动提交 Pull Request。 |
| 核心功能 | 云端沙盒环境执行、GitHub App 自动双向同步、PRD 自动拆解与质检预览、任务执行实时流式监控、多模型 API 聚合调度。 |
| 目标用户 | 时间有限的独立开发者、需要批量交付 MVP 的外包工作室、小型研发团队。 |
| 难度/周期 | 中等偏高 · 4-6 周 · 成本:开发容器集群与沙盒环境服务器(初期约 $100-300/月)、模型调用代付(按用量计费转嫁)。 |
| 收费模式 | 免费额度 + 订阅制(如 $29/月 包含固定并发与运行时数)+ 额外计算资源包。 |
| 竞争风险 | 代码执行沙盒的安全隔离风险;AI 循环陷入死循环导致的高额 Token 消耗风险;竞争对手(如 Devin、Cursor Agent 模式)功能下沉。 |
| 依据 | 已验证事实 |
Ralph Pro 可视化桌面工作台 (Desktop App)
| 产品构想 | 基于 Electron/Tauri 开发跨平台本地 GUI,替代纯终端和 bash 脚本。为使用 Claude Code/Amp 的开发者提供任务看板、进度树、上下文实时消耗监控与卡死人工干预机制。 |
| 核心功能 | PRD 可视化拖拽与拆解编辑器、实时代码差异与测试状态视图、Token 消耗/单步预算控制、一键断点暂停与人工微调干预、本地多项目状态切换。 |
| 目标用户 | 本地重度使用 Claude Code 但不习惯纯命令行或需要监控长任务状态的工程师。 |
| 难度/周期 | 中等 · 3-4 周 · 成本:极低(主要是个人开发工时与代码签名证书费用,约 $100/年)。 |
| 收费模式 | 买断制 License(如 $49 永久授权含 1 年更新)或个人月度订阅($9/月)。 |
| 竞争风险 | 受官方 CLI(Claude Code/Amp)底层变更或接口破坏性调整影响较大。 |
| 依据 | 数据支持的判断 |
企业级规范 PRD 模板库与任务生成引擎 (B2B 插件/服务)
| 产品构想 | 针对企业定制专用的 /prd 与 /ralph 技能包,将不规范的业务需求自动转化为符合 Ralph 循环高成功率要求的超结构化 tasks/prd.json,并内置自动化测试代码生成守卫。 |
| 核心功能 | 行业专用 PRD-to-Ralph 提示词模版包、自动化 Acceptance Criteria(验收标准)与端到端测试用例自动生成器、代码规范合规检查规则集。 |
| 目标用户 | 尝试引入 AI 自动化写代码的技术管理者、交付周期要求严格的项目经理与外包开发团队。 |
| 难度/周期 | 低 · 2-3 周 · 成本:极低(静态网站与文档、Prompt 工程测试成本,<$50/月)。 |
| 收费模式 | 付费模板包销售(Gumroad 等渠道)、团队席位订阅($99/团队/年)、定制化咨询服务。 |
| 竞争风险 | Prompt 门槛较低容易被抄袭,需要极高质量的工业级案例库建立壁垒。 |
| 依据 | AI推测 |
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| frankbria/ralph-claude-code | 中文介绍暂未生成 Autonomous AI development loop for Claude Code with intellig |
9,725 | Shell |
| mikeyobrien/ralph-orchestrator | 中文介绍暂未生成 An improved implementation of the Ralph Wiggum technique for |
3,201 | Rust |
| michaelshimeles/ralphy | 中文介绍暂未生成 My Ralph Wiggum setup, an autonomous bash script that runs C |
2,981 | TypeScript |
| allegro/ralph | 中文介绍暂未生成 Ralph is the CMDB / Asset Management system for data center |
2,532 | Python |
| subsy/ralph-tui | 中文介绍暂未生成 | 2,467 | TypeScript |
| Th0rgal/open-ralph-wiggum | 中文介绍暂未生成 Type `ralph "prompt"` to start open code in a ralph loop. Al |
1,906 | TypeScript |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 2026-01-07,最近推送 2026-02-02 |
| 社区活跃 | Star 22,207 / Fork 2,115 / Issue 75(数据支持,可自行核实) |
| 许可证 | MIT |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/snarktank/ralph.git cd ralph # 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。