Skip to content

Commands ​

Last updated View as Markdown

YouCan CLI offer many commands to build your themes ​

CommandDescription
auth loginAuthorize a YouCan Store
auth logoutLogout from a YouCan store
theme initstarts a dev server and watches over the current directory
theme listList of development themes
theme devStart a local server for developing your theme
theme deleteDelete an existing theme
theme packPackage a theme
theme checkCheck a theme for errors and warnings

Login ​

Authorize YouCan CLI with your YouCan Partner account, in case of multi-store, a list of development stores will be displayed and must choose one to continue.

bash
youcan auth login

Logout ​

Remove YouCan CLI’s authorization to access your account. This command will invalidate your current token.

bash
youcan auth logout

Theme Init ​

Clones the default starter theme into a new directory, and creates a development theme from it. You are prompted for the theme's name, author, version, and support and documentation URLs. The CLI writes them to the theme's theme_info in config/settings_schema.json before uploading.

bash
youcan theme init

Flags

FlagAliasDescription
--url-uThe Git URL of the starter theme to clone. Defaults to https://github.com/youcan-shop/origins.
--inplace-iCreate the development theme from the current directory instead of cloning.

Theme List ​

It lists all of your development themes

bash
youcan theme list

Theme Dev ​

Set up a local server to work on your YouCan theme. It launches a Chromium browser with a preview of your theme and listens for changes in the theme code, then automatically uploads the changes and reloads the preview to display the most recent theme update.

bash
youcan theme dev

Flags

FlagAliasDescription
—preview-previewStarts the preview browser

Theme Delete ​

It lists all of your development themes and prompts you to select one to delete.

bash
youcan theme delete

Theme Pack ​

It Package a theme

bash
youcan theme pack

Theme Check ​

Run youcan theme check to check the theme in the current directory with the same rules as a save. You get every error and warning with its file and line. Nothing is saved, and the directory does not have to be linked to a development theme.

bash
youcan theme check

When the theme has errors, the exit code is 1. You can run up to 60 checks a minute per store.