{
  "id": "arduino-cli",
  "name": "Arduino CLI",
  "homepage": "https://arduino.github.io/arduino-cli/latest/",
  "description": "An all-in-one solution that provides Boards/Library Managers, sketch builder, board detection and uploader.",
  "icon": "SimpleIcons:arduino",
  "executables": [
    "arduino-cli"
  ],
  "dotfiles": {
    "paths": [
      "~/Library/Arduino15/arduino-cli.yaml",
      "~/.arduino15/arduino-cli.yaml",
      "%LOCALAPPDATA%/Arduino15/arduino-cli.yaml"
    ],
    "exclude": [
      "~/Library/Arduino15/packages/",
      "~/Library/Arduino15/staging/",
      "~/.arduino15/packages/",
      "~/.arduino15/staging/",
      "%LOCALAPPDATA%/Arduino15/packages/",
      "%LOCALAPPDATA%/Arduino15/staging/"
    ],
    "secret": [],
    "side_effect": false,
    "machine_lines": [
      {
        "file": [
          "~/Library/Arduino15/arduino-cli.yaml",
          "~/.arduino15/arduino-cli.yaml",
          "%LOCALAPPDATA%/Arduino15/arduino-cli.yaml"
        ],
        "match": {
          "key_path": [
            "directories.data",
            "directories.downloads",
            "directories.user"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Arduino CLI",
    "description": "Compile and upload sketches and manage boards, cores and libraries. Daemon, debug and config commands are left out.",
    "quality": "ai-draft",
    "base": "fig:arduino-cli",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/arduino-cli.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "format",
        "label": "Output format",
        "type": "string",
        "option": [
          "--format"
        ],
        "suggestions": [
          {
            "value": "text",
            "label": "text"
          },
          {
            "value": "json",
            "label": "json"
          },
          {
            "value": "jsonmini",
            "label": "jsonmini"
          },
          {
            "value": "yaml",
            "label": "yaml"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_color",
        "label": "No color",
        "type": "boolean",
        "option": [
          "--no-color"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "config_file",
        "label": "Config file",
        "type": "path",
        "option": [
          "--config-file"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "format"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "no_color",
          "config_file"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "compile"
        ],
        "label": "Compile a sketch",
        "description": "Compile a sketch for a board.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/arduino-cli.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "sketch",
            "label": "Sketch folder",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fqbn",
            "label": "Board (FQBN)",
            "description": "Example: arduino:avr:uno.",
            "type": "string",
            "option": [
              "--fqbn",
              "-b"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "upload",
            "label": "Upload after compiling",
            "type": "boolean",
            "option": [
              "--upload",
              "-u"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "port",
            "label": "Port",
            "description": "Example: /dev/ttyACM0 or COM3.",
            "type": "string",
            "option": [
              "--port",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verify",
            "label": "Verify after upload",
            "type": "boolean",
            "option": [
              "--verify",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "clean",
            "label": "Clean build, no cache",
            "type": "boolean",
            "option": [
              "--clean"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "--verbose",
              "-v"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "warnings",
            "label": "Warning level",
            "type": "string",
            "option": [
              "--warnings"
            ],
            "suggestions": [
              {
                "value": "none",
                "label": "none"
              },
              {
                "value": "default",
                "label": "default"
              },
              {
                "value": "more",
                "label": "more"
              },
              {
                "value": "all",
                "label": "all"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "build_path",
            "label": "Build path",
            "type": "path",
            "option": [
              "--build-path"
            ],
            "path": {
              "kind": "directory",
              "role": "output",
              "must_exist": false
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output_dir",
            "label": "Output directory",
            "type": "path",
            "option": [
              "--output-dir"
            ],
            "path": {
              "kind": "directory",
              "role": "output",
              "must_exist": false
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "library",
            "label": "Library folders",
            "type": "path",
            "option": [
              "--library"
            ],
            "multiple": true,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "optimize_for_debug",
            "label": "Optimize for debugging",
            "type": "boolean",
            "option": [
              "--optimize-for-debug"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "compile",
            "label": "Compile",
            "fields": [
              "sketch",
              "fqbn",
              "warnings",
              "verbose"
            ],
            "required": [
              "fqbn"
            ]
          },
          {
            "id": "compile-upload",
            "label": "Compile and upload",
            "set": {
              "upload": [
                true
              ]
            },
            "lock": [
              "upload"
            ],
            "fields": [
              "sketch",
              "fqbn",
              "port",
              "upload",
              "verify"
            ],
            "required": [
              "fqbn",
              "port"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "sketch",
              "fqbn",
              "upload",
              "port",
              "verify"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "clean",
              "verbose",
              "warnings",
              "build_path",
              "output_dir",
              "library",
              "optimize_for_debug"
            ]
          }
        ]
      },
      {
        "path": [
          "upload"
        ],
        "label": "Upload a sketch",
        "description": "Upload a compiled sketch. This does not compile first.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/arduino-cli.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "sketch",
            "label": "Sketch folder",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fqbn",
            "label": "Board (FQBN)",
            "description": "Example: arduino:avr:uno.",
            "type": "string",
            "option": [
              "--fqbn",
              "-b"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "port",
            "label": "Port",
            "description": "Example: /dev/ttyACM0 or COM3.",
            "type": "string",
            "option": [
              "--port",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verify",
            "label": "Verify after upload",
            "type": "boolean",
            "option": [
              "--verify",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "input_file",
            "label": "Binary file",
            "type": "path",
            "option": [
              "--input-file",
              "-i"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "--verbose",
              "-v"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "upload",
            "label": "Upload",
            "fields": [
              "sketch",
              "fqbn",
              "port",
              "verify"
            ],
            "required": [
              "fqbn",
              "port"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "sketch",
              "fqbn",
              "port",
              "verify"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "input_file",
              "verbose"
            ]
          }
        ]
      },
      {
        "path": [
          "board",
          "list"
        ],
        "label": "List connected boards",
        "description": "Detect boards connected to this computer.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/arduino-cli.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "watch",
            "label": "Keep running and print changes",
            "type": "boolean",
            "option": [
              "--watch",
              "-w"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List boards",
            "fields": [],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "watch"
            ]
          }
        ]
      },
      {
        "path": [
          "core",
          "install"
        ],
        "label": "Install a core",
        "description": "Install board platforms, for example arduino:avr.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/arduino-cli.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "cores",
            "label": "Cores",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_overwrite",
            "label": "Do not overwrite installed",
            "type": "boolean",
            "option": [
              "--no-overwrite"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "install",
            "label": "Install cores",
            "fields": [
              "cores"
            ],
            "required": [
              "cores"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "cores",
              "no_overwrite"
            ]
          }
        ]
      },
      {
        "path": [
          "lib",
          "install"
        ],
        "label": "Install a library",
        "description": "Install libraries by name, from a Git URL or from a zip file.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/arduino-cli.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "libs",
            "label": "Libraries",
            "description": "Name, optionally with @version.",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_deps",
            "label": "Skip dependencies",
            "type": "boolean",
            "option": [
              "--no-deps"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "install",
            "label": "Install libraries",
            "fields": [
              "libs",
              "no_deps"
            ],
            "required": [
              "libs"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "libs",
              "no_deps"
            ]
          }
        ]
      }
    ]
  }
}
