Skip to content

cub component rename

cub component rename

Rename a component

Synopsis

Rename a component: change its slug. A display name that is the same as the slug changes with it; --display-name sets the display name instead.

A component keeps its identity: everything that refers to it by ID keeps doing so. A where expression that names it by slug, such as "Slug = 'old-name'", stops matching it.

An upload that names the component by its old name creates a new one.

--dry-run reports whether the rename would succeed without making it.

Examples:

  # Rename a component
  cub component rename my-component my-new-component

  # Rename it and set its display name
  cub component rename my-component my-new-component --display-name "My new component"
cub component rename <component> <new-slug> [flags]

Options

      --display-name string   display name to give the component, instead of following the slug
      --dry-run               report what the command would write, and write nothing
  -h, --help                  help for rename
  -o, --output string         Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
      --quiet                 No default output.

Options inherited from parent commands

      --context string   The context to use for this command
      --debug            Debug output

SEE ALSO