Transform CSV files using familiar spreadsheet formulas from the command line.
Tabula is a command-line tool that brings the power of spreadsheet calculations to CSV file processing.
Your data should be yours - not locked in proprietary formats or cloud services:
- 📁 Store anywhere - Local files, git repos, network drives, your choice
- 🔐 Share when you want - No forced cloud sync or account requirements
- 📝 Plain text - CSV files are readable, editable, and future-proof
- 🔍 Use any tool - Works with grep, sed, awk, and all text utilities
- 📊 Universal format - Open in Excel, Google Sheets, databases, or any CSV-compatible tool
Why install a multi-gigabyte office suite when you only need basic calculations?
- 🪶 Tiny footprint - Single < 5MB binary, no installers, no dependencies
- 🚀 Fast - Processes large files efficiently from the command line
- 🌍 Cross-platform - macOS, Linux, Windows - works everywhere
- 💻 Scriptable - Integrates with shell scripts, CI/CD, and automation tools
Both your data AND transformations are text files:
- ✅ Git-friendly - Track changes to CSV data and
.tblscripts - ✅ Diff & merge - See exactly what changed in your data
- ✅ Collaborate - Share scripts and data through version control
- ✅ Reproducible - Exact same results every time you run a script
- ✅ Documented - Scripts serve as documentation for your transformations
- 📊 Spreadsheet syntax - Cell references (A1, B2), functions SUM, IF, etc
- 🔢 Rich function library - 50+ built-in functions for numbers, text, dates, logic
- 🎯 Purpose-built - Designed specifically for CSV transformation, not generic programming
Download the binary for your system:
https://pblazh.github.io/tabula/
Or build from source
Input CSV (sales.csv):
Product , Price , Quantity
Apple , 1.20 , 10
Cherry , 2.50 , 8
Banana , 0.80 , 15Or user markdown as an input and output
| Product | Price | Quantity |
| ------- | ----- | -------- |
| Apple | 1.20 | 10 |
| Cherry | 2.50 | 8 |
| Banana | 0.80 | 15 |Script (script.tbl):
// Add header for total column
let D1 = "Total";
// Calculate total for each row
let D2:D4 = REF(REL(-2,0)) * REF(REL(-1,0));
// Add a grand total row
let A5 = "TOTAL";
let D5 = SUM(D2:D4);
Run:
tabula -a -s script.tbl -i sales.csvOutput:
Product , Price , Quantity , Total
Apple , 1.20 , 10 , 12
Cherry , 2.50 , 8 , 20
Banana , 0.80 , 15 , 12
TOTAL , , , 44# Use grep to find rows
grep "Alice" data.csv | tabula -s transform.tbl
# Pipe through standard Unix tools
# calculate sales and output sorted by total
head -n1 sales.csv ; tabula -s script.tbl -i sales.csv | tail -n +2 | sort -t, -k3 -nr
# Combine with git
git diff data.csv # See exactly what changed
git log transform.tbl # Track transformation history
# etcYour CSV output works everywhere:
- 📊 Import into Excel, Google Sheets, Numbers, etc
- 🗄️ Load into databases (PostgreSQL, MySQL, SQLite, etc)
- 📈 Visualize with Tableau, Power BI, R, Python, etc
- 🌐 Publish to GitHub, static sites, or data portals
- 📧 Email as attachments without format issues
- ✅ Data is yours - readable in any text editor
- ✅ Scripts are portable - run anywhere
- ✅ No subscriptions, no accounts, no cloud requirements
- ✅ Works offline - no internet needed
- ✅ Free & open source - use without restrictions
For complete documentation, see doc/README.md
- Vim/Neovim - Auto-execution on save of markdown and csv files. Markdown code-block support for CSV and Tabula scripts. Syntax highlighting for
*.tblfiles. - Visual Studio Code - Auto-execution on save of markdown and csv files. Markdown code-block support for CSV and Tabula scripts. Syntax highlighting for
*.tblfiles. - Obsidian - Auto-execution on save of markdown files. Code-block support for CSV and Tabula scripts.
- Web Storm - Auto-execution on save of markdown and csv files. Code-block support for CSV and Tabula scripts. Syntax highlighting for
*.tblfiles.
GNU General Public License v3.0
If you find this project useful, consider:
- ⭐ Starring the GitHub repository
- 🐛 Reporting issues or suggesting features
- 📖 Contributing to the documentation
