# AGENTS.md instructions for DuckDB CLI for local data analysis

Use DuckDB CLI for local data analysis only for: Run SQL over CSV, Parquet, JSON, and local datasets from the terminal.

## Default behavior

- Prefer non-interactive commands and stable output formats: json, csv, parquet, markdown.
- Start with read-only inspection commands before changing state.
- Show the exact command before destructive or deployment actions.
- Require explicit user approval for commands marked `requires-review` or `destructive`.

## Useful commands

- safe: `duckdb -c "SELECT * FROM 'data.csv' LIMIT 5"` — Reads local tabular data quickly.
- safe: `duckdb -json -c "SELECT count(*) AS rows FROM 'data.csv'"` — Returns parseable JSON output.
- destructive: `duckdb data.db -c "DELETE FROM events WHERE ..."` — Mutates data and requires approval.

## Safety notes

- 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.