Skip to content

Commit c6aacdd

Browse files
Kasper JungeRalphify
authored andcommitted
docs: add GitHub tree URL format to ralph add examples
Users browsing a GitHub repo and copying the URL get a /tree/branch/path format. This is supported by the parser but wasn't shown in any docs examples, making it a hidden feature. Added it to CLI reference, quick reference, and troubleshooting. Co-authored-by: Ralphify <noreply@ralphify.co>
1 parent 737c495 commit c6aacdd

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

docs/cli.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,21 @@ The command detects your agent and installs a skill to guide the creation proces
138138
Add a ralph from a GitHub repository. Installs it to `.ralphify/ralphs/<name>/` so you can run it by name.
139139

140140
```bash
141-
ralph add owner/repo # Install repo as a ralph (or all ralphs in the repo)
142-
ralph add owner/repo/ralph-name # Install a specific ralph by name
143-
ralph add https://github.com/owner/repo # Full GitHub URL also works
141+
ralph add owner/repo # Install all ralphs in the repo
142+
ralph add owner/repo/ralph-name # Specific ralph by name
143+
ralph add https://github.com/owner/repo # Full GitHub URL
144+
ralph add https://github.com/owner/repo/tree/main/my-ralph # URL copied from GitHub browser
144145
```
145146

146147
| Argument | Default | Description |
147148
|---|---|---|
148-
| `SOURCE` | required | GitHub source: `owner/repo` or `owner/repo/ralph-name` |
149+
| `SOURCE` | required | GitHub source — shorthand (`owner/repo`), subpath (`owner/repo/path`), or full GitHub URL |
149150

150151
**How it resolves:**
151152

152153
- `owner/repo` — if the repo root contains `RALPH.md`, installs it as a single ralph named after the repo. Otherwise, finds and installs all ralphs in the repo.
153154
- `owner/repo/ralph-name` — searches the repo for a directory named `ralph-name` containing `RALPH.md`. If multiple matches are found, prints the paths and asks you to use the full subpath to disambiguate.
155+
- `https://github.com/owner/repo/tree/branch/path` — extracts the path from the URL. This is the format you get when you copy a URL from the GitHub web UI while browsing a directory. The branch name is used only to locate the path — `ralph add` always clones the default branch.
154156

155157
After adding, run the ralph by name:
156158

docs/quick-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ralph new docs # AI-guided creation with name pre-filled
2828

2929
ralph add owner/repo # Install ralph(s) from a GitHub repo
3030
ralph add owner/repo/my-ralph # Install a specific ralph by name
31+
ralph add https://github.com/owner/repo/tree/main/my-ralph # URL from GitHub
3132

3233
ralph --version # Show version
3334
```

docs/troubleshooting.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ The agent CLI isn't installed or isn't in your shell's PATH. Verify by running `
4646
The source format wasn't recognized. `ralph add` accepts these formats:
4747

4848
```bash
49-
ralph add owner/repo # shorthand
50-
ralph add owner/repo/ralph-name # specific ralph
51-
ralph add https://github.com/owner/repo # full URL
49+
ralph add owner/repo # shorthand
50+
ralph add owner/repo/ralph-name # specific ralph
51+
ralph add https://github.com/owner/repo # full URL
52+
ralph add https://github.com/owner/repo/tree/main/my-ralph # URL copied from GitHub
5253
```
5354

55+
The easiest way to add a ralph from GitHub is to navigate to the directory in your browser and copy the URL — it works directly with `ralph add`.
56+
5457
### "git clone failed"
5558

5659
The repository couldn't be cloned. Common causes:

0 commit comments

Comments
 (0)