Live Editor CLI Reference
A listing of all commands and options for the Live Editor CLI theme development tool.
Live Editor CLI is a command line interface for building, previewing, and syncing your Live Editor theme. For instructions on installing Live Editor CLI, refer to the Development Environment guide. Live Editor CLI also expects a specific file and directory structure.
Following is a complete list of commands that can be run with Live Editor CLI and documentation for each.
Table of contents
General commands
help
Lists all commands available from the liveeditor
utility.
Syntax
Parameters
Parameter | Required | Description |
---|---|---|
COMMAND
|
No |
string Narrow the listings down to a particular command.
|
Examples
version
Outputs the version of Live Editor CLI installed on your system.
Syntax
Parameters
None.
Examples
login
Authenticates against the Live Editor service and allows you to run other commands that require authentication.
You must have a proper admin_domain
configured within config.json
for this command to work.
Syntax
ParametersNone.
Examples
Theme commands
new
Generates a minimal file and folder structure needed to author a new Live Editor theme.
The new files and folders will be created within a subfolder based on the value that you
pass in for the TITLE
argument. For example, if you pass in a value of
my_theme
, the new theme will be generated within a my_theme
subfolder.
Syntax
Parameters
Parameter | Required | Description |
---|---|---|
TITLE
|
Yes |
string Title of new theme. Can be in snake_case or in
"Titleized Case" . The skeleton theme will be generated
in a new subfolder with the value of TITLE , lowercase and underscored.
The TITLE will also be recorded in the generated README.md
and theme.json files.
|
Examples
generate layout
Generates a .liquid
template for a new layout and adds a minimal entry for
it to layouts/layouts.json
.
Syntax
Aliases
Parameters
Parameter | Required | Description |
---|---|---|
TITLE
|
Yes |
string Title of new layout. Can be in snake_case or in
"Titleized Case" . The Liquid template will be generated
in the layouts subfolder, named after the TITLE , lowercase and
underscored, with _layout appended to the end. For example, a layout titled
Site will have a corresponding Liquid template named
site_layout.liquid . The TITLE will also be added within a new
entry in the layouts/layouts.json config file.
|
Examples
generate content_template
Adds a minimal entry for a content template to
content_templates/content_templates.json
, a new folder structure for the new
content template, and a .liquid
default display.
Passing additional parameters in the format of var_name:type
will create blocks
for each. This is optional.
Syntax
Aliases
Parameters
Parameter | Required | Description |
---|---|---|
TITLE
|
Yes |
string Title of new content template. Can be in snake_case or
in "Titleized Case" . A new subfolder will be created within
the content_templates folder, named after the TITLE , lowercase
and underscored. For example, a content template titled Blog Post will
have a corresponding subfolder named blog_post . Within that folder, a
default_display.liquid template will be generated for a default display.
The TITLE and new display will also be added within a new entry in the
content_templates/content_templates.json config file.
|
BLOCKS
|
No |
array var_name:type combinations for blocks to add to the
generated content template within content_templates.json . Example:
title:text image:photo summary:text . Leaving out the type will cause the
block to default to a type of text .
|
Examples
validate
Validates folder structure and config files for proper content.
Syntax
Aliases
None.
Parameters
Parameter | Required | Description |
---|---|---|
TARGET
|
No |
string Element of theme to validate. Leaving empty or passing a value of
all will validate everything.Valid values:
|