---
title: app function replay
description: Runs the function from your current directory for testing purposes.
source_url:
  html: 'https://shopify.dev/docs/api/shopify-cli/app/app-function-replay'
  md: 'https://shopify.dev/docs/api/shopify-cli/app/app-function-replay.md'
api_name: shopify-cli
---

# app function replay

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 replay` command:

* **--auth-alias \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_AUTH\_ALIAS**

  Alias of the Shopify account to use for authentication.

* **--client-id \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_CLIENT\_ID**

  The Client ID of your app.

* **--json-schema**

  **env: SHOPIFY\_FLAG\_JSON\_SCHEMA**

  Print the command's JSON schemas.

* **--no-color**

  **env: SHOPIFY\_FLAG\_NO\_COLOR**

  Disable color output.

* **--no-input**

  **env: SHOPIFY\_FLAG\_NO\_INPUT**

  Disable interactive prompts and browser authentication.

* **--path \<value>**

  **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. May include sensitive data.

* **-c, --config \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_APP\_CONFIG**

  The name of the app configuration.

* **-j, --json**

  **env: SHOPIFY\_FLAG\_JSON**

  Output the result as JSON. Automatically disables color output.

* **-l, --log \<value>**

  **string**

  **env: SHOPIFY\_FLAG\_LOG**

  Specifies a log identifier to replay instead of selecting from a list. The identifier is provided in the output of `shopify app dev` and is the suffix of the log file name. Required if non interactive.

* **-w, --watch**

  **env: SHOPIFY\_FLAG\_WATCH**

  Re-run the function when the source code changes.

### Examples

* #### App function replay

  ##### app function replay

  ```sh
  shopify app function replay [flags]
  ```

***
