diff --git a/package.json b/package.json index cd81b6826d4..abe274d84b5 100644 --- a/package.json +++ b/package.json @@ -209,11 +209,13 @@ "entry": [ "**/{commands,hooks}/**/*.ts!", "**/bin/*.js!", - "**/index.ts!" + "**/index.ts!", + "**/bootstrap.ts!" ], "project": "**/*.ts!", "ignoreDependencies": [ "@ast-grep/napi", + "@shopify/cli-hydrogen", "@shopify/theme-check-docs-updater", "@shopify/theme-check-node" ], @@ -297,6 +299,36 @@ ] } }, + "packages/plugin-app": { + "entry": [ + "**/{commands,hooks}/**/*.ts!", + "**/src/*.ts!" + ], + "project": "**/*.ts!", + "ignoreDependencies": [ + "@oclif/core" + ] + }, + "packages/plugin-theme": { + "entry": [ + "**/{commands,hooks}/**/*.ts!", + "**/src/*.ts!" + ], + "project": "**/*.ts!", + "ignoreDependencies": [ + "@oclif/core" + ] + }, + "packages/plugin-hydrogen": { + "entry": [ + "**/{commands,hooks}/**/*.ts!", + "**/src/*.ts!" + ], + "project": "**/*.ts!", + "ignoreDependencies": [ + "@oclif/core" + ] + }, "packages/ui-extensions-dev-console": { "entry": [ "**/src/main.tsx!" diff --git a/packages/cli/README.md b/packages/cli/README.md index 551fa5e4712..32d29d38d30 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -1,3012 +1,84 @@ # Commands -* [`shopify app build`](#shopify-app-build) -* [`shopify app bulk cancel`](#shopify-app-bulk-cancel) -* [`shopify app bulk execute`](#shopify-app-bulk-execute) -* [`shopify app bulk status`](#shopify-app-bulk-status) -* [`shopify app config link`](#shopify-app-config-link) -* [`shopify app config pull`](#shopify-app-config-pull) -* [`shopify app config use [config] [flags]`](#shopify-app-config-use-config-flags) -* [`shopify app config validate`](#shopify-app-config-validate) -* [`shopify app deploy`](#shopify-app-deploy) -* [`shopify app dev`](#shopify-app-dev) -* [`shopify app dev clean`](#shopify-app-dev-clean) -* [`shopify app env pull`](#shopify-app-env-pull) -* [`shopify app env show`](#shopify-app-env-show) -* [`shopify app execute`](#shopify-app-execute) -* [`shopify app function build`](#shopify-app-function-build) -* [`shopify app function info`](#shopify-app-function-info) -* [`shopify app function replay`](#shopify-app-function-replay) -* [`shopify app function run`](#shopify-app-function-run) -* [`shopify app function schema`](#shopify-app-function-schema) -* [`shopify app function typegen`](#shopify-app-function-typegen) -* [`shopify app generate extension`](#shopify-app-generate-extension) -* [`shopify app import-custom-data-definitions`](#shopify-app-import-custom-data-definitions) -* [`shopify app import-extensions`](#shopify-app-import-extensions) -* [`shopify app info`](#shopify-app-info) -* [`shopify app init`](#shopify-app-init) -* [`shopify app logs`](#shopify-app-logs) -* [`shopify app logs sources`](#shopify-app-logs-sources) -* [`shopify app release --version `](#shopify-app-release---version-version) -* [`shopify app versions list`](#shopify-app-versions-list) -* [`shopify app webhook trigger`](#shopify-app-webhook-trigger) * [`shopify auth login`](#shopify-auth-login) * [`shopify auth logout`](#shopify-auth-logout) -* [`shopify commands`](#shopify-commands) -* [`shopify config autocorrect off`](#shopify-config-autocorrect-off) -* [`shopify config autocorrect on`](#shopify-config-autocorrect-on) -* [`shopify config autocorrect status`](#shopify-config-autocorrect-status) * [`shopify help [command] [flags]`](#shopify-help-command-flags) -* [`shopify hydrogen build`](#shopify-hydrogen-build) -* [`shopify hydrogen check RESOURCE`](#shopify-hydrogen-check-resource) -* [`shopify hydrogen codegen`](#shopify-hydrogen-codegen) -* [`shopify hydrogen customer-account-push`](#shopify-hydrogen-customer-account-push) -* [`shopify hydrogen debug cpu`](#shopify-hydrogen-debug-cpu) -* [`shopify hydrogen deploy`](#shopify-hydrogen-deploy) -* [`shopify hydrogen dev`](#shopify-hydrogen-dev) -* [`shopify hydrogen env list`](#shopify-hydrogen-env-list) -* [`shopify hydrogen env pull`](#shopify-hydrogen-env-pull) -* [`shopify hydrogen env push`](#shopify-hydrogen-env-push) -* [`shopify hydrogen generate route ROUTENAME`](#shopify-hydrogen-generate-route-routename) -* [`shopify hydrogen generate routes`](#shopify-hydrogen-generate-routes) -* [`shopify hydrogen init`](#shopify-hydrogen-init) -* [`shopify hydrogen link`](#shopify-hydrogen-link) -* [`shopify hydrogen list`](#shopify-hydrogen-list) -* [`shopify hydrogen login`](#shopify-hydrogen-login) -* [`shopify hydrogen logout`](#shopify-hydrogen-logout) -* [`shopify hydrogen preview`](#shopify-hydrogen-preview) -* [`shopify hydrogen setup`](#shopify-hydrogen-setup) -* [`shopify hydrogen setup css [STRATEGY]`](#shopify-hydrogen-setup-css-strategy) -* [`shopify hydrogen setup markets [STRATEGY]`](#shopify-hydrogen-setup-markets-strategy) -* [`shopify hydrogen setup vite`](#shopify-hydrogen-setup-vite) -* [`shopify hydrogen shortcut`](#shopify-hydrogen-shortcut) -* [`shopify hydrogen unlink`](#shopify-hydrogen-unlink) -* [`shopify hydrogen upgrade`](#shopify-hydrogen-upgrade) -* [`shopify organization list`](#shopify-organization-list) -* [`shopify plugins add PLUGIN`](#shopify-plugins-add-plugin) -* [`shopify plugins:inspect PLUGIN...`](#shopify-pluginsinspect-plugin) -* [`shopify plugins install PLUGIN`](#shopify-plugins-install-plugin) -* [`shopify plugins link PATH`](#shopify-plugins-link-path) -* [`shopify plugins remove [PLUGIN]`](#shopify-plugins-remove-plugin) -* [`shopify plugins reset`](#shopify-plugins-reset) -* [`shopify plugins uninstall [PLUGIN]`](#shopify-plugins-uninstall-plugin) -* [`shopify plugins unlink [PLUGIN]`](#shopify-plugins-unlink-plugin) -* [`shopify plugins update`](#shopify-plugins-update) * [`shopify search [query]`](#shopify-search-query) -* [`shopify theme check`](#shopify-theme-check) -* [`shopify theme console`](#shopify-theme-console) -* [`shopify theme delete`](#shopify-theme-delete) -* [`shopify theme dev`](#shopify-theme-dev) -* [`shopify theme duplicate`](#shopify-theme-duplicate) -* [`shopify theme info`](#shopify-theme-info) -* [`shopify theme init [name] [flags]`](#shopify-theme-init-name-flags) -* [`shopify theme language-server`](#shopify-theme-language-server) -* [`shopify theme list`](#shopify-theme-list) -* [`shopify theme metafields pull`](#shopify-theme-metafields-pull) -* [`shopify theme open`](#shopify-theme-open) -* [`shopify theme package`](#shopify-theme-package) -* [`shopify theme preview`](#shopify-theme-preview) -* [`shopify theme profile`](#shopify-theme-profile) -* [`shopify theme publish`](#shopify-theme-publish) -* [`shopify theme pull`](#shopify-theme-pull) -* [`shopify theme push`](#shopify-theme-push) -* [`shopify theme rename`](#shopify-theme-rename) -* [`shopify theme share`](#shopify-theme-share) * [`shopify upgrade`](#shopify-upgrade) * [`shopify version`](#shopify-version) -## `shopify app build` - -Build the app, including extensions. - -``` -USAGE - $ shopify app build [--client-id | -c ] [--no-color] [--path ] [--reset | ] - [--skip-dependencies-installation] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --skip-dependencies-installation [env: SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION] Skips the installation of - dependencies. Deprecated, use workspaces instead. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Build the app, including extensions. - - This command executes the build script specified in the element's TOML file. You can specify a custom script in the - file. To learn about configuration files in Shopify apps, refer to "App configuration" - (https://shopify.dev/docs/apps/tools/cli/configuration). - - If you're building a "theme app extension" (https://shopify.dev/docs/apps/online-store/theme-app-extensions), then - running the `build` command runs "Theme Check" (https://shopify.dev/docs/themes/tools/theme-check) against your - extension to ensure that it's valid. -``` - -_See code: [dist/commands/app/build.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/build.js)_ - -## `shopify app bulk cancel` - -Cancel a bulk operation. - -``` -USAGE - $ shopify app bulk cancel --id [--client-id | -c ] [--no-color] [--path ] [--reset | - ] [-s ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -s, --store= [env: SHOPIFY_FLAG_STORE] The store domain. Must be an existing dev store. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --id= (required) [env: SHOPIFY_FLAG_ID] The bulk operation ID to cancel (numeric ID or full GID). - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Cancel a bulk operation. - - Cancels a running bulk operation by ID. -``` - -_See code: [dist/commands/app/bulk/cancel.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/bulk/cancel.js)_ - -## `shopify app bulk execute` - -Execute bulk operations. - -``` -USAGE - $ shopify app bulk execute [--client-id | -c ] [--no-color] [--output-file --watch] [--path - ] [-q ] [--query-file ] [--reset | ] [-s ] [--variable-file | -v ...] - [--verbose] [--version ] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -q, --query= [env: SHOPIFY_FLAG_QUERY] The GraphQL query or mutation to run as a bulk operation. - -s, --store= [env: SHOPIFY_FLAG_STORE] The store domain. Must be an existing dev store. - -v, --variables=... [env: SHOPIFY_FLAG_VARIABLES] The values for any GraphQL variables in your mutation, in - JSON format. Can be specified multiple times. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --output-file= [env: SHOPIFY_FLAG_OUTPUT_FILE] The file path where results should be written if --watch - is specified. If not specified, results will be written to STDOUT. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --query-file= [env: SHOPIFY_FLAG_QUERY_FILE] Path to a file containing the GraphQL query or mutation. - Can't be used with --query. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --variable-file= [env: SHOPIFY_FLAG_VARIABLE_FILE] Path to a file containing GraphQL variables in JSONL - format (one JSON object per line). Can't be used with --variables. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - --version= [env: SHOPIFY_FLAG_VERSION] The API version to use for the bulk operation. If not - specified, uses the latest stable version. - --watch [env: SHOPIFY_FLAG_WATCH] Wait for bulk operation results before exiting. Defaults to - false. - -DESCRIPTION - Execute bulk operations. - - Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only - allowed on dev stores. - - Bulk operations allow you to process large amounts of data asynchronously. Learn more about "bulk query operations" - (https://shopify.dev/docs/api/usage/bulk-operations/queries) and "bulk mutation operations" - (https://shopify.dev/docs/api/usage/bulk-operations/imports). - - Use "`bulk status`" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk - operations. -``` - -_See code: [dist/commands/app/bulk/execute.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/bulk/execute.js)_ - -## `shopify app bulk status` - -Check the status of bulk operations. - -``` -USAGE - $ shopify app bulk status [--client-id | -c ] [--id ] [--no-color] [--path ] [--reset - | ] [-s ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -s, --store= [env: SHOPIFY_FLAG_STORE] The store domain. Must be an existing dev store. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --id= [env: SHOPIFY_FLAG_ID] The bulk operation ID (numeric ID or full GID). If not provided, lists - all bulk operations belonging to this app on this store in the last 7 days. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Check the status of bulk operations. - - Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store - in the last 7 days. - - Bulk operations allow you to process large amounts of data asynchronously. Learn more about "bulk query operations" - (https://shopify.dev/docs/api/usage/bulk-operations/queries) and "bulk mutation operations" - (https://shopify.dev/docs/api/usage/bulk-operations/imports). - - Use "`bulk execute`" (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation. -``` - -_See code: [dist/commands/app/bulk/status.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/bulk/status.js)_ - -## `shopify app config link` - -Fetch your app configuration from the Developer Dashboard. - -``` -USAGE - $ shopify app config link [--client-id | -c ] [--no-color] [--path ] [--reset | ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Fetch your app configuration from the Developer Dashboard. - - Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a - new app with this command to start with a default configuration file. - - For more information on the format of the created TOML configuration file, refer to the "App configuration" - (https://shopify.dev/docs/apps/tools/cli/configuration) page. -``` - -_See code: [dist/commands/app/config/link.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/config/link.js)_ - -## `shopify app config pull` - -Refresh an already-linked app configuration without prompts. - -``` -USAGE - $ shopify app config pull [--client-id | -c ] [--no-color] [--path ] [--reset | ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Refresh an already-linked app configuration without prompts. - - Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file. - - This command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to - target a specific configuration file, or omit it to use the default one. -``` - -_See code: [dist/commands/app/config/pull.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/config/pull.js)_ - -## `shopify app config use [config] [flags]` - -Activate an app configuration. - -``` -USAGE - $ shopify app config use [config] [flags] - -ARGUMENTS - [CONFIG] The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'. - -FLAGS - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Activate an app configuration. - - Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll - be prompted to choose from the configuration files in your project. -``` - -_See code: [dist/commands/app/config/use.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/config/use.js)_ - -## `shopify app config validate` - -Validate your app configuration and extensions. - -``` -USAGE - $ shopify app config validate [--client-id | -c ] [-j] [--no-color] [--path ] [--reset | ] - [--verbose] - -FLAGS - -c, --config= [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. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Validate your app configuration and extensions. - - Validates the selected app configuration file and all extension configurations against their schemas and reports any - errors found. -``` - -_See code: [dist/commands/app/config/validate.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/config/validate.js)_ - -## `shopify app deploy` - -Deploy your Shopify app. - -``` -USAGE - $ shopify app deploy [--client-id | -c ] [-f] [--message ] [--no-build] [--no-color] - [--no-release | --allow-updates | --allow-deletes] [--path ] [--reset | ] [--source-control-url ] - [--verbose] [--version ] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -f, --force [env: SHOPIFY_FLAG_FORCE] [Deprecated] Deploy without asking for confirmation. - Equivalent to --allow-updates --allow-deletes. Use --allow-updates for CI/CD - environments instead. - --allow-deletes [env: SHOPIFY_FLAG_ALLOW_DELETES] Allows removing extensions and configuration - without requiring user confirmation. For CI/CD environments, the recommended flag is - --allow-updates. - --allow-updates [env: SHOPIFY_FLAG_ALLOW_UPDATES] Allows adding and updating extensions and - configuration without requiring user confirmation. Recommended option for CI/CD - environments. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --message= [env: SHOPIFY_FLAG_MESSAGE] Optional message that will be associated with this - version. This is for internal use only and won't be available externally. - --no-build [env: SHOPIFY_FLAG_NO_BUILD] Use with caution: Skips building any elements of the - app that require building. You should ensure your app has been prepared in advance, - such as by running `shopify app build` or by caching build artifacts. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --no-release [env: SHOPIFY_FLAG_NO_RELEASE] Creates a version but doesn't release it - it's not - made available to merchants. With this flag, a user confirmation is not required. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --source-control-url= [env: SHOPIFY_FLAG_SOURCE_CONTROL_URL] URL associated with the new app version. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - --version= [env: SHOPIFY_FLAG_VERSION] Optional version tag that will be associated with this - app version. If not provided, an auto-generated identifier will be generated for - this app version. - -DESCRIPTION - Deploy your Shopify app. - - "Builds the app" (https://shopify.dev/docs/api/shopify-cli/app/app-build), then deploys your app configuration and - extensions. - - This command creates an app version, which is a snapshot of your app configuration and all extensions. This version is - then released to users. - - This command doesn't deploy your "web app" (https://shopify.dev/docs/apps/tools/cli/structure#web-components). You - need to "deploy your web app" (https://shopify.dev/docs/apps/deployment/web) to your own hosting solution. -``` - -_See code: [dist/commands/app/deploy.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/deploy.js)_ - -## `shopify app dev` - -Run the app. - -``` -USAGE - $ shopify app dev [--checkout-cart-url ] [--client-id | -c ] [--localhost-port - ] [--no-color] [--no-update] [--notify ] [--path ] [--reset | ] - [--skip-dependencies-installation] [-s ] [--subscription-product-url ] [-t ] - [--theme-app-extension-port ] [--use-localhost | [--tunnel-url | ]] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -s, --store= [env: SHOPIFY_FLAG_STORE] Store URL. Must be an existing development or - Shopify Plus sandbox store. - -t, --theme= [env: SHOPIFY_FLAG_THEME] Theme ID or name of the theme app extension host - theme. - --checkout-cart-url= [env: SHOPIFY_FLAG_CHECKOUT_CART_URL] Resource URL for checkout UI extension. - Format: "/cart/{productVariantID}:{productQuantity}" - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --localhost-port= [env: SHOPIFY_FLAG_LOCALHOST_PORT] Port to use for localhost. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --no-update [env: SHOPIFY_FLAG_NO_UPDATE] Uses the app URL from the toml file instead an - autogenerated URL for dev. - --notify= [env: SHOPIFY_FLAG_NOTIFY] The file path or URL. The file path is to a file - that you want updated on idle. The URL path is where you want a webhook posted - to report on file changes. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --skip-dependencies-installation [env: SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION] Skips the installation of - dependencies. Deprecated, use workspaces instead. - --subscription-product-url= [env: SHOPIFY_FLAG_SUBSCRIPTION_PRODUCT_URL] Resource URL for subscription UI - extension. Format: "/products/{productId}" - --theme-app-extension-port= [env: SHOPIFY_FLAG_THEME_APP_EXTENSION_PORT] Local port of the theme app - extension development server. - --tunnel-url= [env: SHOPIFY_FLAG_TUNNEL_URL] Use a custom tunnel, it must be running before - executing dev. Format: "https://my-tunnel-url:port". - --use-localhost [env: SHOPIFY_FLAG_USE_LOCALHOST] Service entry point will listen to - localhost. A tunnel won't be used. Will work for testing many app features, - but not those that directly invoke your app (E.g: Webhooks) - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Run the app. - - Builds and previews your app on a dev store, and watches for changes. "Read more about testing apps locally" - (https://shopify.dev/docs/apps/build/cli-for-apps/test-apps-locally). -``` - -_See code: [dist/commands/app/dev.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/dev.js)_ - -## `shopify app dev clean` - -Cleans up the dev preview from the selected store. - -``` -USAGE - $ shopify app dev clean [--client-id | -c ] [--no-color] [--path ] [--reset | ] [-s - ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -s, --store= [env: SHOPIFY_FLAG_STORE] Store URL. Must be an existing development store. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Cleans up the dev preview from the selected store. - - Stop the dev preview that was started with `shopify app dev`. - - It restores the app's active version to the selected development store. -``` - -_See code: [dist/commands/app/dev/clean.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/dev/clean.js)_ - -## `shopify app env pull` - -Pull app and extensions environment variables. - -``` -USAGE - $ shopify app env pull [--client-id | -c ] [--env-file ] [--no-color] [--path ] - [--reset | ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --env-file= [env: SHOPIFY_FLAG_ENV_FILE] Specify an environment file to update if the update flag is set - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Pull app and extensions environment variables. - - Creates or updates an `.env` files that contains app and app extension environment variables. - - When an existing `.env` file is updated, changes to the variables are displayed in the terminal output. Existing - variables and commented variables are preserved. -``` - -_See code: [dist/commands/app/env/pull.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/env/pull.js)_ - -## `shopify app env show` - -Display app and extensions environment variables. - -``` -USAGE - $ shopify app env show [--client-id | -c ] [--no-color] [--path ] [--reset | ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Display app and extensions environment variables. - - Displays environment variables that can be used to deploy apps and app extensions. -``` - -_See code: [dist/commands/app/env/show.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/env/show.js)_ - -## `shopify app execute` - -Execute GraphQL queries and mutations. - -``` -USAGE - $ shopify app execute [--client-id | -c ] [--no-color] [--output-file ] [--path ] - [-q ] [--query-file ] [--reset | ] [-s ] [--variable-file | -v ] [--verbose] - [--version ] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -q, --query= [env: SHOPIFY_FLAG_QUERY] The GraphQL query or mutation, as a string. - -s, --store= [env: SHOPIFY_FLAG_STORE] The myshopify.com domain of the store to execute against. The - app must be installed on the store. If not specified, you will be prompted to select a - store. - -v, --variables= [env: SHOPIFY_FLAG_VARIABLES] The values for any GraphQL variables in your query or - mutation, in JSON format. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --output-file= [env: SHOPIFY_FLAG_OUTPUT_FILE] The file name where results should be written, instead of - STDOUT. - --path= [env: SHOPIFY_FLAG_PATH] The path to your app directory. - --query-file= [env: SHOPIFY_FLAG_QUERY_FILE] Path to a file containing the GraphQL query or mutation. - Can't be used with --query. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --variable-file= [env: SHOPIFY_FLAG_VARIABLE_FILE] Path to a file containing GraphQL variables in JSON - format. Can't be used with --variables. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - --version= [env: SHOPIFY_FLAG_VERSION] The API version to use for the query or mutation. Defaults to - the latest stable version. - -DESCRIPTION - Execute GraphQL queries and mutations. - - Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores. - - For operations that process large amounts of data, use "`bulk execute`" - (https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead. -``` - -_See code: [dist/commands/app/execute.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/execute.js)_ - -## `shopify app function build` - -Compile a function to wasm. - -``` -USAGE - $ shopify app function build [--client-id | -c ] [--no-color] [--path ] [--reset | ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [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. - -DESCRIPTION - Compile a function to wasm. - - Compiles the function in your current directory to WebAssembly (Wasm) for testing purposes. -``` - -_See code: [dist/commands/app/function/build.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/function/build.js)_ - -## `shopify app function info` - -Print basic information about your function. - -``` -USAGE - $ shopify app function info [--client-id | -c ] [-j] [--no-color] [--path ] [--reset | ] - [--verbose] - -FLAGS - -c, --config= [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. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [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. - -DESCRIPTION - Print basic information about your function. - - The information returned includes the following: - - - The function handle - - The function name - - The function API version - - The targeting configuration - - The schema path - - The WASM path - - The function runner path -``` - -_See code: [dist/commands/app/function/info.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/function/info.js)_ - -## `shopify app function replay` - -Replays a function run from an app log. - -``` -USAGE - $ shopify app function replay [--client-id | -c ] [-j] [-l ] [--no-color] [--path ] - [--reset | ] [--verbose] [-w] - -FLAGS - -c, --config= [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= [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. - -w, --[no-]watch [env: SHOPIFY_FLAG_WATCH] Re-run the function when the source code changes. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [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. - -DESCRIPTION - Replays a function run from an app log. - - 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). -``` - -_See code: [dist/commands/app/function/replay.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/function/replay.js)_ - -## `shopify app function run` - -Run a function locally for testing. - -``` -USAGE - $ shopify app function run [--client-id | -c ] [-e ] [-i ] [-j] [--no-color] [--path - ] [--reset | ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -e, --export= [env: SHOPIFY_FLAG_EXPORT] Name of the WebAssembly export to invoke. - -i, --input= [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. Automatically disables color output. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [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. - -DESCRIPTION - Run a function locally for testing. - - 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). -``` - -_See code: [dist/commands/app/function/run.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/function/run.js)_ - -## `shopify app function schema` - -Fetch the latest GraphQL schema for a function. - -``` -USAGE - $ shopify app function schema [--client-id | -c ] [--no-color] [--path ] [--reset | ] [--stdout] - [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [env: SHOPIFY_FLAG_PATH] The path to your function directory. - --reset [env: SHOPIFY_FLAG_RESET] Reset all your settings. - --stdout [env: SHOPIFY_FLAG_STDOUT] Output the schema to stdout instead of writing to a file. - --verbose [env: SHOPIFY_FLAG_VERBOSE] Increase the verbosity of the output. - -DESCRIPTION - Fetch the latest GraphQL schema for a function. - - Generates the latest "GraphQL schema" (https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a - function in your app. Run this command from the function directory. - - This command uses the API type and version of your function, as defined in your extension TOML file, to generate the - latest GraphQL schema. The schema is written to the `schema.graphql` file. -``` - -_See code: [dist/commands/app/function/schema.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/function/schema.js)_ - -## `shopify app function typegen` - -Generate GraphQL types for a function. - -``` -USAGE - $ shopify app function typegen [--client-id | -c ] [--no-color] [--path ] [--reset | ] - [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --no-color [env: SHOPIFY_FLAG_NO_COLOR] Disable color output. - --path= [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. - -DESCRIPTION - Generate GraphQL types for a function. - - Creates GraphQL types based on your "input query" (https://shopify.dev/docs/apps/functions/input-output#input) for a - function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration. -``` - -_See code: [dist/commands/app/function/typegen.js](https://github.com/Shopify/cli/blob/v3.92.0/dist/commands/app/function/typegen.js)_ - -## `shopify app generate extension` - -Generate a new app Extension. - -``` -USAGE - $ shopify app generate extension [--client-id | -c ] [--flavor - vanilla-js|react|typescript|typescript-react|wasm|rust] [-n ] [--no-color] [--path ] [--reset | ] [-t - ] [-t ] [--verbose] - -FLAGS - -c, --config= [env: SHOPIFY_FLAG_APP_CONFIG] The name of the app configuration. - -n, --name= [env: SHOPIFY_FLAG_NAME] name of your Extension - -t, --template= [env: SHOPIFY_FLAG_EXTENSION_TEMPLATE] Extension template - -t, --type= [env: SHOPIFY_FLAG_EXTENSION_TYPE] Deprecated. Please use --template - --client-id= [env: SHOPIFY_FLAG_CLIENT_ID] The Client ID of your app. - --flavor=