npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shopify-accounts

v1.0.1

Published

Switch between multiple Shopify CLI accounts without logging out

Readme

shopify-accounts

Switch between multiple Shopify CLI accounts without logging out.

Shopify CLI only supports one active account at a time. Switching requires shopify auth logout + shopify auth login with browser OAuth each time. This tool reads Shopify CLI's config files to auto-discover all logged-in accounts and switch between them instantly.

Install

npm install -g shopify-accounts

Usage

# List all accounts (default command)
shopify-accounts list

# Switch to an account
shopify-accounts switch [email protected]

# Shorthand — just pass the email directly
shopify-accounts [email protected]

# Show the active account
shopify-accounts whoami

# Add a new account (opens browser login)
shopify-accounts add

# Remove an account
shopify-accounts remove [email protected]

# Show help
shopify-accounts help

# Show help for a specific command
shopify-accounts help switch

How it works

Shopify CLI stores authentication data in local config files:

  • Session store — contains OAuth tokens for each logged-in account, identified by a UUID
  • Account info — maps each UUID to an email address

This tool reads those files to discover your accounts and switches the active one by updating the currentSessionId field. No tokens are created, modified, or transmitted — it simply tells Shopify CLI which existing session to use.

Config file locations

| Platform | Path | |----------|------| | macOS | ~/Library/Preferences/shopify-cli-kit-nodejs/config.json | | Linux | $XDG_CONFIG_HOME/shopify-cli-kit-nodejs/config.json (defaults to ~/.config/) | | Windows | %APPDATA%\shopify-cli-kit-nodejs\config.json |

Commands

shopify-accounts list

Lists all discovered accounts and marks the active one. This is the default command when no arguments are given.

shopify-accounts switch <email>

Switches the active Shopify CLI account. After switching, all shopify commands (theme dev, theme push, etc.) will use the new account.

shopify-accounts add

Runs shopify auth login interactively to authenticate a new account. After login completes, the new account is automatically discovered from the updated config.

shopify-accounts remove <email>

Removes an account's session data from Shopify CLI's config. You cannot remove the currently active account — switch to another one first.

shopify-accounts whoami

Prints the email of the currently active account.

Best practices

Keep sessions alive

Each time you run a Shopify CLI command (theme dev, theme push, etc.), the CLI refreshes the active session's tokens. If you don't use an account for a long time, the session may expire. Run shopify-accounts list periodically to check session status, and use shopify-accounts add to re-authenticate expired accounts.

Verify before pushing

Always confirm you're on the right account before running destructive commands:

shopify-accounts whoami
shopify theme push --store mystore.myshopify.com

Use in scripts and CI

shopify-accounts whoami outputs just the email with no formatting, making it safe for scripting:

if [ "$(shopify-accounts whoami)" != "[email protected]" ]; then
  echo "Wrong account! Switch before deploying."
  exit 1
fi
shopify theme push --store production-store.myshopify.com

One account per responsibility

Avoid using a single Shopify account for everything. Use separate accounts for:

  • Development — day-to-day theme work on dev stores
  • Production — deploying to live stores
  • Client work — each client's store under its own partner account

This reduces the risk of pushing to the wrong store and keeps permissions scoped.

Pair with --store flag

After switching accounts, always pass the --store flag to target the correct store:

shopify-accounts switch [email protected]
shopify theme dev --store dev-store.myshopify.com

This avoids accidentally connecting to the wrong store if a previous session had a different store cached.

Requirements

License

MIT