Work on multiple stores using shopify-cli at the same time

Work on multiple stores using shopify-cli at the same time

devsmit
Shopify Partner
1 0 0

I am using shopify-cli for last few months now.

 

I'm looking for workaround to modify themes from 2 or more stores at the same time. Right now I use shopify switch command to switch between different stores.

 

With themekit I used to fire up new terminal from each project that had config.yml with all details. It was quick and I never had to worry about switching between stores.

 

My question is - is there any way we can work on different stores at the same time without need to switch store -using shopify-cli ?

Replies 5 (5)

dreadmill
Shopify Partner
8 0 2

As far as I know this is not possible with shopify-cli, which is a huge pain. It basically degrades shopify-cli for small projects with a single shop only and themkit still stays the to-go solution for projects with multiple stores.

alextoul
Shopify Partner
2 0 0

There's a trick using an environment file in the root of your template folder. 

shopify.theme.toml

[environments.storename]
store = "storename"

Then shopify theme pull -e storename

JAO1
Shopify Partner
12 0 2

this is one step, but how do you deal with multiple settings_data.json?

SyedZaroon
Shopify Partner
1 0 0

After adding [environments.storename] to Shopify.theme.toml, I successfully pulled a store's theme using the Shopify theme pull command. Later, I logged out of Shopify and logged in again, selecting a different store from which I now want to pull the theme. However, when I use the Shopify theme pull -e development command, it still shows the themes from the first store.

How can I resolve this issue?

 

IhorDuchenko
Shopify Partner
1 0 0

For me shopify theme dev(or list or pull) -s store-name.myshopify.com did the trick
So -s flag with corresponding store url helps to specify the target store
https://shopify.dev/docs/api/shopify-cli/theme/theme-dev