Skip to content

Commit 2502e45

Browse files
Kasper JungeRalphify
authored andcommitted
docs: document that ralph run accepts a direct RALPH.md file path
The code in _resolve_ralph_paths() already supports passing either a directory or a direct path to a RALPH.md file, but the CLI help text and docs only mentioned directories. Updated the CLI reference, quick reference, and Typer help text to reflect both options. Co-authored-by: Ralphify <noreply@ralphify.co>
1 parent 9273168 commit 2502e45

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

docs/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ralph run my-ralph --dir ./src # Pass user args to the ralph
4949

5050
| Argument / Option | Short | Default | Description |
5151
|---|---|---|---|
52-
| `PATH` | | (required) | Path to a ralph directory containing `RALPH.md` |
52+
| `PATH` | | (required) | Path to a ralph directory containing `RALPH.md`, or a direct path to a `RALPH.md` file |
5353
| `-n` | | unlimited | Max number of iterations |
5454
| `--stop-on-error` | `-s` | off | Stop loop if agent exits non-zero or times out |
5555
| `--delay` | `-d` | `0` | Seconds to wait between iterations |

docs/quick-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Everything you need at a glance. Bookmark this page.
1212

1313
```bash
1414
ralph run my-ralph # Run loop forever (Ctrl+C to stop)
15+
ralph run my-ralph/RALPH.md # Can also pass the file path directly
1516
ralph run my-ralph -n 5 # Run 5 iterations
1617
ralph run my-ralph -n 1 --log-dir logs # Single iteration with output capture
1718
ralph run my-ralph --stop-on-error # Stop if agent exits non-zero or times out

src/ralphify/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def _build_run_config(
436436
@app.command(context_settings={"allow_extra_args": True, "allow_interspersed_args": True, "ignore_unknown_options": True})
437437
def run(
438438
ctx: typer.Context,
439-
path: str = typer.Argument(..., help="Path to the ralph directory (containing RALPH.md)."),
439+
path: str = typer.Argument(..., help="Path to a ralph directory or RALPH.md file."),
440440
n: int | None = typer.Option(None, "-n", help="Max number of iterations. Infinite if not set."),
441441
stop_on_error: bool = typer.Option(False, "--stop-on-error", "-s", help="Stop if the agent exits non-zero or times out."),
442442
delay: float = typer.Option(0, "--delay", "-d", help="Seconds to wait between iterations."),

0 commit comments

Comments
 (0)