https://github.com/samueljackson92/xr-tui
A TUI for viewing netcdf, zarr, and hdf files.
https://github.com/samueljackson92/xr-tui
data hdf netcdf xarray zarr
Last synced: 5 months ago
JSON representation
A TUI for viewing netcdf, zarr, and hdf files.
- Host: GitHub
- URL: https://github.com/samueljackson92/xr-tui
- Owner: samueljackson92
- License: mit
- Created: 2025-12-05T08:05:56.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-15T18:06:10.000Z (5 months ago)
- Last Synced: 2026-01-15T20:47:28.616Z (5 months ago)
- Topics: data, hdf, netcdf, xarray, zarr
- Language: Python
- Homepage:
- Size: 18.2 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xr-tui
[](https://github.com/samueljackson92/xr-tui/actions)
[](https://github.com/samueljackson92/xr-tui/stargazers)
[](https://github.com/samueljackson92/xr-tui/issues)
[](https://github.com/samueljackson92/xr-tui/pulls)
[](https://github.com/astral-sh/ruff)
[](https://github.com/pylint-dev/pylint)

xr-tui is an interactive terminal user interface (TUI) for exploring and visualizing multi-dimensional datasets. It uses xarray to support loading NetCDF, Zarr, and HDF5 tree structures, and provides a user-friendly interface for data exploration directly in the terminal.

## Features
- Interactive navigation through NetCDF, Zarr, [NeXus](https://www.nexusformat.org/) and HDF5 datasets.
- Visualization of 1D and 2D data using plotext for terminal-based plotting.
- Support for slicing multi-dimensional data.
- Easy-to-use command-line interface.
- Displays dataset statistics and metadata.
- Handles HDF5 files not formatted as xarray datasets.
## Installation
You can install xr-tui via pip:
```bash
pipx install xr-tui
```
Or as a uv tool:
```bash
uv tool install xr-tui
```
## Usage
To start xr-tui, simply run the following command in your terminal:
```bash
xr data.nc
```
This will launch the TUI, allowing you to explore the contents of `data.nc`.
xr-tui supports various file formats compatible with xarray, including NetCDF, Zarr, and HDF5.
You can also specify a particular group within a file to load:
```bash
xr data.nc --group summary
```
xr-tui also works with remote datasets accessible via HTTP:
```bash
xr http://example.com/data.zarr
```
## Key Command Reference
| Key | Action |
|-----|--------|
| `q` | Quit the application. |
| `h` | Show help menu. |
| `e` | Expand all nodes in the dataset tree. |
| `space` | Collapse all nodes in the dataset tree. |
| Arrow keys | Navigate through the dataset. |
| `Enter` | Select an item or open a variable |
| `s` | Show statistics of the selected variable. |
| `p` | Plot the selected variable. |