{
  "id": "espflash",
  "name": "espflash",
  "homepage": "https://github.com/esp-rs/espflash",
  "description": "Serial flasher utility for Espressif SoCs and modules based on esptool.py.",
  "executables": [
    "espflash"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/espflash/espflash.toml",
      "~/.config/espflash/espflash_ports.toml",
      "[appData]/rs.esp.espflash/espflash.toml",
      "[appData]/rs.esp.espflash/espflash_ports.toml",
      "%APPDATA%/esp/espflash/espflash.toml",
      "%APPDATA%/esp/espflash/espflash_ports.toml"
    ],
    "exclude": [],
    "secret": [],
    "machine_lines": [
      {
        "file": [
          "~/.config/espflash/espflash_ports.toml",
          "[appData]/rs.esp.espflash/espflash_ports.toml",
          "%APPDATA%/esp/espflash/espflash_ports.toml"
        ],
        "match": {
          "key_path": [
            "connection.serial"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Flash ESP chips",
    "description": "Flash firmware to Espressif chips with espflash, inspect a connected board or list serial ports. Erase, partition-table, save-image and read-flash commands are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/esp-rs/espflash",
        "revision": "main 2026-10-27",
        "evidence": "(Rendered from the clap definitions in espflash/src/cli/mod.rs and espflash/src/bin/espflash.rs)\nCommands: board-info, flash, list-ports, monitor\n-S, --skip-update-check    Do not check for updates\n-p, --port <PORT>          Serial port connected to target device\n-B, --baud <BAUD>          Baud rate at which to communicate with target device\n-c, --chip <CHIP>          Target device\n    --non-interactive      Avoids asking the user for interactions like selecting/resetting the device\n    --no-stub              Do not use the RAM stub for loading\n-M, --monitor              Open a serial monitor after flashing\n    --no-verify            Don't verify the flash contents after flashing\n    --erase-parts <LABELS> Erase partitions by label\n    --partition-table <FILE> Input partition table\n    --force                Skip compatibility checks (chip revision, etc.). Use with caution!\n-a, --list-all-ports       List all available serial ports, instead of just those likely to be development boards.\n-n, --name-only            Only print the name of the ports and nothing else.\nespflash flash --baud=921600 --monitor /dev/ttyUSB0\nFlash an application in ELF format to a connected target device\nPrint information about a connected target device\nList available serial ports.\n"
      }
    ],
    "field": [
      {
        "id": "skip_update_check",
        "label": "Skip update check",
        "type": "boolean",
        "option": [
          "--skip-update-check",
          "-S"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "skip_update_check"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "flash"
        ],
        "label": "Flash an ELF image",
        "description": "Flash an ELF application to the connected device. Format, partition and monitor tuning options are left out.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://github.com/esp-rs/espflash",
            "revision": "main 2026-10-27",
            "evidence": "(Rendered from the clap definitions in espflash/src/cli/mod.rs and espflash/src/bin/espflash.rs)\nCommands: board-info, flash, list-ports, monitor\n-S, --skip-update-check    Do not check for updates\n-p, --port <PORT>          Serial port connected to target device\n-B, --baud <BAUD>          Baud rate at which to communicate with target device\n-c, --chip <CHIP>          Target device\n    --non-interactive      Avoids asking the user for interactions like selecting/resetting the device\n    --no-stub              Do not use the RAM stub for loading\n-M, --monitor              Open a serial monitor after flashing\n    --no-verify            Don't verify the flash contents after flashing\n    --erase-parts <LABELS> Erase partitions by label\n    --partition-table <FILE> Input partition table\n    --force                Skip compatibility checks (chip revision, etc.). Use with caution!\n-a, --list-all-ports       List all available serial ports, instead of just those likely to be development boards.\n-n, --name-only            Only print the name of the ports and nothing else.\nespflash flash --baud=921600 --monitor /dev/ttyUSB0\nFlash an application in ELF format to a connected target device\nPrint information about a connected target device\nList available serial ports.\n"
          }
        ],
        "field": [
          {
            "id": "image",
            "label": "ELF image",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "help"
            ]
          },
          {
            "id": "port",
            "label": "Serial port",
            "description": "Leave empty to auto-detect a connected board.",
            "type": "string",
            "option": [
              "--port",
              "-p"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "baud",
            "label": "Baud rate",
            "type": "integer",
            "option": [
              "--baud",
              "-B"
            ],
            "min": 1,
            "sources": [
              "help"
            ]
          },
          {
            "id": "chip",
            "label": "Chip",
            "description": "Target chip; usually auto-detected.",
            "type": "string",
            "option": [
              "--chip",
              "-c"
            ],
            "suggestions": [
              {
                "value": "esp32",
                "label": "ESP32"
              },
              {
                "value": "esp32c3",
                "label": "ESP32-C3"
              },
              {
                "value": "esp32s3",
                "label": "ESP32-S3"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "non_interactive",
            "label": "Non-interactive",
            "type": "boolean",
            "option": [
              "--non-interactive"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "monitor",
            "label": "Open monitor after flashing",
            "type": "boolean",
            "option": [
              "--monitor",
              "-M"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_verify",
            "label": "Skip verification",
            "type": "boolean",
            "option": [
              "--no-verify"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_stub",
            "label": "No RAM stub",
            "type": "boolean",
            "option": [
              "--no-stub"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "erase_parts",
            "label": "Erase partitions first",
            "description": "Comma-separated partition labels to erase.",
            "type": "string",
            "option": [
              "--erase-parts"
            ],
            "effect": "delete",
            "sources": [
              "help"
            ]
          },
          {
            "id": "partition_table",
            "label": "Partition table",
            "type": "path",
            "option": [
              "--partition-table"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "flash",
            "label": "Flash and monitor",
            "fields": [
              "image",
              "port",
              "baud",
              "monitor"
            ],
            "required": [
              "image"
            ],
            "set": {
              "monitor": [
                true
              ]
            }
          },
          {
            "id": "flash-only",
            "label": "Flash only",
            "fields": [
              "image",
              "port",
              "baud",
              "chip"
            ],
            "required": [
              "image"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "image",
              "port",
              "baud",
              "monitor"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "chip",
              "non_interactive",
              "no_verify",
              "no_stub",
              "erase_parts",
              "partition_table"
            ]
          }
        ]
      },
      {
        "path": [
          "board-info"
        ],
        "label": "Show board info",
        "description": "Print chip type, flash size, features and MAC address of the connected device.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://github.com/esp-rs/espflash",
            "revision": "main 2026-10-27",
            "evidence": "(Rendered from the clap definitions in espflash/src/cli/mod.rs and espflash/src/bin/espflash.rs)\nCommands: board-info, flash, list-ports, monitor\n-S, --skip-update-check    Do not check for updates\n-p, --port <PORT>          Serial port connected to target device\n-B, --baud <BAUD>          Baud rate at which to communicate with target device\n-c, --chip <CHIP>          Target device\n    --non-interactive      Avoids asking the user for interactions like selecting/resetting the device\n    --no-stub              Do not use the RAM stub for loading\n-M, --monitor              Open a serial monitor after flashing\n    --no-verify            Don't verify the flash contents after flashing\n    --erase-parts <LABELS> Erase partitions by label\n    --partition-table <FILE> Input partition table\n    --force                Skip compatibility checks (chip revision, etc.). Use with caution!\n-a, --list-all-ports       List all available serial ports, instead of just those likely to be development boards.\n-n, --name-only            Only print the name of the ports and nothing else.\nespflash flash --baud=921600 --monitor /dev/ttyUSB0\nFlash an application in ELF format to a connected target device\nPrint information about a connected target device\nList available serial ports.\n"
          }
        ],
        "field": [
          {
            "id": "port",
            "label": "Serial port",
            "description": "Leave empty to auto-detect a connected board.",
            "type": "string",
            "option": [
              "--port",
              "-p"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "baud",
            "label": "Baud rate",
            "type": "integer",
            "option": [
              "--baud",
              "-B"
            ],
            "min": 1,
            "sources": [
              "help"
            ]
          },
          {
            "id": "chip",
            "label": "Chip",
            "description": "Target chip; usually auto-detected.",
            "type": "string",
            "option": [
              "--chip",
              "-c"
            ],
            "suggestions": [
              {
                "value": "esp32",
                "label": "ESP32"
              },
              {
                "value": "esp32c3",
                "label": "ESP32-C3"
              },
              {
                "value": "esp32s3",
                "label": "ESP32-S3"
              }
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "non_interactive",
            "label": "Non-interactive",
            "type": "boolean",
            "option": [
              "--non-interactive"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "info",
            "label": "Show board info",
            "fields": [
              "port",
              "baud",
              "chip"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "port",
              "baud",
              "chip",
              "non_interactive"
            ]
          }
        ]
      },
      {
        "path": [
          "list-ports"
        ],
        "label": "List serial ports",
        "description": "List serial ports, by default only those used by development boards.",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "url": "https://github.com/esp-rs/espflash",
            "revision": "main 2026-10-27",
            "evidence": "(Rendered from the clap definitions in espflash/src/cli/mod.rs and espflash/src/bin/espflash.rs)\nCommands: board-info, flash, list-ports, monitor\n-S, --skip-update-check    Do not check for updates\n-p, --port <PORT>          Serial port connected to target device\n-B, --baud <BAUD>          Baud rate at which to communicate with target device\n-c, --chip <CHIP>          Target device\n    --non-interactive      Avoids asking the user for interactions like selecting/resetting the device\n    --no-stub              Do not use the RAM stub for loading\n-M, --monitor              Open a serial monitor after flashing\n    --no-verify            Don't verify the flash contents after flashing\n    --erase-parts <LABELS> Erase partitions by label\n    --partition-table <FILE> Input partition table\n    --force                Skip compatibility checks (chip revision, etc.). Use with caution!\n-a, --list-all-ports       List all available serial ports, instead of just those likely to be development boards.\n-n, --name-only            Only print the name of the ports and nothing else.\nespflash flash --baud=921600 --monitor /dev/ttyUSB0\nFlash an application in ELF format to a connected target device\nPrint information about a connected target device\nList available serial ports.\n"
          }
        ],
        "field": [
          {
            "id": "all",
            "label": "Include all ports",
            "type": "boolean",
            "option": [
              "--list-all-ports",
              "-a"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "name_only",
            "label": "Names only",
            "type": "boolean",
            "option": [
              "--name-only",
              "-n"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List ports",
            "fields": [
              "all",
              "name_only"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "all",
              "name_only"
            ]
          }
        ]
      }
    ]
  }
}
