Skip to content

providers: add remove command for saved provider profiles #542

Description

@Ashwinhegde19

Problem

zero providers add lets users save provider profiles, and zero providers use switches between them, but there is currently no CLI command to remove a saved provider profile when it is no longer needed. Users have to manually edit ~/.config/zero/config.json, which is easy to get wrong and is less discoverable than the existing provider management commands.

This becomes noticeable when trying temporary providers, switching between OpenCode/Kilo/OpenAI-compatible endpoints, or cleaning up old local endpoints.

Proposed scope

Add a focused provider removal command, for example:

zero providers remove <name>

Expected behavior:

  • remove the matching saved provider profile from config
  • return a clear error when the provider name does not exist
  • handle the active provider case explicitly
    • either clear activeProvider, or switch to the next remaining provider
    • maintainer preference welcome here
  • support --json consistently with other provider commands if applicable
  • add focused tests for existing provider, missing provider, and active-provider removal

Notes

This should only manage Zero provider profiles. It should not delete environment variables or external provider accounts. If stored API key cleanup is desired, that can be a separate follow-up depending on how maintainers want secrets handled.

I can work on this if maintainers agree with the scope. Please add issue-approved if this is acceptable for a community PR.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions