> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify CLI

> CodeRabbit's guide to Shopify CLI.

[Shopify CLI](https://github.com/Shopify/cli) is a command-line tool that helps you build Shopify apps, themes, and custom storefronts. It provides functionality for initializing, building, developing, and deploying Shopify projects.

## Requirements

The tool only runs when the following conditions are met:

### File Types

* Only processes pull requests changing `*.liquid` files

### Configuration Files

* Requires either `.theme-check.yml` or `.theme-check.yaml` configuration file in the project root

### Directory Structure

* Requires the standard Shopify theme directory structure at the project root:
  * `assets/`
  * `config/`
  * `layout/`
  * `locales/`
  * `sections/`
  * `snippets/`
  * `templates/`

If any of these requirements are not met, the tool will not run.

## When we skip Shopify Theme Check

CodeRabbit will skip running Shopify Theme Check when:

* No `.liquid` files are changed in the pull request.
* The repository does not have the required Shopify theme directory structure.
* No config file is found (`.theme-check.yml` or `.theme-check.yaml`).
* Shopify Theme Check is already running in GitHub workflows.

## Validation Rules

The tool checks for:

### Theme Validation

* Liquid syntax errors
* Theme requirements compliance
* Asset organization
* Performance best practices
* Accessibility standards

**Note**: The tool filters out `UndefinedObject` and `MissingTemplate` checks, reporting only errors and warnings for other issues.

## Common Issues

The tool helps identify and fix:

1. Theme Issues:
   * Invalid Liquid syntax
   * Missing required templates
   * Performance bottlenecks
   * Accessibility violations

2. App Issues:
   * Invalid API usage
   * Missing dependencies
   * Configuration errors
   * Security vulnerabilities

## Links

* [Shopify CLI GitHub Repository](https://github.com/Shopify/cli)
* [Shopify CLI Theme Documentation](https://shopify.dev/docs/api/shopify-cli/theme)
* [Shopify CLI App Documentation](https://shopify.dev/docs/apps/tools/cli)
* [Theme Development Requirements](https://shopify.dev/docs/themes/store/requirements)
