Questions and discussions about using the Shopify CLI and Shopify-built libraries.
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
@StefanosDev wrote:The documentation unfortunately does not provide enough information.
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
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
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!