Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs-shopify.dev/generated/generated_docs_data_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -9294,6 +9294,15 @@
"isOptional": true,
"environmentValue": "SHOPIFY_FLAG_VERBOSE"
},
{
"filePath": "docs-shopify.dev/commands/interfaces/theme-init.interface.ts",
"syntaxKind": "PropertySignature",
"name": "-j, --json",
"value": "''",
"description": "Output the result as JSON. Automatically disables color output.",
"isOptional": true,
"environmentValue": "SHOPIFY_FLAG_JSON"
},
{
"filePath": "docs-shopify.dev/commands/interfaces/theme-init.interface.ts",
"syntaxKind": "PropertySignature",
Expand All @@ -9313,7 +9322,7 @@
"environmentValue": "SHOPIFY_FLAG_CLONE_URL"
}
],
"value": "export interface themeinit {\n /**\n * Alias of the Shopify account to use for authentication.\n * @environment SHOPIFY_FLAG_AUTH_ALIAS\n */\n '--auth-alias <value>'?: string\n\n /**\n * The Git URL to clone from. Defaults to Shopify's Skeleton theme.\n * @environment SHOPIFY_FLAG_CLONE_URL\n */\n '-u, --clone-url <value>'?: string\n\n /**\n * Print the command's JSON schemas.\n * @environment SHOPIFY_FLAG_JSON_SCHEMA\n */\n '--json-schema'?: ''\n\n /**\n * Downloads the latest release of the `clone-url`\n * @environment SHOPIFY_FLAG_LATEST\n */\n '-l, --latest'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Disable interactive prompts and browser authentication.\n * @environment SHOPIFY_FLAG_NO_INPUT\n */\n '--no-input'?: ''\n\n /**\n * The path where you want to run the command. Defaults to the current working directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path <value>'?: string\n\n /**\n * Increase the verbosity of the output. May include sensitive data.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
"value": "export interface themeinit {\n /**\n * Alias of the Shopify account to use for authentication.\n * @environment SHOPIFY_FLAG_AUTH_ALIAS\n */\n '--auth-alias <value>'?: string\n\n /**\n * The Git URL to clone from. Defaults to Shopify's Skeleton theme.\n * @environment SHOPIFY_FLAG_CLONE_URL\n */\n '-u, --clone-url <value>'?: string\n\n /**\n * Output the result as JSON. Automatically disables color output.\n * @environment SHOPIFY_FLAG_JSON\n */\n '-j, --json'?: ''\n\n /**\n * Print the command's JSON schemas.\n * @environment SHOPIFY_FLAG_JSON_SCHEMA\n */\n '--json-schema'?: ''\n\n /**\n * Downloads the latest release of the `clone-url`\n * @environment SHOPIFY_FLAG_LATEST\n */\n '-l, --latest'?: ''\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * Disable interactive prompts and browser authentication.\n * @environment SHOPIFY_FLAG_NO_INPUT\n */\n '--no-input'?: ''\n\n /**\n * The path where you want to run the command. Defaults to the current working directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path <value>'?: string\n\n /**\n * Increase the verbosity of the output. May include sensitive data.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}"
}
},
"themelanguageserver": {
Expand Down
95 changes: 95 additions & 0 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14193,6 +14193,10 @@ ARGUMENTS
[NAME] Name of the new theme

FLAGS
-j, --json
Output the result as JSON. Automatically disables color output.
[env: SHOPIFY_FLAG_JSON]

-l, --latest
Downloads the latest release of the `clone-url`
[env: SHOPIFY_FLAG_LATEST]
Expand Down Expand Up @@ -14238,6 +14242,97 @@ DESCRIPTION
> Caution: If you're building a theme for the Shopify Theme Store, then you can use our example theme as a starting
point. However, the theme that you submit needs to be "substantively different from existing themes"
(https://shopify.dev/docs/themes/store/requirements#uniqueness) so that it provides added value for users.


Use `--json-schema` to print the result, error, and event schemas.

Output from `--json` conforms to the `ThemeInitResult` schema.

```json
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"success",
"partial"
]
},
"changed": {
"type": "boolean",
"const": true
},
"directory": {
"$ref": "#/definitions/AbsolutePath"
},
"repoUrl": {
"type": "string",
"minLength": 1,
"description": "The source Git remote (including HTTPS, SSH, or SCP-style Git URLs)."
},
"latest": {
"type": "boolean"
},
"aiInstructions": {
"anyOf": [
{
"type": "string",
"enum": [
"all",
"github",
"cursor",
"claude"
]
},
{
"type": "null"
}
]
},
"instructionFilePaths": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/AbsolutePath"
}
},
{
"type": "null"
}
],
"description": "Created instruction files, or null when setup failed before their completion could be established."
},
"reason": {
"type": [
"string",
"null"
],
"description": "The reason for incomplete setup, or null when setup completed."
}
},
"required": [
"status",
"changed",
"directory",
"repoUrl",
"latest",
"aiInstructions",
"instructionFilePaths",
"reason"
],
"additionalProperties": false,
"title": "ThemeInitResult",
"definitions": {
"AbsolutePath": {
"type": "string",
"description": "An absolute native filesystem path."
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
```
```

## `shopify theme language-server`
Expand Down
11 changes: 10 additions & 1 deletion packages/cli/oclif.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11529,7 +11529,7 @@
}
},
"customPluginName": "@shopify/theme",
"description": "Clones a Git repository to your local machine to use as the starting point for building a theme.\n\n If no Git repository is specified, then this command creates a copy of Shopify's \"Skeleton theme\" (https://github.com/Shopify/skeleton-theme.git), with the specified name in the current folder. If no name is provided, then you're prompted to enter one.\n\n > Caution: If you're building a theme for the Shopify Theme Store, then you can use our example theme as a starting point. However, the theme that you submit needs to be \"substantively different from existing themes\" (https://shopify.dev/docs/themes/store/requirements#uniqueness) so that it provides added value for users.\n ",
"description": "Clones a Git repository to your local machine to use as the starting point for building a theme.\n\n If no Git repository is specified, then this command creates a copy of Shopify's \"Skeleton theme\" (https://github.com/Shopify/skeleton-theme.git), with the specified name in the current folder. If no name is provided, then you're prompted to enter one.\n\n > Caution: If you're building a theme for the Shopify Theme Store, then you can use our example theme as a starting point. However, the theme that you submit needs to be \"substantively different from existing themes\" (https://shopify.dev/docs/themes/store/requirements#uniqueness) so that it provides added value for users.\n \n\nUse `--json-schema` to print the result, error, and event schemas.\n\nOutput from `--json` conforms to the `ThemeInitResult` schema.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"success\",\n \"partial\"\n ]\n },\n \"changed\": {\n \"type\": \"boolean\",\n \"const\": true\n },\n \"directory\": {\n \"$ref\": \"#/definitions/AbsolutePath\"\n },\n \"repoUrl\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"The source Git remote (including HTTPS, SSH, or SCP-style Git URLs).\"\n },\n \"latest\": {\n \"type\": \"boolean\"\n },\n \"aiInstructions\": {\n \"anyOf\": [\n {\n \"type\": \"string\",\n \"enum\": [\n \"all\",\n \"github\",\n \"cursor\",\n \"claude\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"instructionFilePaths\": {\n \"anyOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/definitions/AbsolutePath\"\n }\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Created instruction files, or null when setup failed before their completion could be established.\"\n },\n \"reason\": {\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"description\": \"The reason for incomplete setup, or null when setup completed.\"\n }\n },\n \"required\": [\n \"status\",\n \"changed\",\n \"directory\",\n \"repoUrl\",\n \"latest\",\n \"aiInstructions\",\n \"instructionFilePaths\",\n \"reason\"\n ],\n \"additionalProperties\": false,\n \"title\": \"ThemeInitResult\",\n \"definitions\": {\n \"AbsolutePath\": {\n \"type\": \"string\",\n \"description\": \"An absolute native filesystem path.\"\n }\n },\n \"$schema\": \"http://json-schema.org/draft-07/schema#\"\n}\n```",
"descriptionWithMarkdown": "Clones a Git repository to your local machine to use as the starting point for building a theme.\n\n If no Git repository is specified, then this command creates a copy of Shopify's [Skeleton theme](https://github.com/Shopify/skeleton-theme.git), with the specified name in the current folder. If no name is provided, then you're prompted to enter one.\n\n > Caution: If you're building a theme for the Shopify Theme Store, then you can use our example theme as a starting point. However, the theme that you submit needs to be [substantively different from existing themes](https://shopify.dev/docs/themes/store/requirements#uniqueness) so that it provides added value for users.\n ",
"enableJsonFlag": false,
"flags": {
Expand All @@ -11551,6 +11551,15 @@
"name": "clone-url",
"type": "option"
},
"json": {
"allowNo": false,
"char": "j",
"description": "Output the result as JSON. Automatically disables color output.",
"env": "SHOPIFY_FLAG_JSON",
"hidden": false,
"name": "json",
"type": "boolean"
},
"json-schema": {
"allowNo": false,
"description": "Print the command's JSON schemas.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const commandExceptions = [
'packages/plugin-did-you-mean/src/commands/config/autocorrect/off.ts',
'packages/plugin-did-you-mean/src/commands/config/autocorrect/on.ts',
'packages/plugin-did-you-mean/src/commands/config/autocorrect/status.ts',
'packages/theme/src/cli/commands/theme/init.ts',
'packages/theme/src/cli/commands/theme/metafields/pull.ts',

// App Security commands, launched before adopting typed JSON output. Remove entries as they adopt it.
Expand Down
Loading
Loading