1package cmd23import (4 "github.com/charmbracelet/soft-serve/pkg/backend"5 "github.com/spf13/cobra"6)78func renameCommand() *cobra.Command {9 cmd := &cobra.Command{10 Use: "rename REPOSITORY NEW_NAME",11 Aliases: []string{"mv", "move"},12 Short: "Rename an existing repository",13 Args: cobra.ExactArgs(2),14 PersistentPreRunE: checkIfReadableAndCollab,15 RunE: func(cmd *cobra.Command, args []string) error {16 ctx := cmd.Context()17 be := backend.FromContext(ctx)18 oldName := args[0]19 newName := args[1]2021 return be.RenameRepository(ctx, oldName, newName)22 },23 }2425 return cmd26}