Skip to content

Use thv client setup to un-register clients #883

Open

Description

@danbarr

Currently, thv client setup only works to register clients. To remove registered clients, users have to use thv config remove-client <name>.

Running thv client setup with all clients already registered gives this:

$ thv client setup

No new clients found.

I expected to be able to use thv client setup to also un-register clients, that it would load the list with the registered clients already selected, and I could use the spacebar to de-select them.

Activity

  1. added
    enhancement
    on Jun 27, 2025
  2. JAORMX commented on Jan 22, 2026

    @JAORMX
    Collaborator

    Yes! We should still do this.

  3. added
    cli
    good-first-issue
    on Jan 22, 2026
  4. suantea commented on Oct 10, 2026

    @suantea

    I'd like to work on this. Plan: keep all installed clients in the setup list, pre-select those already registered for the selected groups, and on confirm un-register any pre-selected clients the user de-selects (plus register newly selected ones).

  5. sathvik8317 commented on Nov 18, 2026

    @sathvik8317
    Contributor

    Hi @JAORMX, could I be assigned this one? I contributed --read-only-rootfs in #7128.

    I read through clientSetupCmdFunc and ui/clients_setup.go. Building on the idea @suantea described earlier, the change would be:

    • Stop dropping registered clients (FilterClientsAlreadyRegistered). Show every installed client and pre-check the ones already registered for the selected group(s).
    • On confirm, compute a diff. Newly checked clients go through performClientRegistration, and clients that were unchecked go through the same path as thv client remove --group <selected groups>, so un-registering only affects the groups picked in this run.
    • Before applying, print a summary such as register: cursor / unregister: vscode, because un-registering rewrites the client's config file.
    • The "No new clients found." early exit goes away.

    There's one case I'd like your call on. Say a client is registered in group A but not group B, and the user selects both A and B. My default would be to leave it unchecked, so that checking it registers it in B and leaves A unchanged, and un-registering only happens for clients registered in all selected groups. Does that sound right, or would you prefer something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementgood-first-issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions