Repository navigation
Releases
v0.10.1 - kenze on DuckDB 2.0 LTS
kenze now runs on DuckDB 2.0 LTS.
DuckDB 2.0 came out on 2026-10-21, and a fresh pip install kenze on Python 3.11 or newer picks it up by itself. Two things broke under it, and both are fixed here:
kenze.to_arrow()andkenze.to_polars()crashed with anAttributeError, because DuckDB 2.0 removedfetch_arrow_table()andpl()from the result ofexecute(). All three dataframe bridges now go through a relation, which has the same exports on every DuckDB from 1.2 to 2.x, and each bridge is tested on both lines.- Piped output could fill up with progress-bar characters. Outside a terminal, DuckDB draws its progress bar on stdout for any query that runs past two seconds, and 2.0 redraws it many times. With
-o -that put bar characters in the middle of your data. The bar is now switched off explicitly, so-o -carries the data and nothing else.
To update: pip install -U kenze
Also fixed
- Ghost text can no longer step on the step you just ran. Value suggestions are read on a background thread, and on DuckDB 2.0 a second query replaces an open result, so a scan still running when you pressed Enter could hand the step's preview the wrong rows. The background reads now have a cursor of their own.
- Leaving the shell, or a
setthat reconnects, stops a value lookup still running in the background instead of waiting for a full pass over the column. - A
set memory/set threads/set tempthat DuckDB refuses now leaves the session working. - The test suite no longer writes its runs into the
~/.kenze/history.jsonlof whoever runs it.
Changed
duckdb>=1.2,<3: the 1.x and 2.x lines are both supported and tested.- CI covers Python 3.9 / 3.11 / 3.13 / 3.14 on Linux and Windows, plus DuckDB held below 2, and now also runs once a week, so the next breaking release upstream shows up within days.
- Python 3.14 added to the supported versions.
- The licence is declared as an SPDX expression (
license = "MIT", PEP 639). The package is unchanged: still MIT.
Full notes: CHANGELOG.md
v0.10.0 - autocomplete that knows your data
Autocomplete that knows your data, not just your columns.
Ghost text
From the first keystroke, the rest of what you are typing appears in dim text ahead of the cursor. Right-arrow (or Ctrl-E) takes it; keep typing to ignore it.
kenze > f -> f[ilter]
kenze > filter ci -> filter ci[ty]
kenze > load data/sal -> load data/sal[es_2026.csv]
kenze > set str -> set str[ict-csv]
kenze > filter city = 'L -> filter city = 'L[ondon]
Commands, column names, settings, cast types, file paths — and the real values in your data. It keeps up as you backspace, and it fires before you type the quotes too (filter city = Lon), because the shell already repairs that shape into valid SQL on Enter.
Value autocomplete
Values are the part kenze has to read your file to know, so it offers them two ways. Ghost text answers "what am I typing?"; TAB answers "what are my options?", with the exact row count beside each value:
kenze > filter city = '<TAB> -> London 600 rows
Paris 300 rows
Tokyo 100 rows
This is the point at which "no SQL required" stops being a claim about syntax and becomes a claim about knowledge: you no longer have to know what is in the file to filter on it.
Four constraints shape it, because a feature like this is only as good as its worst moment:
- The column is read once, on a background thread, and a longer prefix is answered from memory. Reading a column is a real query; running one per keystroke would lock the prompt on a large file.
- The values follow your pipeline, not the file. After
filter country = 'FR', the values offered forcityare the ones that survive that step — anything else would be a confident lie about data you have already changed. - A high-cardinality column asks for a letter rather than refusing. An id column with four million values is useless as a list and perfectly useful as "the ones starting with
u", which is how you would look for it anyway. - Ghost text never finishes a number. A half-typed word is obviously unfinished, so completing
LtoLondoncan only help.id = 1is already complete and valid, and quietly extending it to10would change what you asked for while looking like it merely finished it. TAB still lists numeric values, because there you can see what you are choosing.
The counts shown are exact. The only estimate involved is the distinct-count used to decide how to respond, and it is never presented as a fact.
validate --scaffold
Write the schema JSON for a file you already trust, instead of hand-writing it:
kenze validate sales.csv --scaffold schema.json
Every column is recorded with its real type, and every column with no nulls today is listed under not_null — a measured fact about this file, offered as a starting point to edit rather than a claim about what the data means. You could not use validate at all without a schema, and writing JSON by hand is exactly the friction kenze exists to remove.
Fixed
- Ghost text survives a backspace. prompt_toolkit only asks the suggester after text is inserted, so deleting a character left the line bare until you typed a new one — which is precisely when you want the suggestion back.
- The right-arrow accepts a suggestion through a closing quote. prompt_toolkit only accepts one when the cursor is at the very end of the line, but the auto-closing quotes added in 0.9.5 always leave a
'after it, so the two features silently cancelled each other out. - The pipeline's SQL is no longer rebuilt on every keystroke. Building it runs a
DESCRIBE, which on a large remote CSV means re-sniffing the file over the network. validateexplains the schema argument instead of leakingExpecting value: line 1 column 1 (char 0)when handed a data file, and the shell accepts the--schemaspelling too.
Full notes in CHANGELOG.md · the shell guide is SHELL.md.
v0.9.6 - open a CSV that breaks the standard
Found by using kenze for real work: a plain Spark-written CSV could not be opened by any documented route.
Added
--no-strict-csv- read a CSV that breaks the CSV standard: mixedandline endings, or a stray quote in an unquoted field. Files written by Spark (part-00000-<uuid>-c000.csv) do this routinely, and until now kenze could not open them at all - the parser fails in its state machine before there is any row to skip, so neither--skip-bad-linesnor--errorscould rescue the file. Both failed byte-identically to the plain call.- It is a separate flag on purpose.
--skip-bad-linesdrops a row it cannot parse and--errorshands it back to you; relaxing the standard instead accepts a non-conforming row and silently discards any fields past the header. Folding that into the existing flags would have made a broken file look clean. - Shell:
set strict-csv off. Python:strict=False.
- It is a separate flag on purpose.
Fixed
- The global CSV flags now reach the read-only commands.
profile,peek,stats,plot,countandvalidatenever accepted--skip-bad-linesor--errors- the flags parsed and were then dropped before the command ran. These are the commands you reach for first on a file that will not open. kenze checkno longer dies on the file it is diagnosing, and now names which kind of damage it found.- CSV errors now name a flag you can actually type. DuckDB reports the fix in its own terms (
strict_mode=false), which no kenze user can pass.
Full notes in CHANGELOG.md.
v0.9.5 - quotes close themselves in the shell
Typing ' in the interactive shell now inserts the pair and leaves the cursor between them, so a text filter can be typed straight through:
kenze > filter city = ' <- you type one quote
kenze > filter city = '|' <- you get the pair, cursor in the middle
Requested by a user who kept having to add the closing quote by hand.
- Typing the closing quote steps over the one already there, so
filter city = 'London'never becomesfilter city = 'London''. - Backspacing the opening quote of an auto-added pair removes both.
"behaves the same way, which is how paths with spaces get typed:load "Feb 10.csv".- An apostrophe inside a word (
don't) is left alone, as is a quote typed in front of existing text.
pip install --upgrade kenze
v0.9.4 - fix --n on Python 3.9 / 3.11
Fixed
--n no longer fails with ambiguous option on Python 3.9 and 3.11.
argparse treats an unrecognised long option as an abbreviation, so --n matched both --no-disk-check and --no-history and the parse failed before the subcommand ever saw the flag. Python 3.13 tolerated it, which is why it wasn't caught locally.
This affected peek --n, sample --n and head --n in every previous release - not only the filter --n / dedup --n added in 0.9.3. Nothing had ever exercised --n through the real CLI, so no test failed.
Fixed by disabling argparse option abbreviation (allow_abbrev=False) on the main parser and every subcommand. Long options must now be written in full, which every documented example already did. A regression test now runs all five --n commands as real subprocesses.
If you are on Python 3.9 or 3.11, upgrade past 0.9.3.
v0.9.3 - peek before you write
Added
--n on filter and dedup - cap the result so you can check an operation before writing the whole thing.
kenze filter sales.parquet --where "amount > 100" --n 20 -o -
kenze dedup users.csv --on id --n 20 -o -
The condition is still evaluated against the entire file - --n only limits how many of the matching rows come back, so a limit can never return a row that does not match. --n matches the flag already used by sample and head.
Requested by a user who wanted to confirm a filter was correct without dropping into a full kenze sql query with a LIMIT clause. Thanks for the suggestion.
Tip: running
kenzewith no arguments opens the interactive shell, which previews the result after every step and lets youundo- handy for exactly this kind of check.
v0.9.2 - docs + Python API
Documentation + a fuller Python API
- A new
docs/folder: a full Python API reference (every public function - exact signatures, arguments, returns, examples), a reports guide, and an index. The README links them prominently. kenze.countis now an exported, documented part of the Python API.
v0.9.1 - count + sort
Two no-SQL verbs: count + sort
count - value-counts / group-by, no SQL:
kenze count sales.csv city --top 10- the top 10 groups by countkenze count sales.csv city --distinct user_id- unique users per citykenze count sales.csv city category- group by more than one column- in the shell too:
count city - pairs with
report:kenze count data.csv city --top 10 -o c.csvthenkenze report c.csv -o out.pdf= a counts PDF with zero SQL
sort - order rows, a real pipeline step:
kenze sort sales.csv --by revenue --desc --top 10 -o top.csv- stacks in the shell:
load ... -> sort revenue desc -> head 10 -> report out.pdf sort + head = top N
v0.9.0 - kenze report
kenze report - turn a data file into a styled PDF or HTML report
Point kenze at a data file and it lays out a clean report - KPI tiles + a ranked table, auto-fit to your columns. Great for the last mile: prep a file, then hand off something client-ready.
kenze report data.csv -o out.pdf- built-in theme to PDF (or-o out.html)--per-row --format pdf -o docs/- one document per row (batch / mail-merge)--scaffold- a starter HTML template pre-filled with YOUR column names (no placeholder guessing)--template mine.html- bring your own HTML (Jinja2);--theme report|scorecard;--set title=.. currency=..- Also in the interactive shell:
report out.pdf
Summary stats are DuckDB aggregates over the whole file (never-OOM); the detail table is a bounded top-N, so a 60M-row file still renders instantly.
PDF with no heavy install: HTML needs only pip install "kenze[report]"; PDF renders that HTML with your system Chrome/Edge (pixel-perfect), falling back to WeasyPrint if present. The lean core is untouched.
v0.8.5 - guided shell (what to type next)
- The shell bottom toolbar now shows live what-to-type-next guidance with examples, flipping to press-Enter-to-run when the line is complete. Every command has a hint.
- TAB also completes option keywords (run/convert/set) and the type/method after a colon.
- 69 tests, ruff clean.