{
  "id": "tio",
  "name": "tio",
  "homepage": "https://github.com/tio/tio",
  "description": "A serial device I/O tool.",
  "executables": [
    "tio"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/tio/config",
      "~/.tioconfig"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Connect to a serial device",
    "description": "Open a serial TTY with the usual line settings. Mappings, scripting, sockets and key bindings are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://github.com/tio/tio/blob/master/man/tio.1.in",
        "revision": "master 2026-10",
        "evidence": "tio [<options>] <tty-device|profile|tid>\n-b, --baudrate <bps>    Set baud rate [bps] (default: 115200).\n-d, --databits 5 | 6 | 7 | 8    Set data bits (default: 8).\n-f, --flow hard | soft | none    Set flow control (default: none).\n-s, --stopbits 1 | 2    Set stop bits (default: 1).\n-p, --parity odd | even | none | mark | space    Set parity (default: none).\n-o, --output-delay <ms>\n-e, --local-echo    Enable local echo.\n-t, --timestamp    Enable line timestamp.\n-l, --list    List available targets (serial devices, TIDs, configuration profiles).\n-L, --log    Enable log to file.\n--log-file <filename>    Set log filename.\n-n, --no-reconnect\n"
      }
    ],
    "field": [
      {
        "id": "target",
        "label": "Device, profile or TID",
        "description": "For example /dev/ttyUSB0 or /dev/cu.usbserial-0001.",
        "type": "string",
        "position": 0,
        "sources": [
          "man"
        ]
      },
      {
        "id": "baudrate",
        "label": "Baud rate",
        "type": "integer",
        "option": [
          "--baudrate",
          "-b"
        ],
        "observed_default": "115200",
        "sources": [
          "man"
        ]
      },
      {
        "id": "databits",
        "label": "Data bits",
        "type": "enum",
        "option": [
          "--databits",
          "-d"
        ],
        "choices": [
          {
            "value": "5",
            "label": "5"
          },
          {
            "value": "6",
            "label": "6"
          },
          {
            "value": "7",
            "label": "7"
          },
          {
            "value": "8",
            "label": "8"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "flow",
        "label": "Flow control",
        "type": "enum",
        "option": [
          "--flow",
          "-f"
        ],
        "choices": [
          {
            "value": "hard",
            "label": "Hardware"
          },
          {
            "value": "soft",
            "label": "Software"
          },
          {
            "value": "none",
            "label": "None"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "stopbits",
        "label": "Stop bits",
        "type": "enum",
        "option": [
          "--stopbits",
          "-s"
        ],
        "choices": [
          {
            "value": "1",
            "label": "1"
          },
          {
            "value": "2",
            "label": "2"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "parity",
        "label": "Parity",
        "type": "enum",
        "option": [
          "--parity",
          "-p"
        ],
        "choices": [
          {
            "value": "odd",
            "label": "Odd"
          },
          {
            "value": "even",
            "label": "Even"
          },
          {
            "value": "none",
            "label": "None"
          },
          {
            "value": "mark",
            "label": "Mark"
          },
          {
            "value": "space",
            "label": "Space"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "local_echo",
        "label": "Local echo",
        "type": "boolean",
        "option": [
          "--local-echo",
          "-e"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "timestamp",
        "label": "Line timestamps",
        "type": "boolean",
        "option": [
          "--timestamp",
          "-t"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "log",
        "label": "Log to file",
        "type": "boolean",
        "option": [
          "--log",
          "-L"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "log_file",
        "label": "Log file name",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "output"
        },
        "option": [
          "--log-file"
        ],
        "effect": "overwrite",
        "sources": [
          "man"
        ]
      },
      {
        "id": "no_reconnect",
        "label": "Do not reconnect",
        "type": "boolean",
        "option": [
          "--no-reconnect",
          "-n"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "list",
        "label": "List available targets",
        "type": "boolean",
        "option": [
          "--list",
          "-l"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "connect",
        "label": "Connect",
        "fields": [
          "target",
          "baudrate",
          "databits",
          "parity",
          "stopbits",
          "flow"
        ],
        "required": [
          "target"
        ]
      },
      {
        "id": "list",
        "label": "List targets",
        "fields": [
          "list"
        ],
        "required": [
          "list"
        ],
        "set": {
          "list": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "target",
          "baudrate",
          "databits",
          "parity",
          "stopbits",
          "flow",
          "list"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "local_echo",
          "timestamp",
          "log",
          "log_file",
          "no_reconnect"
        ]
      }
    ]
  }
}
