id = "sqlite3"
name = "SQLite"
homepage = "https://sqlite.org/cli.html"
description = "A simple command-line program that lets the user manually enter and execute SQL statements against an SQLite database."
icon = "SimpleIcons:sqlite"
executables = ["sqlite3"]
[dotfiles]
paths = ["~/.sqliterc", "[configHome]/sqlite3/sqliterc"]
exclude = ["~/.sqlite_history"]
secret = []
side_effect = false
[commands]
format = 1
label = "SQLite shell"
description = "Open a database in the sqlite3 shell with a chosen output mode and options. Memory tuning, VFS and tracing flags are left out."
quality = "ai-draft"
base = "fig:sqlite3"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/sqlite3.ts"
license = "MIT"
[[commands.field]]
id = "database"
label = "Database file"
type = "path"
position = 0
description = "Database file to open; blank opens a transient in-memory database."
path = { kind = "file", role = "input" }
sources = ["fig"]
[[commands.field]]
id = "readonly"
label = "Read-only"
type = "boolean"
option = ["-readonly"]
description = "Open the database read-only."
sources = ["fig"]
[[commands.field]]
id = "csv"
label = "CSV output"
type = "boolean"
option = ["-csv"]
description = "Set output mode to 'csv'."
sources = ["fig"]
[[commands.field]]
id = "column"
label = "Column output"
type = "boolean"
option = ["-column"]
description = "Set output mode to 'column'."
sources = ["fig"]
[[commands.field]]
id = "html"
label = "HTML output"
type = "boolean"
option = ["-html"]
description = "Set output mode to HTML."
sources = ["fig"]
[[commands.field]]
id = "line"
label = "Line output"
type = "boolean"
option = ["-line"]
description = "Set output mode to 'line'."
sources = ["fig"]
[[commands.field]]
id = "header"
label = "Headers on"
type = "boolean"
option = ["-header"]
description = "Turn headers on."
sources = ["fig"]
[[commands.field]]
id = "noheader"
label = "Headers off"
type = "boolean"
option = ["-noheader"]
description = "Turn headers off."
sources = ["fig"]
[[commands.field]]
id = "cmd"
label = "Commands before stdin"
type = "string"
option = ["-cmd"]
description = "Run each command before reading stdin."
multiple = true
sources = ["fig"]
[[commands.field]]
id = "init"
label = "Init file"
type = "path"
option = ["-init"]
description = "Read and process the named file."
path = { kind = "file", role = "input" }
sources = ["fig"]
[[commands.field]]
id = "separator"
label = "Column separator"
type = "string"
option = ["-separator"]
description = "Set output column separator."
sources = ["fig"]
[[commands.field]]
id = "nullvalue"
label = "NULL text"
type = "string"
option = ["-nullvalue"]
description = "Set text string for NULL values."
sources = ["fig"]
[[commands.field]]
id = "bail"
label = "Stop on error"
type = "boolean"
option = ["-bail"]
description = "Stop after hitting an error."
sources = ["fig"]
[[commands.field]]
id = "echo"
label = "Echo commands"
type = "boolean"
option = ["-echo"]
description = "Print commands before execution."
sources = ["fig"]
[[commands.task]]
id = "open"
label = "Open a database"
fields = ["database", "readonly", "header"]
required = ["database"]
[[commands.task]]
id = "csv"
label = "CSV with headers"
set = { csv = [true], header = [true], readonly = [true] }
fields = ["database", "readonly"]
required = ["database"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["database", "readonly", "csv", "column", "html", "line", "header", "noheader"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["cmd", "init", "separator", "nullvalue", "bail", "echo"]