Skip to content

Commit ef91e18

Browse files
gregswiftclaude
authored andcommitted
docs: surface accepted repo-identifier forms in README and --help
Document that TEMPLATE and ONBOARDING_REPO accept clone URLs in addition to 'org/name' and bare names: a paragraph under "Determining Repos and Orgs" and updated click help= strings so the forms show up in --help output without needing a doc lookup. Also refresh the CLI snapshot in the README, which had drifted to omit the -i/--interactive option and the fix subcommand. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2ca6c19 commit ef91e18

2 files changed

Lines changed: 31 additions & 5 deletions

File tree

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ runtime. The others are core to `git` and can not be changed.
125125
$ templatron --help
126126
Usage: templatron [OPTIONS] TEMPLATE COMMAND [ARGS]...
127127
128+
TEMPLATE is the source template repo, accepted as 'org/name', a bare name
129+
(org from config), or a clone URL (SSH or HTTPS, with or without '.git').
130+
128131
Options:
129132
--autoclean / --no-autoclean remove clones from disk after running
130133
-r, --clone-root TEXT path to clone repos
@@ -136,19 +139,22 @@ Options:
136139
.rej files. Unset means use copier's own
137140
default.
138141
-d, --dry-run don't push changes to cloned repos
142+
-i, --interactive run in interactive mode to be asked
143+
onboarding questions
144+
-l, --log-level TEXT
145+
--logging-config FILE path to logging_config.yaml
139146
-b, --template-branch TEXT branch of the template to sync from
140147
-t, --template-config TEXT path inside the template repo where its
141148
config is stored
142149
-e, --token-variable-name TEXT name of the environment variable storing the
143150
GitHub token
144-
-l, --log-level TEXT
145-
--logging-config FILE path to logging_config.yaml
146151
--config FILE Read configuration from FILE.
147152
--version Show the version and exit.
148153
--help Show this message and exit.
149154
150155
Commands:
151-
onboard onboard a repo to be updated by a template
156+
fix fix an existing template PR
157+
onboard onboard a repo to be updated by a template.
152158
update update repos already configured for a template
153159
```
154160

@@ -243,6 +249,14 @@ repos:
243249
- a-third-github-org/some-other-repo
244250
```
245251

252+
Anywhere a repo identifier is accepted — the `TEMPLATE` argument, the `onboard` repo argument, and entries in the template config — these forms all resolve identically:
253+
254+
- `org/name`
255+
- `name` (org comes from the template config default)
256+
- `git@github.com:org/name.git`
257+
- `https://github.com/org/name(.git)?`
258+
- `ssh://git@github.com/org/name(.git)?`
259+
246260
## Hooks
247261

248262
There are 6 different hooks:

templatron/cli.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
DEFAULT_CLONE_ROOT = os.path.join(gettempdir(), "templatron_clones")
1313

1414

15-
@click.group()
15+
@click.group(
16+
help=(
17+
"TEMPLATE is the source template repo, accepted as "
18+
"'org/name', a bare name (org from config), or a clone URL "
19+
"(SSH or HTTPS, with or without '.git')."
20+
)
21+
)
1622
@click.pass_context
1723
@click.argument("template")
1824
@click.option(
@@ -116,7 +122,13 @@ def update(ctx, single_repo, cache):
116122
templatron.update(single_repo, cache)
117123

118124

119-
@main.command(help="onboard a repo to be updated by a template")
125+
@main.command(
126+
help=(
127+
"onboard a repo to be updated by a template. ONBOARDING_REPO "
128+
"accepts the same forms as TEMPLATE: 'org/name', a bare name, "
129+
"or a clone URL."
130+
)
131+
)
120132
@click.pass_context
121133
@click.argument("onboarding_repo")
122134
def onboard(ctx, onboarding_repo):

0 commit comments

Comments
 (0)