Closed gonzaloriestra closed 2 years ago
Hey guys, can someone please explain how this works, it sounds super useful. Is this a way to store credentials for each store and not have to manually log in / out between stores? @gonzaloriestra @alvaro-shopify
@lesterdefreitas you can now use CLI 3.x for theme development. And you can easily switch the store by passing --store
(unless it belongs to a different account). Or just use a Theme Access password from a specific store.
More info:
@gonzaloriestra oh awesome, thanks for this!
WHY are these changes introduced?
First step for https://github.com/Shopify/shopify-cli-planning/issues/332 Fixes https://github.com/Shopify/shopify-cli-planning/issues/365
A very similar PR was merged and then reverted, as we wanted to finish other related work first.
⚠️ We are still testing this functionality, it will be ready to use for everyone when we properly announce it and publish the documentation.
WHAT is this pull request doing?
SHOPIFY_CLI_ADMIN_AUTH_TOKEN
contains a Theme Kit Access password, the theme requests will go through Theme Kit Access API instead of Admin API, so the password is validated. As the login is not required, it also requires passing the store URL throughSHOPIFY_SHOP
.SHOPIFY_CLI_STORE
toSHOPIFY_SHOP
, which was already existing. It was added recently to be used from the CLI3. I'll update the CLI3 as well to useSHOPIFY_SHOP
.How to test your changes?
Check that theme commands work the same way when logged in (by using the Admin API):
bin/shopify login
DEBUG=1 bin/shopify theme list
Check that they also work with a Theme Kit Access password (by using Theme Access Kit API):
bin/shopify logout
DEBUG=1 SHOPIFY_SHOP=your-shop.myshopify.com SHOPIFY_CLI_ADMIN_AUTH_TOKEN=your-password bin/shopify theme list
Update checklist