Command Line Data Analysis
Analyze CSV, JSON, and text data entirely from your terminal โ no Excel, no pandas, no Jupyter.
Why the Terminal?
Spreadsheets are great for small, visual data. Jupyter is great for complex pipelines. But for quick analysis โ getting stats, filtering rows, transforming formats โ the command line is faster. One command, instant output, pipe it into the next tool.
This guide uses evolver-tools, a collection of 262 zero-dependency CLI tools. Everything runs on pure Python โ no npm install, no apt-get, no compiling.
Part 1: CSV Data Analysis
CSV is the lingua franca of data. Logs, exports, reports โ they all come as CSV. Here's how to analyze them without opening Excel or Google Sheets.
Get an Overview: evtool csv-stats
The first thing you want with any CSV is a quick overview โ column names, types, row count, nulls, min/max values.
$ evtool csv-stats sales.csv
File: sales.csv โ 10,000 rows ร 8 columns
Column Type Non-Null Min Max Mean
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
date date 10,000 2024-01-01 2024-12-31 โ
product string 10,000 โ โ โ
category string 9,876 โ โ โ
quantity int 10,000 1 500 23.4
unit_price float 10,000 4.99 2,499.00 89.50
total float 10,000 4.99 24,990.00 1,245.30
region string 10,000 โ โ โ
sales_rep string 8,234 โ โ โ
โ 124 missing values in category
โ 1,766 missing values in sales_rep
evtool csv-stats --all data.csv gives you mode, stddev, percentiles, and histogram in one shot.Filter Rows: evtool csv-filter
Find rows matching a condition โ like all transactions over $1,000 in Q3:
$ evtool csv-filter --query 'total > 1000 and region == "West"' sales.csv
date,product,category,quantity,unit_price,total,region,sales_rep
2024-07-15,MacBook Pro,Electronics,2,2,499.00,4,998.00,West,Alice C.
2024-08-03,Surface Pro,Electronics,1,1,899.00,1,899.00,West,Bob K.
2024-09-21,Server Rack,Hardware,1,12,000.00,12,000.00,West,Alice C.
... (1,234 rows total)
Select & Project Columns: evtool csv-select
$ evtool csv-select --columns product,region,total sales.csv | head -5
product,region,total
MacBook Air,East,1,199.00
ThinkPad X1,West,2,499.00
Dell Monitor,South,349.00
iPad Pro,East,999.00
Group & Aggregate: evtool csv-stats --group-by
$ evtool csv-stats --group-by category sales.csv
Category Count Total(mean) Total(sum)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Electronics 3,421 $1,892.30 $6,473,932
Hardware 2,108 $4,231.50 $8,919,145
Software 2,876 $345.20 $993,355
Accessories 1,595 $89.50 $142,813
Sort Data: evtool csv-sort
$ evtool csv-sort --by total --desc sales.csv | head -5
date,product,category,quantity,unit_price,total,region,sales_rep
2024-06-15,Enterprise Server,Hardware,5,24,990.00,124,950.00,Central,David M.
2024-11-02,Mac Pro Bundle,Electronics,3,18,500.00,55,500.00,East,Alice C.
2024-03-18,Data Center Rack,Hardware,2,24,000.00,48,000.00,West,Frank L.
Convert CSV to JSON: evtool csv-to-json
$ evtool csv-to-json sales.csv | head -20
[
{ "date": "2024-01-03", "product": "MacBook Air", "category": "Electronics",
"quantity": 2, "unit_price": 1199.0, "total": 2398.0, "region": "East", "sales_rep": "Alice C." },
{ "date": "2024-01-07", "product": "ThinkPad X1", "category": "Electronics",
"quantity": 1, "unit_price": 2499.0, "total": 2499.0, "region": "West", "sales_rep": "Bob K." }
]
Join Two CSVs: evtool csv-join
$ evtool csv-join --left sales.csv --right products.csv --on product_id
date,product,category,total,product_id,name,stock
2024-01-03,MacBook Air,Electronics,2398.00,p1001,MacBook Air M3,45
2024-01-07,ThinkPad X1,Electronics,2499.00,p1002,ThinkPad X1 Gen 12,12
Real-World Pipeline: Weekly Sales Report
Combine everything into a shell pipeline:
$ evtool csv-filter --query 'date >= "2024-12-01"' sales.csv \
| evtool csv-select --columns category,total,region \
| evtool csv-stats --group-by category
Category Count Total(mean) Total(sum)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Electronics 412 $1,445.00 $595,340
Hardware 298 $3,890.00 $1,159,220
Software 356 $312.00 $111,072
Accessories 210 $78.00 $16,380
Part 2: JSON Data Processing
APIs return JSON. Logs are JSON. Configs are JSON. Here's how to explore and transform JSON from the terminal.
Pretty-Print JSON: evtool json-pretty
$ evtool json-pretty response.json
{
"status": "ok",
"data": {
"users": [
{
"id": 1,
"name": "Alice",
"email": "alice@example.com",
"role": "admin",
"last_login": "2024-12-15"
},
...
],
"total": 234
}
}
Validate & Find Issues: evtool json-validate
$ evtool json-validate config.json
โ Valid JSON
$ evtool json-validate broken.json
โ Parse error at line 42, column 15:
Unexpected token '}' โ expected property name
Select Fields from JSON: evtool json-select
$ cat response.json | evtool json-select --key data.users[].name
["Alice", "Bob", "Charlie", "Diana"]
Convert JSON to CSV: evtool json-to-csv
$ evtool json-to-csv users.json | head -3
id,name,email,role,last_login
1,Alice,alice@example.com,admin,2024-12-15
2,Bob,bob@example.com,user,2024-12-10
Merge Multiple JSON Files: evtool json-merge
$ evtool json-merge --deep config.default.json config.prod.json
{
"host": "api.example.com",
"port": 443,
"debug": false,
"database": {
"url": "postgres://prod:****@db.internal:5432/app",
"pool_size": 20
}
}
Part 3: Text & System Data
Text Statistics: evtool text-stats
$ evtool text-stats README.md
Lines: 1,247
Words: 8,432
Characters: 52,198
Avg line len: 41.8 chars
Longest line: 187 chars (line 892)
Empty lines: 124
Quick System Health: evtool sys-info
$ evtool sys-info
Host: myserver
OS: Linux 6.2.0 (x86_64)
CPU: 8 cores @ 3.4 GHz โ Load: 1.2 / 8.0
Memory: 15.6 GB / 31.2 GB (50%)
Disk: 234 GB / 512 GB (46%)
Uptime: 14d 3h 22m
Python: 3.11.5
Disk Usage Snapshot: evtool disk-usage
$ evtool disk-usage /var/log
Directory Size Files
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/var/log/nginx 1.2 GB 89
/var/log/journal 890 MB 47
/var/log/syslog 234 MB 12
/var/log/mysql 178 MB 34
/var/log/auth.log 45 MB 1
Countdown Timer: evtool countdown
$ evtool countdown 5m "Build complete!"
โณ 4:59 ... 4:58 ... 4:57 ...
โฐ Build complete!
Part 4: Piping Everything Together
The real power is composition. Pipe data between tools just like Unix utilities:
| Pipeline | What it does |
|---|---|
evtool csv-to-json data.csv | evtool json-pretty |
CSV โ formatted JSON |
evtool json-to-csv api.json | evtool csv-stats --all |
API response โ stats |
evtool csv-filter --query 'price > 50' | evtool csv-sort --by price |
Filter + sort in one pipeline |
find logs/ -name '*.json' | evtool json-validate --batch |
Validate all JSON files at once |
curl -s api.example.com/stats | evtool json-select --key data |
Quick API data extraction |
Why evolver-tools?
There are many CLI tools for data processing โ jq, yq, xsv, milller, visidata.
Each installs separately, with different syntax and runtime dependencies.
evolver-tools is different:
- Zero dependencies โ pure Python stdlib. No npm, no cargo, no brew.
- 262 tools, one install โ
pip install evolver-toolsgives you everything. - Cross-platform โ Linux, macOS, WSL, even Windows with Python.
- Pipe-friendly โ standard Unix I/O, works in any pipeline.
- CI-ready โ installs in 3 seconds, no network after cache.
Ready to try it?
Install in 3 seconds. No dependencies. Works everywhere.
pip install evolver-toolsโญ Star on GitHub
What's Next?
- Browse all 262 tools: evolver-tools catalog
- Printable quick reference: Cheatsheet
- Real-world CSV walkthrough: CSV CLI Tutorial
- Price & plans: Pricing
- The story behind this project: Built by AI