Client APIs
Dot Commands
<div class="narrow_table"></div>  
<!-- markdownlint-disable MD056 -->  
| Command | Description |
|---|------|
| `.bail on|off`           | Stop after hitting an error.  Default: `off`                                                                 |
| `.binary on|off`         | Turn binary output on or off.  Default: `off`                                                                |
| `.cd DIRECTORY`          | Change the working directory to `DIRECTORY`                                                                  |
| `.changes on|off`        | Show number of rows changed by SQL                                                                           |
| `.check GLOB`            | Fail if output since .testcase does not match                                                                |
| `.columns`               | Column-wise rendering of query results                                                                       |
| `.constant ?COLOR?`      | Sets the syntax highlighting color used for constant values                                                  |
| `.constantcode ?CODE?`   | Sets the syntax highlighting terminal code used for constant values                                          |
| `.databases`             | List names and files of attached databases                                                                   |
| `.echo on|off`           | Turn command echo on or `off`                                                                                |
| `.excel`                 | Display the output of next command in spreadsheet                                                            |
| `.exit ?CODE?`           | Exit this program with return-code `CODE`                                                                    |
| `.explain ?on|off|auto?` | Change the `EXPLAIN` formatting mode.  Default: `auto`                                                       |
| `.fullschema ?--indent?` | Show schema and the content of `sqlite_stat` tables                                                          |
| `.headers on|off`        | Turn display of headers on or `off`                                                                          |
| `.help ?-all? ?PATTERN?` | Show help text for `PATTERN`                                                                                 |
| `.highlight [on|off]`    | Toggle syntax highlighting in the shell `on`/`off`                                                           |
| `.import FILE TABLE`     | Import data from `FILE` into `TABLE`                                                                         |
| `.indexes ?TABLE?`       | Show names of indexes                                                                                        |
| `.keyword ?COLOR?`       | Sets the syntax highlighting color used for keywords                                                         |
| `.keywordcode ?CODE?`    | Sets the syntax highlighting terminal code used for keywords                                                 |
| `.lint OPTIONS`          | Report potential schema issues.                                                                              |
| `.log FILE|off`          | Turn logging on or off.  `FILE` can be `stderr`/`stdout`                                                     |
| `.maxrows COUNT`         | Sets the maximum number of rows for display. Only for [duckbox mode](#docs:api:cli:output_formats)                         |
| `.maxwidth COUNT`        | Sets the maximum width in characters. 0 defaults to terminal width. Only for [duckbox mode](#docs:api:cli:output_formats)  |
| `.mode MODE ?TABLE?`     | Set [output mode](#docs:api:cli:output_formats)                                                                            |
| `.multiline`             | Set multi-line mode (default)                                                                                |
| `.nullvalue STRING`      | Use `STRING` in place of `NULL` values                                                                       |
| `.once ?OPTIONS? ?FILE?` | Output for the next SQL command only to `FILE`                                                               |
| `.open ?OPTIONS? ?FILE?` | Close existing database and reopen `FILE`                                                                    |
| `.output ?FILE?`         | Send output to `FILE` or `stdout` if `FILE` is omitted                                                       |
| `.parameter CMD ...`     | Manage SQL parameter bindings                                                                                |
| `.print STRING...`       | Print literal `STRING`                                                                                       |
| `.prompt MAIN CONTINUE`  | Replace the standard prompts                                                                                 |
| `.quit`                  | Exit this program                                                                                            |
| `.read FILE`             | Read input from `FILE`                                                                                       |
| `.rows`                  | Row-wise rendering of query results (default)                                                                |
| `.schema ?PATTERN?`      | Show the `CREATE` statements matching `PATTERN`                                                              |
| `.separator COL ?ROW?`   | Change the column and row separators                                                                         |
| `.sha3sum ...`           | Compute a SHA3 hash of database content                                                                      |
| `.shell CMD ARGS...`     | Run `CMD ARGS...` in a system shell                                                                          |
| `.show`                  | Show the current values for various settings                                                                 |
| `.singleline`            | Set single-line mode                                                                                         |
| `.system CMD ARGS...`    | Run `CMD ARGS...` in a system shell                                                                          |
| `.tables ?TABLE?`        | List names of tables [matching LIKE pattern](#docs:sql:functions:pattern_matching) `TABLE`                   |
| `.testcase NAME`         | Begin redirecting output to `NAME`                                                                           |
| `.timer on|off`          | Turn SQL timer on or off                                                                                     |
| `.width NUM1 NUM2 ...`   | Set minimum column widths for columnar output                                                                |