Skip to content

vmware-labs/marketplace-cli

Repository files navigation

Marketplace CLI

mkpcli enables a command-line interface to the VMware Marketplace for consumers and publishes.

To learn how to get started with the Marketplace CLI, watch this video or follow the steps below:

To install, grab the latest prebuilt binary from the Releases page, or build from source.

Features:

  • Get details about a product
  • Manage products in your org
    • Add versions
    • Attach container images
    • Attach Helm charts
    • Attach virtual machine files (ISOs & OVAs)
  • Download assets from a product

Example

$ export CSP_API_TOKEN=...
$ mkpcli chart attach --product hyperspace-database --version 1.0.1 --create-version --chart ./hyperspace-database-1.0.1.tgz

For more information, see the documentation page

Authentication

mkpcli requires an API Token from VMware Cloud Services. See this doc for more information.

The token can be set via CLI flag (i.e. --csp-api-token) or environment variable (i.e. CSP_API_TOKEN).

For more information, see Authentication

Building

Building from source is simple with our Makefile:

$ make build
...
go build -o build/mkpcli -ldflags "-X github.com/vmware-labs/marketplace-cli/v2/cmd.version=dev" ./main.go
$ file build/mkpcli 
build/mkpcli: Mach-O 64-bit executable x86_64
$ ./build/mkpcli 
mkpcli is a CLI interface for the VMware Marketplace,
enabling users to view, get, and manage their Marketplace entries.
...

Developing

If you would like to build and contribute to this project, please fork and make pull requests.

If you are internal to VMware, and you would like to run commands against the Marketplace staging service, ensure your CSP API token has access to the Staging Marketplace and then set this environment variable:

export MARKETPLACE_ENV=staging

Please see our Code of Conduct and Contributors guide.