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] # sqlite3(1), "INIT FILE": "If the file ${XDG_CONFIG_HOME}/sqlite3/sqliterc or # ~/.sqliterc exists, the first of those to be found is processed during # startup." The same two spellings are compiled into the shipped binary: # strings /usr/bin/sqlite3 | grep -E 'sqliterc|XDG_CONFIG' # %s/.sqliterc # XDG_CONFIG_HOME # %s/.config/sqlite3/sqliterc # The first of those is [configHome], so $XDG_CONFIG_HOME decides rather than # the ~/.config it falls back to. On Windows the home spelling is # %USERPROFILE%\.sqliterc, which resolves to the same ~/.sqliterc, so it is not # listed a second time. paths = ["~/.sqliterc", "[configHome]/sqlite3/sqliterc"] # $SQLITE_HISTORY, defaulting to ~/.sqlite_history (also in the strings above). # A REPL history, rewritten on every exit; not config. exclude = ["~/.sqlite_history"] # A sqliterc holds dot-commands — .mode, .headers, .prompt, .timer. Nothing # that authenticates anything. secret = [] # Read once at startup and never reopened, so rewriting it mid-session only # affects the next shell that starts. side_effect = false # No machine_lines: everything a sqliterc sets is output formatting the user # wants on every machine. A `.open` of an absolute database path would be # machine-local, but it is not something the file is written to hold. [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"]