CLI Finder / tools / duckdb-cli

用于本地数据分析的 DuckDB CLI

在终端用 SQL 查询 CSV、Parquet、JSON 和本地数据集。

Agent 适配度: 87/100 已验证发布者 持续维护
87 /100

Strong for local analytical tasks when agents are constrained to read-only queries.

Structured output 92/100

Whether the CLI can return JSON, YAML, or stable machine-readable output.

Non-interactive use 88/100

Whether common workflows can run predictably without an interactive prompt.

Safety boundaries 68/100

Whether read-only, dry-run, scoped auth, and destructive command boundaries are clear.

安装方式

Homebrew $ brew install duckdb
pip $ pip install duckdb

常用命令

Query CSV · 安全 $ duckdb -c "SELECT * FROM 'data.csv' LIMIT 5"

Reads local tabular data quickly.

Export JSON · 安全 $ duckdb -json -c "SELECT count(*) AS rows FROM 'data.csv'"

Returns parseable JSON output.

Delete rows · 高风险 $ duckdb data.db -c "DELETE FROM events WHERE ..."

Mutates data and requires approval.

Agent 使用示例

Gemini CLI Use DuckDB for read-only analysis of CSV, Parquet, and local databases. Prefer SELECT queries and JSON output.

安全说明

  • Local analytical reads are generally safe.
  • COPY, INSERT, UPDATE, DELETE, and external database access should be reviewed.
  • Agents should run SELECT-only queries by default when exploring data.

Agent 可以用它做什么

DuckDB CLI 可以让 Agent 用 SQL 检查本地数据文件,并输出结构化摘要。

适合场景

适合 CSV 分析、Parquet 检查、本地分析和可重复的数据校验。