id = "whodb-cli"
name = "WhoDB CLI"
homepage = "https://github.com/clidey/whodb"
description = "Database management CLI with TUI interface, MCP server support, AI, and more"
executables = ["whodb", "whodb-cli"]
[dotfiles]
paths = [
"[appData]/whodb/config.json",
"[xdgData]/whodb/config.json",
"%APPDATA%/whodb/config.json",
]
secret = []
[[dotfiles.secret_paths]]
file = ["[appData]/whodb/config.json", "[xdgData]/whodb/config.json", "%APPDATA%/whodb/config.json"]
format = "json"
match = { key_path = ["cli.connections.*.password"] }
[commands]
format = 1
label = "WhoDB CLI"
description = "Run a SQL query or export table data with whodb. Connection management, TUI and MCP modes are not covered."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.subcommand]]
path = ["query"]
label = "Run a SQL query"
description = "Execute one SQL statement against a saved connection."
[[commands.subcommand.source]]
id = "readme"
kind = "help"
url = "https://github.com/clidey/whodb/blob/main/cli/README.md"
revision = "2026-10-27"
evidence = """
whodb query "SQL" [flags]
- `--connection, -c`: Connection name to use (optional; if omitted, the first available connection is used)
- `--format, -f`: Output format: `auto`, `table`, `plain`, `json`, `ndjson`, `csv`
- `--stream`: Stream result rows incrementally (supported for `plain`, `json`, `ndjson`, and `csv`)
- `--quiet, -q`: Suppress informational messages
"""
[[commands.subcommand.field]]
id = "sql"
label = "SQL"
type = "string"
position = 0
sources = ["readme"]
[[commands.subcommand.field]]
id = "connection"
label = "Connection name"
type = "string"
option = ["--connection", "-c"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "format"
label = "Output format"
type = "enum"
option = ["--format", "-f"]
choices = [
{ value = "auto", label = "Auto" },
{ value = "table", label = "Table" },
{ value = "plain", label = "Plain" },
{ value = "json", label = "JSON" },
{ value = "ndjson", label = "NDJSON" },
{ value = "csv", label = "CSV" },
]
sources = ["readme"]
[[commands.subcommand.field]]
id = "stream"
label = "Stream rows"
type = "boolean"
option = ["--stream"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "quiet"
label = "Quiet"
type = "boolean"
option = ["--quiet", "-q"]
sources = ["readme"]
[[commands.subcommand.task]]
id = "query"
label = "Run query"
fields = ["sql", "connection", "format"]
required = ["sql"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["sql", "connection", "format"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["stream", "quiet"]
[[commands.subcommand]]
path = ["export"]
label = "Export data"
description = "Export a table or query result to a CSV or Excel file."
[[commands.subcommand.source]]
id = "readme"
kind = "help"
url = "https://github.com/clidey/whodb/blob/main/cli/README.md"
revision = "2026-10-27"
evidence = """
whodb export --connection my-postgres --table users --format csv --output users.csv
- `--connection, -c`: Connection name (optional; if omitted, the first available connection is used)
- `--table, -t`: Table name (required unless using `--query`)
- `--query, -Q`: SQL query to export results from (use instead of `--table`)
- `--schema, -s`: Schema name
- `--format, -f`: Export format: `csv` or `excel` (auto-detected from filename if omitted)
- `--output, -o`: Output file path (required)
- `--delimiter, -d`: CSV delimiter (default: comma)
- `--stream`: Stream CSV exports incrementally to the output file
- `--quiet, -q`: Suppress informational messages
"""
[[commands.subcommand.field]]
id = "connection"
label = "Connection name"
type = "string"
option = ["--connection", "-c"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "table"
label = "Table"
type = "string"
option = ["--table", "-t"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "query"
label = "SQL query (instead of table)"
type = "string"
option = ["--query", "-Q"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "schema"
label = "Schema"
type = "string"
option = ["--schema", "-s"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "format"
label = "Export format"
type = "enum"
option = ["--format", "-f"]
choices = [
{ value = "csv", label = "CSV" },
{ value = "excel", label = "Excel" },
]
sources = ["readme"]
[[commands.subcommand.field]]
id = "output"
label = "Output file"
type = "path"
path = { kind = "file", role = "output" }
option = ["--output", "-o"]
effect = "overwrite"
sources = ["readme"]
[[commands.subcommand.field]]
id = "delimiter"
label = "CSV delimiter"
type = "string"
option = ["--delimiter", "-d"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "stream"
label = "Stream CSV"
type = "boolean"
option = ["--stream"]
sources = ["readme"]
[[commands.subcommand.task]]
id = "export_table"
label = "Export a table"
fields = ["connection", "table", "schema", "format", "output"]
required = ["table", "output"]
[[commands.subcommand.task]]
id = "export_query"
label = "Export query results"
fields = ["connection", "query", "format", "output"]
required = ["query", "output"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["connection", "table", "query", "schema", "format", "output"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["delimiter", "stream"]