{
  "id": "sanity",
  "name": "Sanity CLI",
  "description": "Command-line tool for Sanity Studio projects.",
  "homepage": "https://www.sanity.io",
  "executables": [
    "sanity"
  ],
  "commands": {
    "format": 1,
    "label": "Sanity",
    "description": "Create, run, build and deploy a studio. Datasets, documents, CORS, GraphQL and user management are not covered.",
    "quality": "ai-draft",
    "base": "fig:sanity",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "src",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "init"
        ],
        "label": "Initialize a project",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "yes",
            "label": "Unattended (accept defaults)",
            "type": "boolean",
            "option": [
              "--yes",
              "-y"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "project",
            "label": "Project ID",
            "type": "string",
            "option": [
              "--project"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "dataset",
            "label": "Dataset",
            "type": "string",
            "option": [
              "--dataset"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "output_path",
            "label": "Output path",
            "type": "path",
            "option": [
              "--output-path"
            ],
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "src"
            ]
          },
          {
            "id": "template",
            "label": "Template",
            "type": "string",
            "option": [
              "--template"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "create_project",
            "label": "Create project with name",
            "type": "string",
            "option": [
              "--create-project"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "visibility",
            "label": "Dataset visibility",
            "type": "enum",
            "option": [
              "--visibility"
            ],
            "choices": [
              {
                "value": "public",
                "label": "public"
              },
              {
                "value": "private",
                "label": "private"
              }
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "reconfigure",
            "label": "Reconfigure current folder",
            "type": "boolean",
            "option": [
              "--reconfigure"
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "init",
            "label": "Initialize",
            "fields": [
              "project",
              "dataset",
              "output_path",
              "template"
            ],
            "required": []
          },
          {
            "id": "unattended",
            "label": "Unattended init",
            "fields": [
              "yes",
              "project",
              "dataset",
              "output_path",
              "template"
            ],
            "required": [
              "project",
              "dataset"
            ],
            "set": {
              "yes": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "yes",
              "project",
              "dataset",
              "output_path",
              "template"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "visibility",
              "reconfigure",
              "create_project"
            ]
          }
        ]
      },
      {
        "path": [
          "start"
        ],
        "label": "Start the studio",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "port",
            "label": "Port",
            "type": "integer",
            "option": [
              "--port"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "host",
            "label": "Host",
            "type": "string",
            "option": [
              "--host"
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "start",
            "label": "Start dev server",
            "fields": [
              "port",
              "host"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "port",
              "host"
            ]
          }
        ]
      },
      {
        "path": [
          "build"
        ],
        "label": "Build the studio",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "source_maps",
            "label": "Source maps",
            "type": "boolean",
            "option": [
              "--source-maps"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "no_minify",
            "label": "Skip minifying",
            "type": "boolean",
            "option": [
              "--no-minify"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "yes",
            "label": "Unattended",
            "type": "boolean",
            "option": [
              "--yes",
              "-y"
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "build",
            "label": "Build",
            "fields": [
              "source_maps",
              "no_minify"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "source_maps",
              "no_minify"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "yes"
            ]
          }
        ]
      },
      {
        "path": [
          "deploy"
        ],
        "label": "Deploy the studio",
        "source": [
          {
            "id": "src",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "source_dir",
            "label": "Built directory",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input"
            },
            "sources": [
              "src"
            ]
          },
          {
            "id": "source_maps",
            "label": "Source maps",
            "type": "boolean",
            "option": [
              "--source-maps"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "no_minify",
            "label": "Skip minifying",
            "type": "boolean",
            "option": [
              "--no-minify"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "no_build",
            "label": "Skip build",
            "type": "boolean",
            "option": [
              "--no-build"
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "deploy",
            "label": "Build and deploy",
            "fields": [
              "source_dir"
            ],
            "required": []
          },
          {
            "id": "prebuilt",
            "label": "Deploy existing build",
            "fields": [
              "source_dir",
              "no_build"
            ],
            "required": [],
            "set": {
              "no_build": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "source_dir",
              "no_build"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "source_maps",
              "no_minify"
            ]
          }
        ]
      }
    ]
  }
}
