⌘+k ctrl+k
1.5 (current)
Search Shortcut cmd + k | ctrl + k
Friendly CLI

Along with our Friendly SQL, we provice friendly CLI features.

8-Bit Colors

Since DuckDB v1.5, the CLI supports 8-bit colors corresponding to Xterm system colors:

.display_colors
darkred1 red darkred2 red3 red4 red1 brightred indianred1 ...

Dynamic Prompt

The default prompts are the following:

-- macOS / Linux
{max_length:40}{color:38,5,208}{color:bold}{setting:current_database_and_schema}{color:reset} D 
-- Windows
{max_length:40}{color:green}{color:bold}{setting:current_database_and_schema}{color:reset} D 

Return the Result of the Last Query Using _

You can use the _ (underscore) table to query the result of the last query:

SELECT 42 AS x;
┌───────┐
│   x   │
│ int32 │
├───────┤
│    42 │
└───────┘
FROM _;
┌───────┐
│   x   │
│ int32 │
├───────┤
│    42 │
└───────┘

If the last query did not return a result (e.g., because it performed an update operation), the CLI throws an error:

Binder Error:
Failed to query last result "_": no result available
© 2026 DuckDB Foundation, Amsterdam NL
Code of Conduct Trademark Use