{
  "id": "freetds",
  "name": "FreeTDS",
  "homepage": "https://www.freetds.org",
  "description": "FreeTDS is a free implementation of Sybase's DB-Library, CT-Library, and ODBC libraries.",
  "executables": [
    "tsql",
    "freebcp"
  ],
  "dotfiles": {
    "paths": [
      "~/.freetds.conf",
      "[configHome]/freetds.conf",
      "%APPDATA%/.freetds.conf",
      "~/.interfaces",
      "%APPDATA%/.interfaces"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Connect with tsql",
    "description": "Open an interactive tsql session to a SQL Server or Sybase server, by configured server name or by host and port. The password is not asked for here; tsql prompts for it.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "manual",
        "kind": "manual",
        "url": "https://man.archlinux.org/man/tsql.1",
        "revision": "tsql(1), FreeTDS 1.5.20",
        "evidence": "-S servername  database server to which to connect.\n-D dbname  database to use.\n-I interface  freetds.conf or interfaces file describing servername.\n-H hostname  DNS hostname of the server.\n-p port  port at which SQL Server is listening.\n-U username  database login name. If username is not provided, a domain login is attempted for TDS 7+ connections.\n-L  list Microsoft server instances (with -H).\n-C  print some of the compile-time configuration parameters.\n"
      }
    ],
    "field": [
      {
        "id": "server",
        "label": "Server name",
        "description": "A server defined in freetds.conf. Use this or Host.",
        "type": "string",
        "option": [
          "-S"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "host",
        "label": "Host name",
        "description": "Connect directly by DNS name, bypassing freetds.conf. Use this or Server.",
        "type": "string",
        "option": [
          "-H"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "port",
        "label": "Port",
        "type": "integer",
        "option": [
          "-p"
        ],
        "min": 1,
        "max": 65535,
        "sources": [
          "manual"
        ]
      },
      {
        "id": "user",
        "label": "User name",
        "type": "string",
        "option": [
          "-U"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "database",
        "label": "Database",
        "type": "string",
        "option": [
          "-D"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "interface",
        "label": "Interfaces / freetds.conf file",
        "type": "path",
        "option": [
          "-I"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "manual"
        ]
      },
      {
        "id": "list_instances",
        "label": "List server instances",
        "description": "Used with Host.",
        "type": "boolean",
        "option": [
          "-L"
        ],
        "sources": [
          "manual"
        ]
      }
    ],
    "task": [
      {
        "id": "by_server",
        "label": "Connect to a configured server",
        "fields": [
          "server",
          "user",
          "database"
        ],
        "required": [
          "server"
        ]
      },
      {
        "id": "by_host",
        "label": "Connect by host and port",
        "fields": [
          "host",
          "port",
          "user",
          "database"
        ],
        "required": [
          "host",
          "port"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "server",
          "host",
          "port",
          "user",
          "database"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "interface",
          "list_instances"
        ]
      }
    ]
  }
}
