Feature Request: Native Headless / VS Code Server Support for Shopify CLI Authentication

When running Shopify CLI in a headless environment (e.g. VS Code Server / Remote SSH), shopify auth login attempts to open a browser using xdg-open, which fails and results in the following error:

Error: spawn xdg-open ENOENT

This happens because Shopify CLI assumes a local desktop environment during authentication. In remote or server-based setups, there is no browser available, even though authentication can still succeed via device authorization.

Expected behavior:

  • Detect headless or remote environments automatically

  • Avoid attempting to open a local browser

  • Clearly instruct users to complete device authentication on their local machine

Proposed improvements:

  • Default to device-auth flow when no GUI/browser is available

  • Improve messaging to avoid surfacing xdg-open errors

  • Add a first-class flag like --no-browser or --headless

  • Document official support for using Shopify CLI (including shopify theme dev) in VS Code Server / remote environments

This would improve developer experience for modern remote-first workflows and reduce confusion during initial CLI authentication.


Have you tried generating a Shopify CLI authentication token from your partner dashboard?

You should be able to create one, then pass it to the CLI instance in your CI/CD pipeline in order to authenticate without using the desktop 2FA handoff.

Here’s a guide: Deploy app components in a CD pipeline

Yes, I can generate CLI tokens from my partner dashboard. Will this work for theme development? I’ve read the documentation, but it only provides examples for app-level access.

Have you tried?

It’s the same CLI tool correct? So in theory it’s possible the same auth token could work.

Hey, Sorry for responding this late but I tried all possible ways, but still couldn’t get my cli authenticate to my store without a browser. can you provide me with a solution, if the solution exist for same. Thanks in advance