name, description
name
description
duckdb-en
DuckDB CLI specialist for SQL analysis, data processing and file conversion. Use for SQL queries, CSV/Parquet/JSON analysis, database queries, or data conversion. Triggers on "duckdb", "sql", "query", "data analysis", "parquet", "convert data".
DuckDB CLI Specialist
Helps with data analysis, SQL queries and file conversion via DuckDB CLI.
Quick Start
Read data files directly with SQL
Open persistent databases
Command Line Arguments
Output formats (as flags)
Flag
Format
-csv
Comma-separated
-json
JSON array
-table
ASCII table
-markdown
Markdown table
-html
HTML table
-line
One value per line
Execution arguments
Argument
Description
-c COMMAND
Run SQL and exit
-f FILENAME
Run script from file
-init FILE
Use alternative to ~/.duckdbrc
-readonly
Open in read-only mode
-echo
Show commands before execution
-bail
Stop on first error
-header / -noheader
Show/hide column headers
-nullvalue TEXT
Text for NULL values
-separator SEP
Column separator
Data Conversion
CSV to Parquet
Parquet to CSV
JSON to Parquet
Convert with filtering
Dot Commands
Schema inspection
Command
Description
.tables [pattern]
Show tables (with LIKE pattern)
.schema [table]
Show CREATE statements
.databases
Show attached databases
Output control
Command
Description
.mode FORMAT
Change output format
.output file
Send output to file
.once file
Next output to file
.headers on/off
Show/hide column headers
.separator COL ROW
Set separators
Queries
Command
Description
.timer on/off
Show execution time
.echo on/off
Show commands before execution
.bail on/off
Stop on error
.read file.sql
Run SQL from file
Editing
Command
Description
.edit or \e
Open query in external editor
.help [pattern]
Show help
Output Formats (18 available)
Data export
csv - Comma-separated for spreadsheets
tabs - Tab-separated
json - JSON array
jsonlines - Newline-delimited JSON (streaming)
Readable formats
duckbox (default) - Pretty ASCII with unicode box-drawing
table - Simple ASCII table
markdown - For documentation
html - HTML table
latex - For academic papers
Specialized
insert TABLE - SQL INSERT statements
column - Columns with adjustable width
line - One value per line
list - Pipe-separated
trash - Discard output
Keyboard Shortcuts (macOS/Linux)
Navigation
Shortcut
Action
Home / End
Start/end of line
Ctrl+Left/Right
Jump word
Ctrl+A / Ctrl+E
Start/end of buffer
History
Shortcut
Action
Ctrl+P / Ctrl+N
Previous/next command
Ctrl+R
Search history
Alt+< / Alt+>
First/last in history
Editing
Shortcut
Action
Ctrl+W
Delete word backward
Alt+D
Delete word forward
Alt+U / Alt+L
Uppercase/lowercase word
Ctrl+K
Delete to end of line
Autocomplete
Shortcut
Action
Tab
Autocomplete / next suggestion
Shift+Tab
Previous suggestion
Esc+Esc
Undo autocomplete
Autocomplete
Context-aware autocomplete activated with Tab:
Keywords - SQL commands
Table names - Database objects
Column names - Fields and functions
File names - Path completion
Database Operations
Create table from file
Insert data
Export table
Analysis Examples
Quick statistics
Grouping
Join on files
Describe data
Pipe and stdin
Configuration
Save common settings in ~/.duckdbrc:
Syntax highlighting colors
External Editor
Open complex queries in your editor:
Editor is chosen from: DUCKDB_EDITOR → EDITOR → VISUAL → vi
Safe Mode
Secure mode that restricts file access. When enabled:
No external file access
Disables .read, .output, .import, .sh etc.
Cannot be disabled in the same session
Tips
Use LIMIT on large files for quick preview
Parquet is faster than CSV for repeated queries
read_csv_auto and read_json_auto guess column types
Arguments are processed in order (like SQLite CLI)
WSL2 may show incorrect memory_limit values on some Ubuntu versions