Shopify CLI command reference (Scripts)

This reference lists the scripts commands that you can use with Shopify CLI.


Creates a new script project. The project is created in a subdirectory of the current directory.

Optional parameters

Parameter Description
--extension-point=<api_name> The API library to use for the script. Valid values: shipping_methods, payment_methods.
--name="<script_name>" The name of the script.


Deploys a script to the Shopify platform and associates it with a custom app.


Parameter Description
--force Replaces the current script with the newest version. This parameter is required if you've already pushed the script to the Shopify platform.

npm test

Runs unit tests on your scripts. Scripts are written in AssemblyScript, which uses npm as its package manager.

Shopify CLI provides the as-pect test framework for unit testing. Shopify CLI doesn't wrap commands that are supported by a language's existing ecosystem, so don't preface the command with shopify.

Next steps