app function runcommand
Runs the function from your current directory for testing purposes. To learn how you can monitor and debug functions when errors occur, refer to Shopify Functions error handling.
Anchor to flagsFlags
The following flags are available for the app function run
command:
- Anchor to --client-id <value>--client-id <value>stringenv: SHOPIFY_FLAG_CLIENT_ID
The Client ID of your app.
- Anchor to --no-color--no-colorenv: SHOPIFY_FLAG_NO_COLOR
Disable color output.
- Anchor to --path <value>--path <value>stringenv: SHOPIFY_FLAG_PATH
The path to your function directory.
- Anchor to --reset--resetenv: SHOPIFY_FLAG_RESET
Reset all your settings.
- Anchor to --verbose--verboseenv: SHOPIFY_FLAG_VERBOSE
Increase the verbosity of the output.
- Anchor to -c, --config <value>-c, --config <value>stringenv: SHOPIFY_FLAG_APP_CONFIG
The name of the app configuration.
- Anchor to -e, --export <value>-e, --export <value>stringenv: SHOPIFY_FLAG_EXPORT
Name of the WebAssembly export to invoke.
- Anchor to -i, --input <value>-i, --input <value>stringenv: SHOPIFY_FLAG_INPUT
The input JSON to pass to the function. If omitted, standard input is used.
- Anchor to -j, --json-j, --jsonenv: SHOPIFY_FLAG_JSON
Output the result as JSON.
appfunctionrun
- --client-id <value>
The Client ID of your app.
string
- --no-color
Disable color output.
""
- --path <value>
The path to your function directory.
string
- --reset
Reset all your settings.
""
- --verbose
Increase the verbosity of the output.
""
- -c, --config <value>
The name of the app configuration.
string
- -e, --export <value>
Name of the WebAssembly export to invoke.
string
- -i, --input <value>
The input JSON to pass to the function. If omitted, standard input is used.
string
- -j, --json
Output the result as JSON.
""
export interface appfunctionrun {
/**
* The Client ID of your app.
* @environment SHOPIFY_FLAG_CLIENT_ID
*/
'--client-id <value>'?: string
/**
* The name of the app configuration.
* @environment SHOPIFY_FLAG_APP_CONFIG
*/
'-c, --config <value>'?: string
/**
* Name of the WebAssembly export to invoke.
* @environment SHOPIFY_FLAG_EXPORT
*/
'-e, --export <value>'?: string
/**
* The input JSON to pass to the function. If omitted, standard input is used.
* @environment SHOPIFY_FLAG_INPUT
*/
'-i, --input <value>'?: string
/**
* Output the result as JSON.
* @environment SHOPIFY_FLAG_JSON
*/
'-j, --json'?: ''
/**
* Disable color output.
* @environment SHOPIFY_FLAG_NO_COLOR
*/
'--no-color'?: ''
/**
* The path to your function directory.
* @environment SHOPIFY_FLAG_PATH
*/
'--path <value>'?: string
/**
* Reset all your settings.
* @environment SHOPIFY_FLAG_RESET
*/
'--reset'?: ''
/**
* Increase the verbosity of the output.
* @environment SHOPIFY_FLAG_VERBOSE
*/
'--verbose'?: ''
}
App function run
examples
app function run
app function run
shopify app function run [flags]