Cookies

This website uses cookies to ensure you get the best experience on our website.

Theme CLI Guide

The Theme CLI is a command-line tool for managing your storefront themes. It allows you to login, list, pull, push, and logout from your store directly through the terminal.

This guide explains the available commands, their usage, and marks planned commands as "Coming Soon."


1. CLI Installation & Setup

  1. Open your terminal or command prompt.
  2. Authenticate with your store using the login command.
  3. After login, you can manage your themes using the available commands.

2. Available Commands

  1. Login
    Purpose: Authenticate your CLI session with the store.
    Usage: theme-cli login

    Steps:

    1. Enter your store credentials (email and password or API token).
    2. Once login is successful, your CLI session is active.

  2. Theme list
    Purpose: Display all available themes for the authenticated store.
    Usage: theme list

    Example Output:

    ID Name Status
    1 Default Theme Active
    2 Custom Theme Inactive

    Notes:

    • Shows both active and inactive themes.
    • Use the ID of a theme for pull or push operations.

  3. Theme pull
    Purpose: Download a theme from the store to your local environment.
    Usage: theme pull

    Steps:

    1. Provide the theme ID to pull.
    2. All theme files will be downloaded into your local theme folder.
    3. You can now edit sections, templates, assets, and configurations locally.

  4. Theme push
    Purpose: Upload local theme changes to the store.
    Usage: theme push

    Steps:

    1. Ensure your local theme folder follows the correct 8-folder structure:
      • assets, config, layout, locales, sections, blocks, snippets, templates.
    2. Provide the theme ID to push updates.

    All changes from local will be uploaded to the store.


  5. Logout
    Purpose: End your CLI session.
    Usage: logout


3. Best Practices

  • Always login before using any commands.
  • Use theme list to confirm theme IDs before pull/push.
  • Maintain a backup of your local theme before pushing changes.
  • Ensure the 8-folder structure is intact to avoid sync errors.
  • Test changes in a safe environment before pushing to the live store.