github.com/buildpacks/pack@v0.33.3-0.20240516162812-884dd1837311/internal/commands/manifest.go (about)

     1  package commands
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  
     6  	"github.com/buildpacks/pack/pkg/logging"
     7  )
     8  
     9  func NewManifestCommand(logger logging.Logger, client PackClient) *cobra.Command {
    10  	cmd := &cobra.Command{
    11  		Use:   "manifest",
    12  		Short: "Interact with OCI image indexes",
    13  		Long: `An image index is a higher-level manifest which points to specific image manifests and is ideal for one or more platforms; see: https://github.com/opencontainers/image-spec/ for more details
    14  
    15  'pack manifest' commands provide tooling to create, update, or delete images indexes or push them to a remote registry.
    16  'pack' will save a local copy of the image index at '$PACK_HOME/manifests'; the environment variable 'XDG_RUNTIME_DIR' 
    17  can be set to override the location, allowing manifests to be edited locally before being pushed to a registry.
    18  
    19  These commands are experimental. For more information, consult the RFC which can be found at https://github.com/buildpacks/rfcs/blob/main/text/0124-pack-manifest-list-commands.md`,
    20  		RunE: nil,
    21  	}
    22  
    23  	cmd.AddCommand(ManifestCreate(logger, client))
    24  	cmd.AddCommand(ManifestAdd(logger, client))
    25  	cmd.AddCommand(ManifestAnnotate(logger, client))
    26  	cmd.AddCommand(ManifestDelete(logger, client))
    27  	cmd.AddCommand(ManifestInspect(logger, client))
    28  	cmd.AddCommand(ManifestPush(logger, client))
    29  	cmd.AddCommand(ManifestRemove(logger, client))
    30  
    31  	AddHelpFlag(cmd, "manifest")
    32  	return cmd
    33  }