Skip to content

Commit 6bd9a75

Browse files
Kasper JungeRalphify
authored andcommitted
docs: add ralph.* placeholders to how-it-works and update CLI reference SEO metadata
The how-it-works page explained placeholder resolution but didn't mention ralph.name, ralph.iteration, or ralph.max_iterations — added since v0.3.0. Also updated the CLI reference description and keywords to include ralph add. Co-authored-by: Ralphify <noreply@ralphify.co>
1 parent 9f3c821 commit 6bd9a75

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

docs/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Ralph CLI Reference
3-
description: Full CLI reference for ralphify — ralph run, ralph init, ralph new, all options, user arguments, and RALPH.md frontmatter format.
4-
keywords: ralph CLI, ralph run, ralph init, ralph new, CLI reference, RALPH.md format, frontmatter options, agent arguments
3+
description: Full CLI reference for ralphify — ralph run, ralph init, ralph new, ralph add, all options, user arguments, and RALPH.md frontmatter format.
4+
keywords: ralph CLI, ralph run, ralph init, ralph new, ralph add, CLI reference, RALPH.md format, frontmatter options, agent arguments
55
---
66

77
# CLI Reference

docs/how-it-works.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ commands:
5151
5252
Each `{{ commands.<name> }}` placeholder in the prompt body is replaced with the corresponding command's output. Placeholders for `{{ args.<name> }}` are replaced with user argument values from the CLI — both in the prompt body and in command `run` strings.
5353

54+
`{{ ralph.* }}` placeholders provide runtime metadata — no frontmatter configuration needed:
55+
56+
- `{{ ralph.name }}` — the ralph's directory name (e.g. `my-ralph`)
57+
- `{{ ralph.iteration }}` — current iteration number (1-based)
58+
- `{{ ralph.max_iterations }}` — total iterations if `-n` was set, empty otherwise
59+
60+
These are useful for iteration-aware prompts — for example, telling the agent to wrap up on the last iteration, or including the ralph name in commit messages.
61+
5462
Unmatched placeholders resolve to an empty string — you won't see raw `{{ }}` text in the assembled prompt.
5563

5664
### 4. Assemble the prompt

0 commit comments

Comments
 (0)