cli icon indicating copy to clipboard operation
cli copied to clipboard

[Feature]: Shopify Plus Multiple Stores + Shopify Partners Multi access

Open raymondmatthew opened this issue 1 year ago • 1 comments

What area(s) will this request affect?

Theme

What type of change do you want to see?

New feature

Overview

Shopify CLI 3.0 is a great tool for theme development however it is hard to manage compared to Shopify themekit when it comes to handling multiple stores.

Via themekit we are able to connect a folder to a specific store without needing to switch authentication.

Motivation

I am handling multiple stores at a time, and doing minimal changes while working on a big feature at another store. You can say that in a day I need to switch to around 5-10 stores.
Then I have a client in Shopify Plus that atleast have 6 different stores in one account but still need relogging in everytime you switch.

It is very hard to switch as I need to relogin all the time just to connect with another store's CLI. For example you are working on a big feature in store A, then store B just needs a very tiny change. Switching to store B and switching back to A takes alot more effort than the actual change. Unlike with themekit before where you can easily have 10 code editor opened then just switch very easily by literally just moving to the editor that is connected with the store and viola you are done.

Ideally I loved how the authenticator making our accounts more secured but with authenticator this makes it a lot harder so I was forced to remove it.

I have been using the Shopify CLI since it was released, but almost everyday I want to switch back to themekit because of this. I hope you can find a way.

raymondmatthew avatar Sep 10 '24 17:09 raymondmatthew

👋🏻 Hi @raymondmatthew, thanks for the issue!

I think this is a good suggestion, and will take this back to the team to discuss. I'll update this if we have anything we can/decide to add something.

lukeh-shopify avatar Sep 18 '24 23:09 lukeh-shopify

@raymondmatthew

We too work with multiple clients and suffer with this exact problem. ThemeKit's strength was that it enabled us to run multiple and have it 'per-project' but sadly that's no longer the case with CLI.

To overcome this, and to make it slightly easier, the team and I came up with using package.json in each project as to avoid needing to run the longer command each time:

{
  "name": "store-handle",
  "scripts": {
    "tailwind": "npx tailwindcss -i ./tailwind-config.css -o ./assets/tailwind.css --watch",
    "start": "shopify theme dev -s $npm_package_name --legacy --live-reload full-page",
    "start-new": "shopify theme dev -s $npm_package_name --theme-editor-sync --live-reload full-page",
    "start-new-verbose": "shopify theme dev -s $npm_package_name --verbose --theme-editor-sync --live-reload full-page",
    "pull": "shopify theme pull -s $npm_package_name",
    "pull-live": "shopify theme pull -s $npm_package_name --live",
    "push": "shopify theme push -s $npm_package_name",
    "pull-start": "npm run pull-live && npm start"
  }
}

Now we just run 'npm start' and it eases the frustration of having to type the command each time.

rcasimmons avatar Oct 18 '24 10:10 rcasimmons

I can understand how that friction would be frustrating when switching between numerous stores!

We can look into seeing if we can make platform-level changes to make this easier, however with the number of moving parts related to this that may take a while before we can deliver something tangible.

In the meantime, would https://shopify.dev/docs/storefronts/themes/tools/cli/environments be helpful in removing some friction? You can pass this in using an -e flag.

jamesmengo avatar Oct 18 '24 18:10 jamesmengo

I can understand how that friction would be frustrating when switching between numerous stores!

We can look into seeing if we can make platform-level changes to make this easier, however with the number of moving parts related to this that may take a while before we can deliver something tangible.

In the meantime, would https://shopify.dev/docs/storefronts/themes/tools/cli/environments be helpful in removing some friction? You can pass this in using an -e flag.

@jamesmengo is there a way to automatically attach the first environment in the toml when using shopify theme dev without the need of a flag? This can solve one of the issues and avoid unintended theme dev using wrong project on different store

raymondmatthew avatar Nov 04 '24 12:11 raymondmatthew

You can set SHOPIFY_FLAG_ENVIRONMENT in your shell config and overriding that with the -e flag as needed. Let me know how that works out for you!

jamesmengo avatar Nov 04 '24 17:11 jamesmengo

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

github-actions[bot] avatar Dec 17 '24 03:12 github-actions[bot]

:wave: In case you want to try, this prototype version adds multi-session support: @shopify/[email protected]. To add additional sessions or switch between them, you can just run shopify auth login. You can also add aliases for your accounts with --alias.

gonzaloriestra avatar Jun 02 '25 14:06 gonzaloriestra

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

github-actions[bot] avatar Jul 22 '25 03:07 github-actions[bot]

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

github-actions[bot] avatar Sep 03 '25 03:09 github-actions[bot]

The CLI v3.85 now includes multi-session support with a new shopify auth login command that allows to add accounts and easily switch between them.

gonzaloriestra avatar Sep 26 '25 10:09 gonzaloriestra