Shopify CLI: Populate Products

Looking at the shopify CLI helping text for the shopify populate products command, there are some flags such as –options that can take a list of arguments. My question is, what is the syntax I should use to separate the values for these arguments? I tried separating them with commas (–options=color,size), with ampersands (–options=color&size), with brackets/curly braces, but nothing worked. Is there a more detailed guide on how to use the shopify CLI commands? The documentation unfortunately does not provide enough information.

Not sure of the specifics right now but for cli’s if it strings values for an argument they may need to quoted or escaped.

Some cli tools will also accept an argument multiple times –arg=1 --arg=2 etc

Where are you specifically seeing the exact string “–options” in docs?

Do you mean as in

products [options]: Add dummy products to the specified store.

Which is just referring to arguments(options) for populate commands:

Options:> > --count [integer]: The number of dummy items to populate. Defaults to 5.> --silent: Silence the populate output.> --help: Display more options specific to each subcommand.

There’s no argument/options for generating variant-options

https://github.com/Shopify/shopify-cli/blob/0701e2820b74fe58e9df6ebcb322fb0f63bf39bc/lib/shopify_cli/commands/populate.rb

https://github.com/Shopify/shopify-cli/blob/0701e2820b74fe58e9df6ebcb322fb0f63bf39bc/lib/shopify_cli/commands/populate/product.rb

They never do it seems.

If you can validate that there is supposed to be arguments for product properties like variant-options file an issue on the repo https://github.com/Shopify/shopify-cli , or make the feature request.

Alternatively you may just want to use a tool like postman and make your own graphql mutations, or see the sample products CSV file

https://github.com/shopifypartners/product-csvs


When I type shopify populate products --help, this is the description that I am getting for optional flags to apply in the command. As you can see, there are some flags where the descriptions refers to ‘a list’ of values. This is the reason why I asked for help!