--- title: app function run description: >- Runs the function from your current directory for [testing purposes](/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](/docs/api/functions/errors). api_name: shopify-cli source_url: html: 'https://shopify.dev/docs/api/shopify-cli/app/app-function-run' md: 'https://shopify.dev/docs/api/shopify-cli/app/app-function-run.md' --- # app function runcommand Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors). ## Flags The following flags are available for the `app function run` command: * \--client-id \ string env: SHOPIFY\_FLAG\_CLIENT\_ID The Client ID of your app. * \--no-color env: SHOPIFY\_FLAG\_NO\_COLOR Disable color output. * \--path \ string env: SHOPIFY\_FLAG\_PATH The path to your function directory. * \--reset env: SHOPIFY\_FLAG\_RESET Reset all your settings. * \--verbose env: SHOPIFY\_FLAG\_VERBOSE Increase the verbosity of the output. * -c, --config \ string env: SHOPIFY\_FLAG\_APP\_CONFIG The name of the app configuration. * -e, --export \ string env: SHOPIFY\_FLAG\_EXPORT Name of the WebAssembly export to invoke. * -i, --input \ string env: SHOPIFY\_FLAG\_INPUT The input JSON to pass to the function. If omitted, standard input is used. * -j, --json env: SHOPIFY\_FLAG\_JSON Output the result as JSON. ### Examples * #### app function run ##### app function run ```bash shopify app function run [flags] ```