Get started
SHOPLINE CLI is a command-line tool designed to assist in the development of SHOPLINE themes. This article provides guidance on how to use the SHOPLINE CLI for theme development.
Prerequisites
Before you begin theme development, ensure the following requirements are met:- You have successfully installed the SHOPLINE CLI.
- You have access to a development store for development and debugging purposes.
- A stable internet connection is available, because most SHOPLINE CLI commands require internet connectivity.
Authentication
Authenticate with the CLI using thesl login command to access a specific store.
- Open your terminal and input the store you wish to log into:
sl login --store example.myshopline.com
- Log in using your account credentials in the SHOPLINE Admin login window that appears.
Create a theme
Select the appropriate method to start theme development, depending on your requirements:Create a new theme
Use thesl theme init <THEME_NAME> command to create a new theme locally. This command clones the Bottle sample theme code from our open Git repository and creates a copy.
sl theme init theme-demo
Replace theme-demo with your desired theme name. After executing the command, a theme folder with the specified name will be created in the current directory.
Develop using an existing theme
If you prefer to work with an existing theme, use thesl theme pull command to download it locally. This requires prior authentication with the store.
This command allows you to select from the list of all available themes in the store using the --theme parameter to specify which theme to download locally.
sl theme pull --theme <THEME_ID>
Push the theme to the store
To upload local theme files to the SHOPLINE store, use thesl theme push command. This will overwrite the remote version. The --theme parameter specifies which theme to upload and overwrite.
sl theme push --theme <THEME_ID>
Was this article helpful to you?