Skip to content

feat: add tag add/remove and tags list CLI subcommands to all resource kinds #299

@osaljehani

Description

@osaljehani

Summary

Tags are fully supported in the domain model and Web UI for all resource kinds, but there are
no CLI subcommands to add, remove, or discover them. Every kind has label add/remove but not
tag add/remove, and there is no top-level tags list / tags show discovery command.

Reproduction

`
$ rpk servers tags server-01 add homelab
Invalid command: Unknown command 'tags'.

$ rpk tags list
Invalid command: Unknown command 'tags'.
`

Same error on: laptops, desktops, switches, routers, firewalls, accesspoints, ups, systems, services.

Motivation

The Ansible inventory generator groups hosts by tags (--group-tags). Without CLI tag support,
users must go through the Web UI to tag resources, breaking scriptable/headless workflows.

Proposed change

Add rpk <kind> tag add <name> <tag> and rpk <kind> tag remove <name> <tag> to all 10 kinds,
plus top-level rpk tags list (all tags in use) and rpk tags show <tag> (resources carrying a tag).

No domain changes needed — IAddTagUseCase<T> and IRemoveTagUseCase<T> already exist and are
auto-registered for all types. This is purely CLI wiring in Shared.Rcl.

Affected files

  • 20 new command files (2 per kind × 10 kinds) in Shared.Rcl/Commands/<Kind>/Tags/
  • Shared.Rcl/Commands/Tags/TagsListCommand.cs and TagsShowCommand.cs
  • Shared.Rcl/CliBootstrap.cs — 10 new tag branch registrations + top-level tags branch
  • Tests/EndToEnd/Tags/TagsWorkflowTests.cs — theory test covering all kinds + list/show

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions