From 0317189623906a8caaa36379a65396ded8f91663 Mon Sep 17 00:00:00 2001 From: Zhengshou Lai Date: Fri, 8 May 2026 20:56:14 +0800 Subject: [PATCH] refactor(templates): rename `show` to `list` for CLI consistency Other subcommand groups (server, env, ssh, webpage, git proxy) use `list` for enumeration; align templates with the same convention. --- README.md | 2 +- bin/commands/templates.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 25f23f7..849fbce 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ For any subcommand: `mytoolkit --help`. ```bash mytoolkit templates register /path/to/templates -mytoolkit templates show # lists each template with its absolute path +mytoolkit templates list # lists each template with its absolute path ``` Registry is stored at `~/.config/mytoolkit/templates.json`. diff --git a/bin/commands/templates.py b/bin/commands/templates.py index d3d4ada..13ffc06 100644 --- a/bin/commands/templates.py +++ b/bin/commands/templates.py @@ -21,9 +21,9 @@ def templates_register(path): click.secho(f"Registered: {resolved}", fg="green") -@templates_cmd.command("show") -def templates_show(): - """Show the current registry and available templates.""" +@templates_cmd.command("list") +def templates_list(): + """List the current registry and available templates.""" if not templates_registry.CONFIG_PATH.exists(): click.echo("No registry. Run: mytoolkit templates register ") return