{
  "id": "duckdb",
  "name": "DuckDB",
  "homepage": "https://duckdb.org/docs/stable/clients/cli/overview",
  "description": "DuckDB is an in-process SQL OLAP database management system.",
  "executables": [
    "duckdb"
  ],
  "dotfiles": {
    "paths": [
      "~/.duckdbrc"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Run DuckDB",
    "description": "Open a database file in the DuckDB shell, or run one SQL command or script and exit with a chosen output format. Server, UI and extension options are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://duckdb.org/docs/2.0/clients/cli/arguments.html",
        "revision": "2026-10-27",
        "evidence": "-c COMMAND   Run COMMAND and exit\n-f FILENAME  Run the script in FILENAME and exit. Note that the ~/.duckdbrc is read and executed first (if it exists)\n-init FILENAME  Run the script in FILENAME upon startup (instead of ~/.duckdbrc)\n-box  Set output mode to box\n-csv  Set output mode to csv\n-json  Set output mode to json\n-markdown  Set output mode to markdown\n-table  Set output mode to table\n-header  Turn headers on\n-noheader  Turn headers off\n-nullvalue TEXT  Set text string for NULL values. Default: NULL\n-readonly  Open the database read-only. This option also supports attaching to remote databases via HTTPS\n-safe  Enable safe mode\n-separator SEP  Set output column separator to SEP.\n-unsigned  Allow loading of unsigned extensions.\n"
      }
    ],
    "field": [
      {
        "id": "database",
        "label": "Database file",
        "description": "Leave empty for a transient in-memory database.",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": false
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "command",
        "label": "SQL command",
        "description": "Run this SQL and exit.",
        "type": "string",
        "option": [
          "-c"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "script",
        "label": "SQL script file",
        "description": "Run this script and exit.",
        "type": "path",
        "option": [
          "-f"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "readonly",
        "label": "Open read-only",
        "type": "boolean",
        "option": [
          "-readonly"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "csv",
        "label": "CSV output",
        "type": "boolean",
        "option": [
          "-csv"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "json",
        "label": "JSON output",
        "type": "boolean",
        "option": [
          "-json"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "markdown",
        "label": "Markdown output",
        "type": "boolean",
        "option": [
          "-markdown"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "box",
        "label": "Box output",
        "type": "boolean",
        "option": [
          "-box"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "table",
        "label": "Table output",
        "type": "boolean",
        "option": [
          "-table"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "header",
        "label": "Print headers",
        "type": "boolean",
        "option": [
          "-header"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "noheader",
        "label": "Omit headers",
        "type": "boolean",
        "option": [
          "-noheader"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "separator",
        "label": "Column separator",
        "type": "string",
        "option": [
          "-separator"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "nullvalue",
        "label": "NULL text",
        "type": "string",
        "option": [
          "-nullvalue"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "init",
        "label": "Startup script",
        "description": "Used instead of ~/.duckdbrc.",
        "type": "path",
        "option": [
          "-init"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "docs"
        ]
      },
      {
        "id": "safe",
        "label": "Safe mode",
        "type": "boolean",
        "option": [
          "-safe"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "open",
        "label": "Open a database",
        "fields": [
          "database",
          "readonly"
        ],
        "required": []
      },
      {
        "id": "query-csv",
        "label": "Run a query to CSV",
        "set": {
          "csv": [
            true
          ],
          "header": [
            true
          ]
        },
        "fields": [
          "database",
          "command",
          "csv",
          "header",
          "readonly"
        ],
        "required": [
          "command"
        ]
      },
      {
        "id": "run-script",
        "label": "Run a script",
        "fields": [
          "database",
          "script",
          "json",
          "csv",
          "readonly"
        ],
        "required": [
          "script"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "database",
          "command",
          "script",
          "readonly",
          "csv",
          "json",
          "markdown",
          "box",
          "table"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "header",
          "noheader",
          "separator",
          "nullvalue",
          "init",
          "safe"
        ]
      }
    ]
  }
}
