Skip to main content

Universal tabular data viewer CLI — view any file in a fast terminal UI

Project description

view-data

Universal tabular data viewer — open any CSV, JSON, Parquet, or Excel file in a fast, interactive terminal UI with sort, filter, search, and SQL — all in one command.

view file.csv
view data.json --sql "SELECT name, age FROM data WHERE age > 30"
view results.parquet
view sheet.xlsx
view --sql "SELECT * FROM 'a.csv' JOIN 'b.json' USING(id)"

Install

# From source
pip install .

# Or with pipx (recommended — isolated environment)
pipx install .

Requires Python 3.10+.


Usage

view <file>                          Open a file in the TUI
view <file> --format csv             Force format detection
view <file> --head 1000              Load only first 1 000 rows
view <file> --sql "SELECT …"         Run SQL before viewing (table alias: data)
view --sql "SELECT … FROM 'a.csv'"   Cross-file SQL (no positional file needed)
view --version
view --help

Supported formats

Extension Format
.csv, .tsv, .txt CSV / TSV (delimiter auto-detected)
.json JSON array-of-objects
.jsonl, .ndjson Newline-delimited JSON
.parquet Apache Parquet
.xlsx, .xls Excel (first sheet)

Keybindings

Navigation

Key Action
↑ ↓ ← → Move cursor
Page Up / Page Down Scroll by page
Home / End First / last column
g Jump to first row
G (Shift+G) Jump to last row
Enter Expand full cell value

Sorting

Key Action
s Sort by current column (asc → desc → clear)

Filtering

Key Action
/ Open filter bar
Esc Clear all filters

Filter syntax:

name=Alice          exact match
age>30              numeric comparison
city~New.*          regex match
age>=18 city~NY     AND (space-separated)

Search

Key Action
Ctrl+F Open search (all visible cells)
n Next match
N (Shift+N) Previous match
Esc Clear search

Columns

Key Action
c Open column show/hide picker
< Shrink current column
> Grow current column

SQL

Key Action
: Open SQL prompt (table alias: data)

Example: : SELECT city, COUNT(*) AS n FROM data GROUP BY city ORDER BY n DESC

Export & Other

Key Action
e Export current view (CSV or JSON)
? Show help overlay
q / Esc Quit

SQL Examples

# Filter before viewing
view employees.csv --sql "SELECT * FROM data WHERE salary > 100000"

# Aggregate
view orders.csv --sql "SELECT product, SUM(amount) as total FROM data GROUP BY product"

# Cross-file join (no positional file)
view --sql "SELECT a.name, b.order_count FROM 'customers.csv' a JOIN 'orders.json' b ON a.id = b.customer_id"

# Nested JSON — access struct fields with dot notation
view events.json --sql "SELECT meta.page, meta.duration_ms FROM data WHERE event='click'"

Screenshot

(placeholder — run view tests/fixtures/sample.csv to see it live)


Development

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

# Generate test fixtures
python tests/fixtures/create_fixtures.py

# Run
view tests/fixtures/sample.csv
view tests/fixtures/sample.json --sql "SELECT id, title FROM data LIMIT 5"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

viewcli-0.1.0.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

viewcli-0.1.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file viewcli-0.1.0.tar.gz.

File metadata

  • Download URL: viewcli-0.1.0.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for viewcli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a9c34d1b83f84a436700cfcf7dfde4d6a74be76188dd5e0685ea33b7f1468167
MD5 eb692b7ef22a18481cc055969df4508f
BLAKE2b-256 d00db0446cd7a73fa3ca9c36edc8083e2ecfba987d417b24b5cb1a6403d92458

See more details on using hashes here.

File details

Details for the file viewcli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: viewcli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for viewcli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68a94ddbb838026afdae78faf070c9af4f3e10324ae4df545aa9774f745ecc51
MD5 f9a4233d0e2262599c081b9fe7ef3b67
BLAKE2b-256 b386e9604f039f6d242c872d3c9df3c0398e6e339f2a436e7ab67f40fd9eb926

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page