Skip to content

Name the CLI subcommand vtctl - #1438

Merged
rcrowley merged 1 commit into
mainfrom
it-should-be-vtctl
Sep 21, 2026
Merged

rcrowley merged 1 commit into
mainfrom
it-should-be-vtctl

Conversation

@rcrowley

Copy link
Copy Markdown
Contributor

Vitess transitioned some time ago from the fat vtctl command to the vtctld server and its thin vtctldclient client. Never will I understand that naming decision but it has deeply bothered me for longer than I've worked here.

We hoisted vtctld up into the pscale branch vtctld subcommand and that similarly doesn't make sense - this is a client process, it shouldn't have the d suffix!

So this patch makes the subcommand canonically vtctl, adds an alias for vtctld for compatibility, and fixes up usage messages and such to follow.


Here's a trail of bot output in case it's useful

Both names resolve — vtctl directly and vtctld as an alias (usage shows the canonical vtctl path).

Changes:

- internal/cmd/branch/vtctld/vtctld.go — Use: "vtctl <command>", added Aliases: []string{"vtctld"}, and updated Short/Long to "Run vtctl commands against a branch".
- internal/cmd/branch/vtctld/throttler.go — two pscale branch vtctld list-tablets next-step hints → vtctl.
- internal/cmd/branch/vtctld/planned_reparent.go — pscale branch vtctld planned-reparent-shard status example → vtctl.
- internal/cmd/database/throttler.go — "tablet/vtctld throttler (pscale branch vtctld throttler)" → vtctl.
- AGENTS.md — "not per-DR, not tablet/vtctld" → vtctl (matches the database throttler doc text).

Left alone (Vitess component or vtctldclient references): doc/api-client.md (vtctld API surface), internal/cmdutil/json_error.go ("active vtctld
mutation"), and all "via vtctld", "vtctld operation", "vtctld keyspaces/workflows" strings plus vtctldclient mentions in the vtctld command package and
internal/planetscale.

Build passes; tests for internal/cmd/branch/vtctld, internal/cmd/database, and internal/cmdutil pass.

Vitess transitioned some time ago from the fat `vtctl` command to the
`vtctld` server and its thin `vtctldclient` client. Never will I
understand that naming decision but it has deeply bothered me for longer
than I've worked here.

We hoisted `vtctld` up into the `pscale branch vtctld` subcommand and
that similarly doesn't make sense - this is a client process, it
shouldn't have the `d` suffix!

So this patch makes the subcommand canonically `vtctl`, adds an alias
for `vtctld` for compatibility, and fixes up usage messages and such to
follow.

----

Here's a trail of bot output in case it's useful

    Both names resolve — vtctl directly and vtctld as an alias (usage shows the canonical vtctl path).

    Changes:

    - internal/cmd/branch/vtctld/vtctld.go — Use: "vtctl <command>", added Aliases: []string{"vtctld"}, and updated Short/Long to "Run vtctl commands against
      a branch".
    - internal/cmd/branch/vtctld/throttler.go — two pscale branch vtctld list-tablets next-step hints → vtctl.
    - internal/cmd/branch/vtctld/planned_reparent.go — pscale branch vtctld planned-reparent-shard status example → vtctl.
    - internal/cmd/database/throttler.go — "tablet/vtctld throttler (pscale branch vtctld throttler)" → vtctl.
    - AGENTS.md — "not per-DR, not tablet/vtctld" → vtctl (matches the database throttler doc text).

    Left alone (Vitess component or vtctldclient references): doc/api-client.md (vtctld API surface), internal/cmdutil/json_error.go ("active vtctld
    mutation"), and all "via vtctld", "vtctld operation", "vtctld keyspaces/workflows" strings plus vtctldclient mentions in the vtctld command package and
    internal/planetscale.

    Build passes; tests for internal/cmd/branch/vtctld, internal/cmd/database, and internal/cmdutil pass.
@rcrowley
rcrowley requested a review from a team as a code owner September 21, 2026 20:42
@rcrowley
rcrowley merged commit 309cb0b into main Sep 21, 2026
4 checks passed
@rcrowley
rcrowley deleted the it-should-be-vtctl branch September 21, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants