home / databases / duckdb

DuckDB CLI

Official · DuckDB Foundation
36k

Analytical SQL database CLI for querying, transforming, and exporting CSV, Parquet, JSON, and DuckDB data.

$curl https://install.duckdb.org | sh
Language
C++
Stars
36,495
Category
Databases
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

DuckDB CLI is the standalone shell for DuckDB's analytical SQL engine. It lets you run ad hoc or scripted SQL against DuckDB databases and file-based datasets without standing up a separate database server.

What It Enables
  • Query, join, and aggregate CSV, Parquet, JSON, and DuckDB data directly from the terminal.
  • Create local analytical databases, import data, and export results in formats like CSV, JSON, and NDJSON.
  • Run repeatable inspection, transformation, and reporting steps from one-off commands, SQL files, or shell pipelines.
Agent Fit
  • -c, -s, -f, and stdin support make it easy to drop into batch jobs, CI steps, and multi-command agent loops.
  • JSON and JSON Lines output modes give agents structured results they can parse and feed into follow-up commands.
  • The surface is powerful but SQL-centric, so agent success depends on generating correct queries and iterating on schema discovery rather than calling high-level task-specific subcommands.
Caveats
  • Many useful workflows rely on writing SQL rather than invoking purpose-built verbs, which raises the bar for reliable autonomous use.
  • The shell can read and write local files and run shell-adjacent commands unless you enable -safe or otherwise constrain the environment.