Commands

List of all API commands for Packer:

init#

Creates a blank start theme in specified directory. By default, it will use hayes0724/packer-blank-theme unless you specify the repo flag with the name of the themes github repo. It will pull the latest release and fail if the custom theme repo has no releases.

packer init <dir> [--repo=hayes0724/packer-blank-theme]

start#

Compiles your local theme files into a dist directory, uploads these files to your remote Shopify store and finally boots up a local Express server that will serve most of your CSS and JavaScript.

packer start [--env=my-custom-env-name] [--skipPrompts] [--skipFirstDeploy] [--allowLive] [--replace]
FlagDescription
--envTargets a custom environment. Setting --env=production would use the production settings in packer.config.json
--skipPromptsSkips all prompts. This is especially useful when using Packer with continuous integration tools
--skipFirstDeploySkips the file upload sequence and simply boots up the local Express server
--allowLiveAllows command to run on published themes
--replaceBy default deploy will only replace changed files in the theme, use this flag to update and remove all existing files

watch#

Same as start command except it skips the first deployment

packer watch [--env=my-custom-env-name] [--skipPrompts] [--allowLive] [--replace]
FlagDescription
--envTargets a custom environment. Setting --env=production would use the production settings in packer.config.json
--skipPromptsSkips all prompts. This is especially useful when using Packer with continuous integration tools
--allowLiveAllows command to run on published themes
--replaceBy default deploy will only replace changed files in the theme, use this flag to update and remove all existing files

deploy#

Uploads the dist folder to the Shopify store.

packer deploy [--env=my-custom-env-name] [--skipPrompts] [--replace] [--allowLive]
FlagDescription
--envTargets a custom environment. Setting --env=production would use the production settings in packer.config.json
--skipPromptsSkips all prompts. This is especially useful when using Packer with continuous integration tools
--replaceBy default deploy will only replace changed files in the theme, use this flag to update and remove all existing files
--allowLiveAllows command to run on published themes

build#

Builds a production-ready version of the theme by compiling the files into the dist folder.

packer build [--analyze] [--stats]
FlagDescription
--analyzeAnalyzes bundles
--statsCreate a stats.json file in the root directory

lint#

Lints the themes styles and scripts

packer lint [--scripts] [--styles]
FlagDescription
--scriptsRuns linting only on script files
--stylesRuns linting only on style files

format#

Formats the theme code according to the rules declared in the .eslintrc and .stylelintrc files. By default, it uses ESLint Fix to format JS files, Stylelint Fix to format CSS files and Prettier to format JSON files.

packer format [--scripts] [--styles]
FlagDescription
--scriptsRuns formatting only on script files
--stylesRuns formatting only on style files

zip#

Compiles the contents of the dist directory and creates a ZIP file in the root of the project.

packer zip

theme:list#

Lists all themes (shows name, themeID, etc...) on the site, requires app password and store url be set first. By default looks at the store for development env in packer.config.json

packer theme:list [--env]
FlagDescription
--envTargets a custom environment. Setting --env=production would use the production settings in packer.env.json

theme:create#

Creates a new empty theme on Shopify and updates packer.config.json for the selected env with the proper themeID

packer theme:create [--env] [--name]
FlagDescription
--envTargets a custom environment. Setting --env=production would use the production settings in packer.env.json
--name=my-theme-nameSets the theme name on Shopify, it's required

theme:remove#

Removes the theme set in the selected env from Shopify

packer theme:remove [--env] [--id]
FlagDescription
--envTargets a custom environment (defaults to development). Setting --env=production would use the production settings in packer.config.json
--idDelete a theme by using its ID

theme:download#

Downloads the theme set in the selected env from Shopify

packer theme:download [--env]
FlagDescription
--envTargets a custom environment. Setting --env=production would use the production settings in packer.config.json

ssl:make#

Create a self-signed ssl cert for local development. It will also create CA if one does not already exist.

packer ssl:make

ssl:check#

Check your current SSL setup to see if CA and Cert exist.

packer ssl:check

help#

Display all commands and flags

packer help