{
  "id": "tmate",
  "name": "tmate",
  "homepage": "https://tmate.io/",
  "description": "Instant terminal sharing.",
  "executables": [
    "tmate"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [],
    "exclude": [],
    "secret": [
      "~/.tmate.conf"
    ]
  },
  "commands": {
    "format": 1,
    "label": "tmate",
    "description": "Create a new tmate (tmux fork) session. Only new-session is modelled; control mode, sockets and other commands are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": true
    },
    "subcommand": [
      {
        "path": [
          "new-session"
        ],
        "label": "New session",
        "description": "Create a new session, optionally detached and with a name, directory and initial command.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/unstable/tmate/tmate.1.en.html",
            "revision": "2026-10-27",
            "evidence": "new-session [-AdDEP] [-c start-directory] [-F format] [-n window-name] [-s session-name] [-t target-session] [-x width] [-y height] [shell-command]\n(alias: new) Create a new session with name session-name.\nThe new session is attached to the current terminal unless -d is given. window-name and shell-command are the name of and shell command to execute in the initial window. If -d is used, -x and -y specify the size of the initial window (80 by 24 if not given).\nThe -A flag makes new-session behave like attach-session if session-name already exists\n"
          }
        ],
        "field": [
          {
            "id": "session_name",
            "label": "Session name",
            "type": "string",
            "option": [
              "-s"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "window_name",
            "label": "Window name",
            "type": "string",
            "option": [
              "-n"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "start_directory",
            "label": "Start directory",
            "type": "path",
            "option": [
              "-c"
            ],
            "path": {
              "kind": "directory",
              "role": "input"
            },
            "sources": [
              "man"
            ]
          },
          {
            "id": "detached",
            "label": "Detached",
            "description": "Do not attach to the current terminal.",
            "type": "boolean",
            "option": [
              "-d"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "attach_existing",
            "label": "Attach if session exists",
            "type": "boolean",
            "option": [
              "-A"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "width",
            "label": "Width (detached)",
            "type": "integer",
            "option": [
              "-x"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "height",
            "label": "Height (detached)",
            "type": "integer",
            "option": [
              "-y"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "shell_command",
            "label": "Shell command",
            "description": "Command to run in the initial window.",
            "type": "string",
            "position": 0,
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "named",
            "label": "Named session",
            "fields": [
              "session_name",
              "start_directory"
            ],
            "required": [
              "session_name"
            ]
          },
          {
            "id": "detached_cmd",
            "label": "Detached, run a command",
            "fields": [
              "session_name",
              "shell_command"
            ],
            "required": [
              "shell_command"
            ],
            "set": {
              "detached": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "session_name",
              "start_directory",
              "shell_command",
              "detached",
              "attach_existing"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "window_name",
              "width",
              "height"
            ]
          }
        ]
      }
    ]
  }
}
