{
  "id": "dart",
  "name": "Dart",
  "homepage": "https://dart.dev",
  "description": "A command-line utility for Dart development.",
  "icon": "theSVG:dart",
  "executables": [
    "dart"
  ],
  "dotfiles": {
    "paths": [],
    "exclude": [],
    "secret": [
      "[appData]/dart/pub-credentials.json",
      "[appData]/dart/pub-tokens.json"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Dart commands",
    "description": "Common dart subcommands: analyze, format, create and pub get. Global flags and other subcommands are left out.",
    "quality": "ai-draft",
    "base": "fig:dart",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/dart.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "analyze"
        ],
        "label": "Analyze code",
        "description": "Static analysis of a Dart project.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/dart.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "directory",
            "label": "Project directory",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fatal_infos",
            "label": "Treat infos as fatal",
            "type": "boolean",
            "option": [
              "--fatal-infos"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fatal_warnings",
            "label": "Treat warnings as fatal",
            "type": "boolean",
            "option": [
              "--fatal-warnings"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_fatal_warnings",
            "label": "Do not treat warnings as fatal",
            "type": "boolean",
            "option": [
              "--no-fatal-warnings"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "strict",
            "label": "Strict analysis",
            "set": {
              "fatal_infos": [
                true
              ]
            },
            "fields": [
              "directory",
              "fatal_infos"
            ],
            "required": []
          },
          {
            "id": "plain",
            "label": "Analyze project",
            "fields": [
              "directory",
              "no_fatal_warnings"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "directory",
              "fatal_infos",
              "fatal_warnings",
              "no_fatal_warnings"
            ]
          }
        ]
      },
      {
        "path": [
          "format"
        ],
        "label": "Format code",
        "description": "Rewrites files in place unless an output mode is given.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/dart.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "targets",
            "label": "Files or directories",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "line_length",
            "label": "Line length",
            "type": "integer",
            "option": [
              "--line-length",
              "-l"
            ],
            "suggestions": [
              {
                "value": "80",
                "label": "80"
              },
              {
                "value": "120",
                "label": "120"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "set_exit_if_changed",
            "label": "Exit 1 if anything changes",
            "type": "boolean",
            "option": [
              "--set-exit-if-changed"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fix",
            "label": "Apply style fixes",
            "type": "boolean",
            "option": [
              "--fix"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "format",
            "label": "Format in place",
            "fields": [
              "targets",
              "line_length",
              "fix"
            ],
            "required": [
              "targets"
            ]
          },
          {
            "id": "check",
            "label": "Check only (CI)",
            "set": {
              "set_exit_if_changed": [
                true
              ]
            },
            "fields": [
              "targets",
              "set_exit_if_changed"
            ],
            "required": [
              "targets"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "targets",
              "line_length",
              "set_exit_if_changed",
              "fix"
            ]
          }
        ]
      },
      {
        "path": [
          "create"
        ],
        "label": "Create project",
        "description": "Creates a new Dart project from a template.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/dart.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "directory",
            "label": "Target directory",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "template",
            "label": "Template",
            "type": "string",
            "option": [
              "--template",
              "-t"
            ],
            "suggestions": [
              {
                "value": "console",
                "label": "console"
              },
              {
                "value": "package",
                "label": "package"
              },
              {
                "value": "server-shelf",
                "label": "server-shelf"
              },
              {
                "value": "web",
                "label": "web"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "force",
            "label": "Generate even if directory exists",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_pub",
            "label": "Skip pub get",
            "type": "boolean",
            "option": [
              "--no-pub"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "console",
            "label": "Console app",
            "set": {
              "template": [
                "console"
              ]
            },
            "fields": [
              "directory",
              "template"
            ],
            "required": [
              "directory"
            ]
          },
          {
            "id": "package",
            "label": "Package",
            "set": {
              "template": [
                "package"
              ]
            },
            "fields": [
              "directory",
              "template"
            ],
            "required": [
              "directory"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "directory",
              "template",
              "force",
              "no_pub"
            ]
          }
        ]
      },
      {
        "path": [
          "pub",
          "get"
        ],
        "label": "Get packages",
        "description": "Resolves and downloads dependencies.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/dart.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "offline",
            "label": "Use cached packages only",
            "type": "boolean",
            "option": [
              "--offline"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "precompile",
            "label": "Precompile executables",
            "type": "boolean",
            "option": [
              "--precompile"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "get",
            "label": "Get packages",
            "fields": [
              "offline",
              "precompile"
            ],
            "required": []
          },
          {
            "id": "preview",
            "label": "Preview changes",
            "set": {
              "dry_run": [
                true
              ]
            },
            "fields": [
              "dry_run"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "offline",
              "dry_run",
              "precompile"
            ]
          }
        ]
      }
    ]
  }
}
