Show HN: CLI tool that packages data-heavy projects into LLM context windows A new open-source CLI tool called data2prompt packages data-heavy projects into LLM context windows by profiling tables and sampling rows instead of dumping raw files. Developer Arian Mokhtariha released data2prompt on GitHub, claiming it reduces a 22 MB generic packer output to 241 KB while preserving schema, statistics, and representative samples. The tool supports CSV, Parquet, Excel, SQLite, SQL, Jupyter notebooks, and .env files, and can fit output to a specified token budget. Turn data-heavy projects into LLM context that actually fits — and actually informs. One command turns a project full of CSVs, notebooks, Excel workbooks and SQLite databases into a single, structured, LLM-ready document — sampled, profiled, redacted, and fitted to your context window. Generic repo-to-prompt tools break down on data projects — and not by a margin you can optimize away. Point them at a directory with a few real datasets and the output is tens of megabytes: no amount of trimming fits that into any context window that exists. To a generic packer, a CSV is just a large text file, so the only choices it offers are dump it raw or skip it entirely — and both lose. data2prompt treats data files as data. Every table is profiled — schema, dtypes, per-column statistics, and missing-value counts computed on the complete dataset — then represented by a seeded random sample of real rows. The model doesn't get a shrunken view of your data; it gets a statistical understanding of it that raw rows alone could never provide, plus enough real rows to see formats, ranges, and quirks. Every intervention is disclosed in a uniform notice grammar, so the LLM knows exactly what it is looking at and what was left out. The same data-heavy project, packed by three tools with default settings: Read that chart as feasibility, not savings. A 22 MB dump is millions of tokens — several times larger than the largest context window on the market, at any price. On a real data project, a generic packer doesn't produce an expensive prompt; it produces an impossible one. The 241 KB document is the only output of the three that a model can actually be handed. And the reduction is representation , not truncation. Every table still contributes its full schema, per-column statistics computed on the complete dataset, and a seeded random sample of real rows. The model often ends up knowing more about your data than it would from pages of raw rows: distributions, missingness, and dtypes are stated outright instead of left to be inferred from whichever rows happened to fit. The model loses row noise, not information. Recommended: install as a global CLI tool pipx install data2prompt Or into an active virtual environment pip install data2prompt Run it from your project root: data2prompt → PROMPT.md markdown, default settings data2prompt -b 100k -c fit the output into 100k tokens, copy to clipboard data2prompt -f xml --schema-only XML format, schemas only, zero data rows Parquet / Feather / Arrow support optional extra Columnar formats need pyarrow https://arrow.apache.org/docs/python/ , which is not bundled by default: pipx install "data2prompt parquet " fresh install pipx inject data2prompt pyarrow already installed via pipx pip install "data2prompt parquet " pip equivalent Without pyarrow these files still appear in the output with an inline note explaining why they were skipped. Install from source git clone https://github.com/arianmokhtariha/data2prompt.git cd data2prompt pip install -e . Every file type gets a strategy, not a dump: | File type | Strategy | What the LLM sees | |---|---|---| .csv | Seeded random sampling | Column schema, full-dataset stats, N sampled rows | .parquet .feather .arrow | Same, via pyarrow | Schema + stats + sample — identical treatment to CSV | .xlsx .xls .xlsm | Per-sheet extraction | Each sheet as its own schema + stats + sample section | .db .sqlite .sqlite3 | Read-only stdlib sqlite3 | Per-table CREATE TABLE DDL keys, FKs, indexes + stats + sampled rows | .sql | Statement-aware parsing | Schema statements kept intact, INSERT floods capped | .ipynb | Cell-level cleaning | Code, markdown and text outputs — base64 images and HTML dumps stripped | .env | Name-only redaction | KEY=