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 } [[commands.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts" license = "MIT" [[commands.subcommand]] path = ["init"] label = "Initialize a project" [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts" license = "MIT" [[commands.subcommand.field]] id = "yes" label = "Unattended (accept defaults)" type = "boolean" option = ["--yes", "-y"] sources = ["src"] [[commands.subcommand.field]] id = "project" label = "Project ID" type = "string" option = ["--project"] sources = ["src"] [[commands.subcommand.field]] id = "dataset" label = "Dataset" type = "string" option = ["--dataset"] sources = ["src"] [[commands.subcommand.field]] id = "output_path" label = "Output path" type = "path" option = ["--output-path"] path = { kind = "directory", role = "output" } sources = ["src"] [[commands.subcommand.field]] id = "template" label = "Template" type = "string" option = ["--template"] sources = ["src"] [[commands.subcommand.field]] id = "create_project" label = "Create project with name" type = "string" option = ["--create-project"] sources = ["src"] [[commands.subcommand.field]] id = "visibility" label = "Dataset visibility" type = "enum" option = ["--visibility"] choices = [{ value = "public", label = "public" }, { value = "private", label = "private" }] sources = ["src"] [[commands.subcommand.field]] id = "reconfigure" label = "Reconfigure current folder" type = "boolean" option = ["--reconfigure"] sources = ["src"] [[commands.subcommand.task]] id = "init" label = "Initialize" fields = ["project", "dataset", "output_path", "template"] required = [] [[commands.subcommand.task]] id = "unattended" label = "Unattended init" fields = ["yes", "project", "dataset", "output_path", "template"] required = ["project", "dataset"] set = { yes = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["yes", "project", "dataset", "output_path", "template"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["visibility", "reconfigure", "create_project"] [[commands.subcommand]] path = ["start"] label = "Start the studio" [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts" license = "MIT" [[commands.subcommand.field]] id = "port" label = "Port" type = "integer" option = ["--port"] sources = ["src"] [[commands.subcommand.field]] id = "host" label = "Host" type = "string" option = ["--host"] sources = ["src"] [[commands.subcommand.task]] id = "start" label = "Start dev server" fields = ["port", "host"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["port", "host"] [[commands.subcommand]] path = ["build"] label = "Build the studio" [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts" license = "MIT" [[commands.subcommand.field]] id = "source_maps" label = "Source maps" type = "boolean" option = ["--source-maps"] sources = ["src"] [[commands.subcommand.field]] id = "no_minify" label = "Skip minifying" type = "boolean" option = ["--no-minify"] sources = ["src"] [[commands.subcommand.field]] id = "yes" label = "Unattended" type = "boolean" option = ["--yes", "-y"] sources = ["src"] [[commands.subcommand.task]] id = "build" label = "Build" fields = ["source_maps", "no_minify"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["source_maps", "no_minify"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["yes"] [[commands.subcommand]] path = ["deploy"] label = "Deploy the studio" [[commands.subcommand.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/sanity.ts" license = "MIT" [[commands.subcommand.field]] id = "source_dir" label = "Built directory" type = "path" position = 0 path = { kind = "directory", role = "input" } sources = ["src"] [[commands.subcommand.field]] id = "source_maps" label = "Source maps" type = "boolean" option = ["--source-maps"] sources = ["src"] [[commands.subcommand.field]] id = "no_minify" label = "Skip minifying" type = "boolean" option = ["--no-minify"] sources = ["src"] [[commands.subcommand.field]] id = "no_build" label = "Skip build" type = "boolean" option = ["--no-build"] sources = ["src"] [[commands.subcommand.task]] id = "deploy" label = "Build and deploy" fields = ["source_dir"] required = [] [[commands.subcommand.task]] id = "prebuilt" label = "Deploy existing build" fields = ["source_dir", "no_build"] required = [] set = { no_build = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["source_dir", "no_build"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["source_maps", "no_minify"]