Introduction
h5v is a terminal HDF5 viewer and editor.

It provides:
- tree navigation for groups, datasets, links, and projected compound fields
- preview, matrix, heatmap, image, and schema views
- attribute inspection and editing
- command and startup-script automation
- multichart comparison
Start with Installation and Quick start.
Installation
Recommended: shell installer
Linux and macOS can install the latest release directly from GitHub:
curl -fsSL https://raw.githubusercontent.com/DanielHauge/h5v/main/install.sh | sh
The shell installer also works in Git Bash, MSYS2, and Cygwin on Windows. It prefers conventional install locations: /usr/local/bin when writable, ~/.local/bin on Unix-like systems without a writable system prefix, and %LOCALAPPDATA%\Programs\h5v\bin on Windows shells.
Options:
install.sh --version VERSION --install-dir PATH --repo OWNER/REPO --dry-run
Other install paths
PowerShell
irm https://raw.githubusercontent.com/DanielHauge/h5v/main/install.ps1 | iex
Homebrew
brew tap DanielHauge/h5v https://github.com/DanielHauge/h5v.git
brew install h5v
Scoop
scoop bucket add h5v https://github.com/DanielHauge/h5v
scoop install h5v/h5v
Prebuilt binaries with cargo-binstall
cargo binstall h5v
Build from source
cargo install h5v
On Linux, source builds may require native packages such as cmake, pkg-config, libfontconfig, freetype, and expat development headers.
Terminal graphics
h5v works in plain terminals, but image and chart previews look best with a real graphics protocol such as Kitty.
Links:
- Kitty graphics protocol: https://sw.kovidgoyal.net/kitty/graphics-protocol/
- ratatui-image: https://github.com/ratatui/ratatui-image
- terminal support gallery: https://benjajaja.github.io/ratatui-image-screenshots/
If graphics probing causes trouble:
h5v --no-terminal-graphics path/to/file.h5
That disables graphics probing and uses the safer text-only path.
Compatibility mode
If your terminal also struggles with icons or line drawing:
h5v --compatibility path/to/file.h5
This switches to simpler symbols and disables terminal graphics probing.
You can also enable it with H5V_COMPATIBILITY_MODE or h5v.compatibility = true.
H5V_COMPATIBILITY_MODE=true h5v path/to/file.h5
H5V_COMPATIBILITY_MODE=off h5v path/to/file.h5
Precedence:
--compatibilityh5v.compatibilityH5V_COMPATIBILITY_MODE- default
false
For config details, see Configuration and theming. For display problems, see Troubleshooting and limits.
To make the environment variable permanent:
# ~/.bashrc or ~/.zshrc
export H5V_COMPATIBILITY_MODE=true
# ~/.config/fish/config.fish
set -gx H5V_COMPATIBILITY_MODE true
Invalid values are rejected.
Write mode
h5v opens files read-only unless you pass -w:
h5v -w path/to/file.h5
Without -w, edit actions report that the file must be reopened in write mode.
Quick start
Open a file:
h5v path/to/file.h5
h5v -w path/to/file.h5
Press ? to open the in-app help.

Try the bundled example
h5v examples/h5v-example.h5 --script examples/h5v-example.h5v
Regenerate the example file if needed:
python scripts/generate_example_h5.py
Default workflow
- Move around the tree on the left.
- Inspect the selected node in the content pane.
- Inspect or edit metadata in the attributes pane.
Useful keys:
?opens the in-app helpTabswitches between preview and matrix when both exist:opens the command minibuffermadds the current preview to multichart, including group previews driven byH5V_PREVIEW_EXPRMopens or closes multichart mode
Help
The help view has five tabs:
KeymapCommandsMultichartHeatmapCustomization
Use Tab / Shift+Tab or h / l to switch tabs.
In Keymap, Commands, and Customization, use j / k, arrow keys, Home, End, g, and G to move through the left-hand list.
Example paths:
| Path | What to look at |
|---|---|
/signals/sine_wave | Basic numeric chart preview |
/matrices/cube | Matrix mode with dimension selectors |
/images/truecolor_rgb | Inline truecolor image |
/images/wide_grayscale | Wide pannable image window |
/images/varlen_png_frames | Variable-length encoded image frames |
/compound/nested_records | Recursive compound schema view |
/compound/nested_records/window | Projected fixed-array field with matrix editing |
/metadata/attributes_demo | Mixed attribute types and references |
/group_preview | Group-level chart preview driven by H5V_PREVIEW_EXPR |
First commands
:goto /signals/sine_wave
:goto /group_preview
:mode matrix
:help mchart
Script a startup
Inline commands:
h5v examples/h5v-example.h5 \
-c "goto /signals/sine_wave" \
-c "mchart add" \
-c "goto /signals/cosine_wave" \
-c "mchart add" \
-c "mchart show"
Script file:
h5v examples/h5v-example.h5 --script examples/h5v-example.h5v
Dry-run:
h5v --script-test --script examples/h5v-example.h5v
See Controls reference, Commands, Configuration, and Startup scripting.
Navigation and layout
Pane model
h5v has three panes:
- the tree pane for HDF5 structure and selection
- the content pane for preview, matrix, schema, image, and multichart views
- the attributes pane for metadata inspection and editing
Wide terminals use a side-by-side layout. Narrow terminals stack the panes. Search takes over the working area.
Moving focus
Shift+ arrow keys to move between panes directlyCtrl+W, thenh/j/k/lfor vim-style pane navigation
The sidebar can be toggled with s or Ctrl+W o.
Tree navigation
j/kor arrow keys move the selectionhandlcollapse or expand nodesEnterorSpacetoggles the current nodeg/Gjump to the top or bottomu/Ctrl+UandCtrl+Dmove by larger chunks
When the current selection is previewable, m adds it to the multichart workspace.
Mouse support:
- a click selects the row under the cursor
- clicking the already selected group or compound container toggles it
- repeated clicks on
Load morekeep expanding long child lists
Content modes
The content pane changes with the selected node:
- numeric datasets prefer chart-style preview
- matrixable datasets can switch to matrix mode
- numeric datasets with at least two non-singleton dimensions can switch to heatmap mode
- scalar and string data render as text
- HDF5 image datasets render inline as images
- compound container nodes show a recursive schema view
- file nodes show filesystem metadata
- groups stay previewable even when they only show an empty-state card
Use Tab to switch modes when more than one is available.
Search and help
/enters search mode:opens the command minibuffer?opens the built-in help.repeats the last successful command
The help view has tabs for Keymap, Commands, Multichart, Heatmap, and Customization. Tabs with a left-hand list use the normal list navigation keys.
See Controls reference and Commands.
Controls reference
These are the shipped defaults. h5v.keymaps can override them for non-text-entry contexts.
Global and pane controls
| Keys | Action |
|---|---|
q, Ctrl+C | Quit |
? | Show help |
: | Open command mode |
. | Repeat the last successful command |
/ | Enter search |
Shift + arrows | Move focus between panes |
Ctrl+W, then h/j/k/l | Vim-style pane focus |
s or Ctrl+W o | Toggle the sidebar |
Ctrl+R | Reload the file |
Help
| Keys | Action |
|---|---|
? | Open help |
Esc | Close help |
Tab, l, Right | Next tab |
Shift+Tab, h, Left | Previous tab |
j, Down | Next item in the left-hand list |
k, Up | Previous item in the left-hand list |
g, Home | Jump to the first item in the left-hand list |
G, End | Jump to the last item in the left-hand list |
Tree navigation
| Keys | Action |
|---|---|
j, Down | Move down |
k, Up | Move up |
Ctrl+D | Move down by a larger step |
u, Ctrl+U | Move up by a larger step |
g, Home | Jump to the top |
G, End | Jump to the bottom |
h, Left | Collapse |
l, Right | Expand |
Enter, Space | Toggle node |
m | Add the current previewable selection to multichart, including group previews |
Preview and matrix selectors
| Keys | Action |
|---|---|
Tab | Toggle preview and matrix when both exist |
x, X | Move the preview x-axis |
r, R | Move the matrix row axis |
c, C | Move the matrix column axis |
[, ] | Change the selected dimension |
Alt+Left, Alt+Right | Previous or next selected dimension |
Ctrl+X, Ctrl+A | Decrement or increment the selected index |
Alt+Up, Alt+Down | Increment or decrement the selected index |
PageUp, PageDown | Scroll larger preview or matrix segments |
Content and attributes
| Keys | Action |
|---|---|
h/j/k/l, arrows | Move inside the active pane |
Enter, e | Edit the focused value or attribute |
y | Copy the focused name or value |
a | Create an attribute from the attributes pane |
d, Delete | Delete the focused attribute or multichart item depending on mode |
Esc | Cancel the active popup or prompt |
Edits use your configured editor through $EDITOR and fall back to vi.
Heatmap
| Keys | Action |
|---|---|
Up, Down | Select heatmap setting row |
Left, Right | Change the selected heatmap setting |
PageUp, PageDown | Move through segmented heatmap pages |
z, Z | Zoom in or out |
0 | Reset the heatmap viewport |
v | Clear the explicit heatmap selection |
H, J, K, L | Pan the zoomed viewport |
y | Copy the active viewport or selection summary |
Mouse
| Action | Effect |
|---|---|
| Click a tree row | Select it |
| Click the selected group or compound container again | Toggle expand or collapse |
Click Load more again | Reveal more child rows |
| Click a matrix cell | Move the matrix cursor there |
| Click a heatmap settings row | Focus that heatmap setting |
| Left click a heatmap cell | Select a heatmap region |
| Mouse wheel over heatmap | Anchored zoom on the hovered cell |
| Right click on a heatmap selection | Zoom into the selected region |
| Right-click drag on heatmap or multichart | Pan |
Command minibuffer
| Keys | Action |
|---|---|
Enter | Run the command |
Esc | Cancel |
Tab | Apply the next completion |
Shift+Tab, Up | Previous suggestion |
Down | Next suggestion |
Ctrl+P, Ctrl+N | Browse command history |
Ctrl+W | Delete the previous word |
Ctrl+A, Home | Move to the start |
Ctrl+E, End | Move to the end |
Ctrl+U | Clear the line |
Multichart mode
| Keys | Action |
|---|---|
M, Esc | Leave multichart mode |
j, k | Move through chart items |
Enter | Open a new expression |
e | Edit the selected series |
Space, v | Toggle selected item visibility |
? | Open multichart help |
d, Backspace, Delete | Remove the selected item when nothing depends on it |
C | Clear all chart items |
c | Reset zoom |
f | Fit all visible series |
F | Fit the selected series |
+, =, Shift+Up | Zoom in |
-, Shift+Down | Zoom out |
h, Shift+Left | Pan left |
l, Shift+Right | Pan right |
| Wheel over the plot | Anchored zoom |
Ctrl + wheel over the plot | Anchored x-only zoom |
Shift + wheel over the plot | Anchored y-only zoom |
| Right-click drag | Pan both axes on release |
HDF5 feature support
h5v can browse groups, datasets, links, broken links, and synthetic nodes created for projected compound fields.
Matrixable and previewable data types
| Type family | Preview | Matrix | Notes |
|---|---|---|---|
| Signed integers | Yes | Yes | Rendered as numeric data |
| Unsigned integers | Yes | Yes | Rendered as numeric data |
| Floating point | Yes | Yes | Rendered as numeric data |
| Boolean | Yes | Yes | Routed through unsigned rendering |
| Enum | Yes | Yes | Uses colored symbols and labels, with optional dataset-defined overrides |
| Fixed strings | Text | Yes | Fixed strings are read with a 32768-byte limit |
| Variable strings | Text | Yes | Good for inline string inspection |
| Compound | Schema or projected preview | Projected fields only | Root compound matrix rendering is not implemented |
| Fixed arrays | Limited | No | Standalone fixed arrays are not matrixable through the main renderer |
| Variable arrays | Limited | No | Not matrixable through the main matrix renderer |
| References | Limited | No | No dedicated matrix renderer |
Matrix mode is only available when a dataset is matrixable and its shape has at least one dimension larger than 1. Single-value datasets stay in scalar preview mode.
Strings and highlighting
String datasets can carry a HIGHLIGHT attribute with an extension hint such as json, py, or yml. If it is absent, h5v falls back to the dataset name extension.
Enum styling overrides
Enum datasets can override the default symbol and color cycle with:
SYMBOLS: a 1D string attribute, aligned with ascending numeric enum value orderCOLORS: a 1D string attribute, aligned with ascending numeric enum value order
Color values accept named colors and #RRGGBB. See Configuration reference.
Group preview expressions
Groups can opt into preview rendering with a variable-length string attribute named H5V_PREVIEW_EXPR. The value uses the same expression syntax as multichart.
Image metadata handling
Datasets that follow the HDF5 image convention are rendered inline as images. See Images and Image conventions.
Properties vs attributes
type, size, shape, chunk, link, and path are properties shown in the Properties section. They are not HDF5 attributes.
Those built-in properties include:
typesizeshapechunklinkpath
Preview types
Numeric chart preview

h5v renders numeric datasets as a line plot over a selected one-dimensional slice.
- active x-axis dimension
- fixed indices for the other dimensions
- visible slice when the data is segmented
Use x / X, [ / ], and the index controls to move through higher-dimensional data.
Large previews are segmented at 250000 elements. PageUp / PageDown move between segments.
If a slice contains only invalid numeric values such as NaN or infinity, h5v reports that bounds cannot be computed.
Scalar and string preview
Scalar datasets render as text. This covers:
- floating-point scalars
- signed and unsigned integer scalars
- fixed and variable strings
Scalar enums use the enum renderer, including optional SYMBOLS and COLORS overrides.
String datasets can carry syntax-highlighting hints. Resolution order:
HIGHLIGHTattribute on the dataset- dataset name extension such as
.pyor.yml
File preview
Selecting the root file node shows filesystem metadata such as path, size, timestamps, permissions, and open mode.
Schema preview for compounds
Selecting the root of a compound dataset shows a recursive schema preview.
Projected compound leaves follow their field type:
/compound/nested_records/gainpreviews like a numeric field/compound/nested_records/windowis matrixable and editable as one value per line- projected enum leaves can inherit custom symbol/color styling from dataset metadata
- projected multi-value string arrays stay matrix-only instead of attempting chart preview
Group preview
If a group has a variable-length string attribute named H5V_PREVIEW_EXPR, h5v evaluates it with the same syntax as multichart and renders the result in the preview pane.
The bundled example includes /group_preview:
(!/group_preview/time, (!/group_preview/value - #/group_preview/offset) * #/group_preview:scale)
Press m on that group to add the same expression to multichart.
Image preview
Datasets recognized as HDF5 images render inline in the content pane. See Images for behavior and Image conventions for the required metadata.

Matrix views

When matrix mode is available
Matrix mode appears when the current dataset or projected compound field is matrixable and has more than one effective element. Use Tab to move between preview and matrix mode when both are available.
Dimension selection
For datasets with more than two dimensions, h5v exposes selectors for:
- the row axis
- the column axis
- the currently selected extra dimension
- the active index value for fixed dimensions
Dimensions with size 1 are forced to index 0. The row and column axes must stay distinct, and the selected-dimension controls let you walk a higher-dimensional array one slice at a time.
Rendering behavior
Numeric values
Numeric datasets render as dense tables with one line per row. Column widths are sized for readable values and a minimum width of 24 characters.
Enums
Enums render with symbol and color mapping so repeated categories are easier to scan visually.
Strings
String matrices render inline with widths adjusted to the visible content.
Compound fields
Compound container roots are documented through the schema preview. Individual projected leaf fields, however, can still render in matrix mode once you drill down to a matrixable field.
Practical workflow
Use matrix mode when:
- the shape is dense enough that spatial layout matters more than trend shape
- you need to compare neighboring values directly
- a chart preview hides too much structure in a higher-dimensional slice
Switch back to preview mode when trend shape matters more than cell-by-cell inspection.
Heatmap
Heatmap is the image-style view for numeric datasets with at least two non-singleton dimensions.

It is available only when:
- compatibility mode is off
- terminal image rendering is available
What it shows
- a rendered 2D slice
- slice/page context
- settings
- viewport stats
- optional selection stats
- legend and histogram
Settings
The settings panel controls:
- colormap
- range mode
- invert x
- invert y
- invert colors
- normalization
Built-in range modes include Auto, MIN/MAX, Clip 1-99%, Sigma +-2sigma, and Winsor 2-98%.
Use Up / Down to move between settings and Left / Right to change the selected value. Click a settings row to focus it directly.
Selection and viewport
- no explicit selection means the active region is the current viewport
- one left click selects one terminal-cell region
- a second left click expands that to a rectangle
- another left click after a rectangle clears the explicit selection
The region panel shows both:
- viewport
x/y/w/h,mean,std - selection
x/y/w/h,mean,std
Zoom and pan
zzoom inZzoom out0reset viewportvclear explicit selectionH/J/K/Lpan the zoomed viewportPageUp/PageDownmove through segmented heatmap pages
Mouse
- left click selects a region
- wheel zoom is anchored to the hovered cell
- right click on an explicit selection zooms into that selection
- right-click drag pans the viewport
Commands and scripts
Heatmap uses the existing movement commands:
up/downleft/rightpage-up/page-down
Dedicated heatmap range commands:
heatmap range listheatmap range use "Clip 1-99%"heatmap range add 5% 80% "5-80%"heatmap range add 2.5 5.5 "2.5..5.5"
Zoom, reset, clear selection, and viewport pan are key-driven. In scripts, use press:
press zpress Zpress 0press vpress H
Copy
y copies the active heatmap summary:
- selection summary when a region is selected
- viewport summary otherwise
Configuration
Heatmap configuration:
- include
heatmapinh5v.content_mode_order - style shared panel/title colors through
h5v.colors - style shared symbols through
h5v.symbols - set
h5v.heatmap.default_range - set
h5v.heatmap.default_colormap - set
h5v.heatmap.default_normalization - set
h5v.heatmap.default_invert_x - set
h5v.heatmap.default_invert_y - set
h5v.heatmap.default_invert_c - add
h5v.heatmap.range_modes
Images

h5v renders datasets inline as images when they match the HDF5 image convention.
For the full subclass and shape rules, see Image conventions.
Terminal support
Image previews work best in terminals with a full graphics protocol. Kitty is the strongest target.
- Kitty graphics protocol: https://sw.kovidgoyal.net/kitty/graphics-protocol/
- ratatui-image backend support: https://github.com/ratatui/ratatui-image
- ratatui-image terminal screenshot matrix: https://benjajaja.github.io/ratatui-image-screenshots/
Raw JPEG and PNG payloads
h5v supports raw encoded image payloads stored as:
u8byte streams- variable-length arrays of
u8
Multi-frame image datasets
Image navigation works for multi-frame data as well:
- grayscale and truecolor image stacks can use the leading dimension as a frame axis
- raw JPEG and PNG payloads can be stored as variable-length byte arrays
- frame movement is clamped to the available range
Viewport behavior
For very wide or tall datasets, h5v switches to a windowed viewport. The HUD shows:
- the currently visible row or column range
- total coverage percentage
- how many rows or columns are visible
- how far each arrow-key press pans the viewport
Try /images/truecolor_rgb and /images/wide_grayscale in the bundled example file.
Related chapters
Image conventions
Required attributes
h5v follows the standard HDF5 image convention. A dataset must have:
CLASS = "IMAGE"IMAGE_SUBCLASS = ...
Supported IMAGE_SUBCLASS values are:
IMAGE_GRAYSCALEIMAGE_TRUECOLORIMAGE_BITMAPIMAGE_INDEXEDIMAGE_JPEGIMAGE_PNG
Interlace mode
Truecolor and indexed images also need:
INTERLACE_MODE = "INTERLACE_PIXEL"orINTERLACE_MODE = "INTERLACE_PLANE"
If that attribute is missing for formats that require it, h5v will not treat the dataset as an inline image.
Shape expectations
| Image kind | Expected shapes |
|---|---|
| Grayscale | [height, width] or frame-first variants such as [frames, height, width] |
| Bitmap | [height, width] |
| Truecolor, pixel interlace | [height, width, channels] or [frames, height, width, channels] |
| Truecolor, plane interlace | [channels, height, width] or [frames, channels, height, width] |
The exact dataset interpretation depends on the subclass plus the interlace mode.
Pannable wide or tall images
When an image would be clipped heavily by the current terminal aspect ratio, h5v switches from a simple fit-to-area preview to a windowed image view. The image chrome then shows which row or column range is currently visible, and the hidden portion can be explored like a pannable image slice.
In practice this works especially well for unusually wide or tall datasets. The bundled example path /images/wide_grayscale is intended to demonstrate that behavior.
Compound datasets
Synthetic child nodes
The bundled example file includes /compound/records and /compound/nested_records so you can test both simple and nested compound browsing immediately.
Compound datasets are not treated as opaque blobs. h5v creates synthetic tree nodes for their fields so you can navigate the compound structure directly from the main tree.
Root-level schema preview
When the focused node is the root of a compound dataset, the preview pane shows a recursive schema view rather than an empty content area. The schema includes:
- field names
- field types
- byte offsets
- nested compounds and compound arrays
Recursion handling
Schema rendering has a hard recursion limit of 32 nested levels and explicitly omits recursive loops once they are detected. That keeps pathological or self-referential layouts from hanging the preview.
Projected field workflows
Once you drill down to a concrete leaf field, that projected field behaves like an ordinary dataset slice:
- numeric fields can preview as charts
- matrixable fields can render in matrix mode
- scalar string fields render as text
- multi-value string arrays stay matrix-only
The bundled example is a good regression harness here:
/compound/records/labelshows projected string handling/compound/nested_records/windowshows a projected fixed array that can be edited from matrix mode
Projected enum leaves use the same enum renderer as normal enum datasets. They can inherit dataset-wide SYMBOLS and COLORS overrides, and they also check field-scoped variants first by prefixing the projected field path in uppercase with underscores. For example, a projected field like status/evaluation looks for STATUS_EVALUATION_SYMBOLS and STATUS_EVALUATION_COLORS before falling back to plain SYMBOLS and COLORS.
This makes compound-heavy files much easier to inspect without exporting fields into standalone datasets first.
Commands
Press : to open the command minibuffer.

Minibuffer behavior:
Tabcycles matching completionsShift+Taband arrow keys move through suggestionsCtrl+P/Ctrl+Nbrowse command historyhelporhelp <command>shows command help.repeats the last successful command
Press ? for the full in-app help. Use help <command> in the minibuffer for command-specific help.
Common commands
Navigation:
goto /signals/sine_wave
seek 5
down 3
left 2
page-down
View control:
focus tree
focus attributes
focus content
mode preview
mode matrix
mode heatmap
toggle-tree
reload
configure
configure reset
Heatmap view control:
up
down
left
right
page-up
page-down
Heatmap key-only actions:
press z
press Z
press 0
press v
press H
Heatmap range presets:
heatmap range list
heatmap range use "Clip 1-99%"
heatmap range add 5% 80% "5-80%"
heatmap range add 2.5 5.5 "2.5..5.5"
Selection:
x next
row prev
col next
dim next
index next 10
Attributes:
attr create title string "release candidate"
attr delete title
Multichart:
mchart open
mchart add !/signals/sine_wave
mchart fit all
mchart visible
mchart select next
mchart prompt
mchart expr "($1[0..512], !/signals/cosine_wave[..512])"
mchart zoom x in 25
mchart pan right 10
For the full command list, aliases, and mchart action table, see Command reference.
Aliases and numeric shorthand
Numeric shorthand still works:
:5
:+3
:-2
Mappings:
:5->seek 5:+3->down 3:-2->up 2
Quoting
Quoted strings work in commands and scripts. Use them for:
- attribute values with spaces
- command scripts containing expression tuples
press ...commands that need modifier sequences
press goes through the normal keymap:
press ctrl+w o
press M j enter
If you override keys in h5v.keymaps, press uses the effective keymaps after config load.
Try commands against the bundled example:
h5v examples/h5v-example.h5
See Configuration and theming and Startup scripting.
Command reference
Key columns below show the shipped defaults. h5v.keymaps can override them for non-text-entry contexts.
Top-level commands
| Command | Aliases | Args | Keys | Purpose |
|---|---|---|---|---|
seek | — | <index> | — | Jump to an absolute index in the current content view |
goto | jump, open | <path> | — | Select a node by HDF5 path |
up | dec, decrement | [amount] | Up, k | Move up by a relative amount |
down | inc, increment | [amount] | Down, j | Move down by a relative amount |
left | — | [amount] | Left, h | Move left by a relative amount |
right | — | [amount] | Right, l | Move right by a relative amount |
page-up | pgup | — | PageUp, Ctrl+U | Move up by a page |
page-down | pgdown | — | PageDown, Ctrl+D | Move down by a page |
focus | — | <target> | Shift+Arrows | Focus a pane |
mode | view-mode | <mode> | Tab | Switch between preview, matrix, and heatmap |
toggle-tree | tree | — | s | Show or hide the tree pane |
reload | refresh | — | Ctrl+R | Reload the current file |
configure | config | [reset] | — | Open or reset the Lua config |
x | — | `<prev | next>` | x, X |
row | — | `<prev | next>` | r, R |
col | column | `<prev | next>` | c, C |
dim | dimension | `<prev | next>` | [, ] |
index | selected-index | `<prev | next> [amount]` | Ctrl+A, Ctrl+X, Alt+Up/Down |
help | ? | [command] | ? | Open help or show help for one command |
attr | attribute | `<create | delete> ...` | a, d, Delete |
repeat | again | — | . | Repeat the last successful command |
mchart | multichart | <action> ... | M | Control multichart |
press | key, keys | <key1> [key2] [key3] [key4] | — | Dispatch key presses through the normal keymap |
heatmap | — | <action> ... | — | Manage heatmap-specific range presets |
Numeric shorthand
| Input | Expands to |
|---|---|
:5 | seek 5 |
:+3 | down 3 |
:-2 | up 2 |
Focus targets
| Target |
|---|
tree |
content |
attributes |
View modes
| Mode |
|---|
preview |
matrix |
heatmap |
Heatmap view command mapping
Heatmap uses the existing movement commands:
| Command | Effect in heatmap |
|---|---|
up [amount] | Move the selected heatmap setting row |
down [amount] | Move the selected heatmap setting row |
left [amount] | Change the selected heatmap setting value |
right [amount] | Change the selected heatmap setting value |
page-up | Move to the previous segmented heatmap page |
page-down | Move to the next segmented heatmap page |
Heatmap commands
| Command | Effect |
|---|---|
heatmap range list | Show all built-in, configured, and session-added range presets |
heatmap range use <preset> | Select an existing range preset by label or built-in alias |
heatmap range add <min> <max> [label] | Add a session range preset and select it immediately |
Heatmap key-only actions
These actions are available from the keymap and can be scripted with press ...:
| Key | Script form | Effect |
|---|---|---|
z | press z | Zoom in |
Z | press Z | Zoom out |
0 | press 0 | Reset the viewport |
v | press v | Clear the explicit selection |
H / J / K / L | press H / press J / press K / press L | Pan the zoomed viewport |
Selection directions
| Direction |
|---|
prev |
next |
Attribute actions
| Action | Form |
|---|---|
create | attr create <name> <type> <value> |
delete | attr delete <name> |
Multichart actions
| Action | Example |
|---|---|
| open/show/close/hide/toggle | mchart open |
| add | mchart add !/signals/sine_wave |
| expr/expression/prompt | mchart expr "($1[0..512], !/signals/cosine_wave[..512])" |
| select / move | mchart select next |
| visible toggle / show / hide | mchart visible hide |
| remove / delete | mchart delete |
| clear / clear all / clear zoom | mchart clear zoom |
| fit all / selected | mchart fit selected |
| zoom in / out / reset | mchart zoom in 25 |
| zoom x / y / uniform | mchart zoom x in 20 |
| pan left / right | mchart pan right 10 |
Press examples
press ctrl+w o
press M j enter
press uses the effective keymaps after config load, including custom keymap overrides.
Startup scripting

Sources
--script <PATH>--script -- piped stdin
- repeated
--command/-c
Order: scripts first, then stdin, then inline commands.
Startup scripts use the same command parser as the minibuffer. That includes:
- navigation commands
- view and focus commands
- attribute commands
- heatmap range commands
- multichart commands
press <keys>sequences
Heatmap can be scripted with generic movement commands, heatmap range ... commands, and press for zoom, reset, clear selection, and viewport pan.
press uses the effective keymaps after config load, so startup scripts follow any configured key remaps.
Validation mode
Use --script-test or -ct to validate a script without launching the UI:
h5v file.h5 --script-test --script setup.h5v
Bundled example script
h5v examples/h5v-example.h5 --script examples/h5v-example.h5v
Regenerate the example file if needed:
python scripts/generate_example_h5.py
Script format
- newline-separated commands
- semicolon-separated commands
- blank lines
- comment lines beginning with
#
Examples:
h5v file.h5 -c "focus content" -c "mode matrix"
h5v file.h5 --script setup.h5v
printf 'toggle-tree; mode preview\nreload\n' | h5v file.h5
Example setup.h5v:
# open with a clean content layout
toggle-tree
focus content
mode preview
mchart add !/group/dataset[..,0]
Example heatmap script fragment:
focus content
mode heatmap
heatmap range add 5% 80% "5-80%"
page-down
press z
press L
press v
Bundled examples/h5v-example.h5v:
goto /signals/sine_wave
focus content
mchart add
goto /signals/cosine_wave
mchart add
mchart open
mchart select prev
mchart visible
mchart select next
mchart prompt
mchart expr "$1 - $2"
mchart zoom in 20
See Command reference for the full command surface.
Configuration
h5v loads init.lua at startup.
If the file is invalid, h5v keeps running, shows a warning toast, and marks the header with a config warning badge until the configuration loads cleanly again.
Config file location
init.lua lives under your platform config directory:
- Linux:
~/.config/h5v/init.lua - macOS:
~/Library/Application Support/h5v/init.lua - Windows:
%AppData%\h5v\init.lua
If it does not exist, h5v creates it.
LuaLS sidecar files are generated next to it under .h5v-luals/. h5v.lua is refreshed automatically. .luarc.json is refreshed only while h5v manages it.
Commands
| Command | What it does |
|---|---|
configure | Opens init.lua in $VISUAL or $EDITOR, then reloads the configuration when you exit the editor. |
configure reset | Replaces init.lua with a fresh default scaffold, then reloads it immediately. |
Start here
Most configs only need these fields:
h5v.themeh5v.symbol_themeh5v.content_mode_orderh5v.compatibilityh5v.heatmap.*h5v.keymapsh5v.colorsh5v.symbols
For all keys, scopes, themes, and accepted color names, see Configuration reference.
Keymaps
Keymaps live in h5v.keymaps.
Scopes:
globalnormalwindowtreecontentheatmapattributesmchart
Precedence:
heatmapcontent/tree/attributes/mchart/windownormalglobal
Each scope supports:
clear_defaults = trueto remove shipped bindings for that scopeunbind = { "key", ... }to remove selected shipped bindingsbind = { { key = "...", action = "..." }, { key = "...", command = "..." } }bind(mode, key, action[, description])bind_command(mode, key, command[, description])bind_commands(mode, key, commands[, description])bind_script(mode, key, script[, description])bind_lua(mode, key, callback[, description])unbind(mode, key)
Use h5v.modes.* and h5v.actions.* constants in Lua. Examples: h5v.modes.Global, h5v.modes.Heatmap, h5v.actions.ShowHelp, h5v.actions.HeatmapZoomIn.
Example:
bind(h5v.modes.Global, "ctrl+h", h5v.actions.ShowHelp, "Show help")
unbind(h5v.modes.Heatmap, "v")
bind_command(h5v.modes.Heatmap, "ctrl+alt+r", "heatmap range use \"Clip 1-99%\"")
bind_commands(h5v.modes.Global, "ctrl+k", { "down 2", "up 1" })
bind_script(h5v.modes.Global, "ctrl+s", "down 2\nup 1")
bind_lua(h5v.modes.Global, "ctrl+l", function(ctx)
ctx.command("help reload")
end)
bind(h5v.modes.Heatmap, "ctrl+z", h5v.actions.HeatmapZoomIn)
Heatmap defaults
Heatmap settings live under h5v.heatmap:
default_rangedefault_colormapdefault_normalizationdefault_invert_xdefault_invert_ydefault_invert_crange_modes
Example
h5v.theme = "light"
h5v.content_mode_order = { "matrix", "preview" }
h5v.symbol_theme = "compatibility"
h5v.compatibility = true
h5v.heatmap.default_colormap = "inferno"
h5v.heatmap.default_normalization = "log"
h5v.heatmap.default_invert_c = true
bind(h5v.modes.Global, "ctrl+h", h5v.actions.ShowHelp)
h5v.colors.accent.selection_bg = "#e1c878"
h5v.colors.tree.group = "#d26c00"
h5v.colors.surface.panel_border = "#1e3755"
h5v.symbols.tree.dataset_link_icon = "D@"
h5v.symbols.tree.load_more_label = "v Load more"
h5v.symbols.title.matrix_tab = "Matrix"
h5v.symbols.chart.visibility_visible = "*"
The built-in light theme is a good starting point for a bright palette plus a few targeted overrides:

Use h5v.themes.<name> and h5v.symbol_themes.<name> as built-in catalogs when you want to copy values from a shipped theme.
Configuration reference
Core config fields
| Field | Type | Notes |
|---|---|---|
h5v.theme | string | Built-in color theme name |
h5v.symbol_theme | string | Built-in symbol theme name |
h5v.compatibility | boolean | Compatibility mode override from config |
h5v.content_mode_order | string array | Ordered content-mode preference |
h5v.heatmap | table | Preferred heatmap defaults and custom range presets |
h5v.multichart | table | Multichart overview sampling and viewport-refinement tuning |
h5v.keymaps | table | Scoped keymap overrides and command bindings |
h5v.colors | table | Per-key color overrides |
h5v.symbols | table | Per-key symbol overrides |
h5v.themes.<name> | table | Built-in color catalogs |
h5v.symbol_themes.<name> | table | Built-in symbol catalogs |
h5v.log("message") | function | Show a small info toast while config runs |
Built-in themes
| Theme |
|---|
dark |
light |
Built-in symbol themes
| Theme |
|---|
rich |
compatibility |
Content modes
| Mode |
|---|
preview |
matrix |
heatmap |
heatmap in h5v.content_mode_order only affects preferred tab order. Heatmap appears only when compatibility mode is off and terminal image rendering is available.
Color categories
| Category | Purpose |
|---|---|
accent | Selection, highlight, and search accents |
text | Text rendering |
content | Header, tabs, empty states |
command | Minibuffer text |
help | Help overlay text |
metadata | Metadata labels and values |
file | File preview labels and values |
mchart | Multichart list and prompt colors |
surface | Backgrounds, borders, highlights |
tree | Tree lines and node colors |
chart | Axes, grids, plot area, chart series |
status | Read-only, writable, linked, update status |
toast | Toast border colors |
Symbol categories
| Category | Purpose |
|---|---|
tree | Tree connectors, arrows, icons |
section | Metadata section titles |
title | Panel and dialog titles |
badge | Header badges and linked markers |
chart | Multichart markers and enum symbols |
Accepted color values
Hex values: #RRGGBB
| Canonical name | Accepted aliases |
|---|---|
black | black |
red | red |
green | green |
yellow | yellow |
blue | blue |
magenta | magenta, purple |
cyan | cyan |
gray | gray, grey |
darkgray | darkgray, darkgrey, dark_gray, dark_grey |
lightred | lightred, light_red, pink |
lightgreen | lightgreen, light_green |
lightyellow | lightyellow, light_yellow |
lightblue | lightblue, light_blue |
lightmagenta | lightmagenta, light_magenta |
lightcyan | lightcyan, light_cyan |
white | white |
amber | amber |
orange | orange |
Color override keys
| Group | Keys |
|---|---|
text | primary, number, string, opaque, bool_value, error, search_text, search_count, type_desc, line_num |
content | app_brand, app_version, help_hint, empty_state, tab_active, tab_inactive, tree_membership_more |
command | prompt_prefix, usage, description, suggestion_label, no_match, key_hint |
help | title, section, description, muted |
metadata | section, property_name, property_value, attribute_name |
file | section_title, label, value |
mchart | empty_state, item_selected, item_selected_hidden, item_visible, item_hidden, prefix_selected, prefix, detail_label, prompt_prefix |
surface | title_bg, focus_bg, bg, bg_val1, bg_val2, bg_val3, bg_val4, break_line, highlight_bg, highlight_bg_copy, panel_border, panel_title, help_key_bg, image_border |
tree | lines, root_file, variable, variable_builtin, file, group, compound_name, dataset, dataset_file, compound, load_more |
accent | selected_index, selected_dim, equal_sign, symbol, selection_fg, selection_bg, search_highlight, search_icon |
chart | axis, grid, label, preview_line, plot_bg, series_1 to series_8, enum_1 to enum_8 |
status | readonly, writable, linked, compability, update_available |
toast | info, warning, neutral |
Symbol override keys
| Group | Keys |
|---|---|
tree | horizontal_rule, connector_last, connector_middle, vertical_guide, collapse_expanded, collapse_collapsed, folder_open_branch, folder_open_leaf, folder_closed_branch, folder_closed_leaf, root_file_icon, dataset_icon, dataset_link_icon, compound_container_icon, compound_leaf_icon, link_marker, broken_node_icon, load_more_label |
section | properties_title, attributes_title |
title | preview, tree, meta, file_metadata, empty_group, empty_dataset, error, create_attribute, delete_attribute, fixed_string_overflow, fixed_string_resize, help, matrix_tab |
badge | readonly, writable, linked, linked_root_suffix, compatibility_mode |
chart | membership_marker, visibility_visible, visibility_hidden, enum_1 to enum_8 |
Example
h5v.theme = "dark"
h5v.symbol_theme = "rich"
h5v.colors.accent.selection_bg = "lightblue"
h5v.colors.chart.series_1 = "#ff8800"
h5v.symbols.title.preview = "Plot"
h5v.symbols.tree.dataset_icon = "D"
Heatmap config
| Field | Type | Notes |
|---|---|---|
h5v.heatmap.default_range | string | Preferred starting range preset |
h5v.heatmap.default_colormap | string | turbo, grayscale, or inferno |
h5v.heatmap.default_normalization | string | linear, log, or sqrt |
h5v.heatmap.default_invert_x | boolean | Preferred X-axis inversion |
h5v.heatmap.default_invert_y | boolean | Preferred Y-axis inversion |
h5v.heatmap.default_invert_c | boolean | Preferred colormap inversion |
h5v.heatmap.range_modes | table array | Custom selectable range presets |
Example:
h5v.content_mode_order = { "heatmap", "preview", "matrix" }
h5v.heatmap.default_range = "MIN/MAX"
h5v.heatmap.default_colormap = "inferno"
h5v.heatmap.default_normalization = "log"
h5v.heatmap.default_invert_y = true
h5v.heatmap.default_invert_c = true
h5v.heatmap.range_modes = {
{ label = "5-80%", min = "5%", max = "80%" },
}
Multichart config
| Field | Type | Notes |
|---|---|---|
h5v.multichart.overview_max_samples | integer | Cap for the initial background overview sample |
h5v.multichart.detail_enabled | boolean | Enable viewport-driven detail refinement |
h5v.multichart.detail_samples_per_column | integer | Width multiplier used to pick detail sample count |
h5v.multichart.detail_min_samples | integer | Lower clamp for viewport detail samples |
h5v.multichart.detail_max_samples | integer | Upper clamp for viewport detail samples |
h5v.multichart.detail_padding_ratio | number | Extra x-range loaded around the visible viewport |
h5v.multichart.derived_detail_enabled | boolean | Allow derived series to refine when inputs share detail windows |
Example:
h5v.multichart = {
overview_max_samples = 2048,
detail_enabled = true,
detail_samples_per_column = 6,
detail_min_samples = 1024,
detail_max_samples = 32768,
detail_padding_ratio = 0.1,
derived_detail_enabled = true,
}
Keymap config
Scopes:
| Scope | Notes |
|---|---|
h5v.keymaps.global | Available in non-text-entry modes regardless of focus |
h5v.keymaps.normal | Normal mode bindings before focus-specific scopes |
h5v.keymaps.window | Follow-up keys after the window chord action |
h5v.keymaps.tree | Tree focus in normal mode |
h5v.keymaps.content | Preview, matrix, and shared content bindings |
h5v.keymaps.heatmap | Heatmap-only bindings |
h5v.keymaps.attributes | Attributes focus in normal mode |
h5v.keymaps.mchart | Multichart navigation/view bindings |
Each scope table accepts:
| Field | Type | Notes |
|---|---|---|
clear_defaults | boolean | Remove the shipped bindings for that scope before applying overrides |
unbind | string array | Remove specific shipped bindings by key |
bind | table array | Add built-in actions or command bindings |
Each bind entry accepts:
| Field | Type | Notes |
|---|---|---|
key | string | Key spec such as ctrl+h, PageDown, ?, or ctrl+alt+r |
action | string | Built-in action id for that scope |
command | string | Command text executed through the normal command parser |
commands | string array | Command list executed like a startup script |
script | string | Startup-script text executed on keypress |
lua | function | Lua callback receiving ctx.command, ctx.commands, and ctx.script helpers |
description | string | Optional help text stored with the binding definition |
An entry must set exactly one of action, command, commands, script, or lua.
Helper functions:
| Function | Notes |
|---|---|
bind(mode, key, action[, description]) | Append a built-in action binding using h5v.modes.* and h5v.actions.* constants |
bind_command(mode, key, command[, description]) | Append a command-backed binding |
bind_commands(mode, key, commands[, description]) | Append a startup-script-style command list |
bind_script(mode, key, script[, description]) | Append one script string using startup-script parsing |
bind_lua(mode, key, callback[, description]) | Append a Lua callback |
unbind(mode, key) | Append one key to the scope unbind list |
Common mode constants: h5v.modes.Global, h5v.modes.Normal, h5v.modes.Window, h5v.modes.Tree, h5v.modes.Content, h5v.modes.Heatmap, h5v.modes.Attributes, h5v.modes.Multichart.
Example:
bind(h5v.modes.Global, "ctrl+h", h5v.actions.ShowHelp)
unbind(h5v.modes.Heatmap, "v")
bind(h5v.modes.Heatmap, "ctrl+z", h5v.actions.HeatmapZoomIn)
bind_command(h5v.modes.Heatmap, "ctrl+alt+r", "heatmap range use \"Clip 1-99%\"")
bind_commands(h5v.modes.Global, "ctrl+k", { "down 2", "up 1" })
bind_lua(h5v.modes.Global, "ctrl+l", function(ctx) ctx.command("help reload") end)
Multichart

Multichart is the comparison workspace for previewable series.
Sources:
- the currently selected previewable tree selection
- an explicit dataset reference
- an expression-defined series
Basic workflow
- Add a series with
mormchart add .... - Press
Mor runmchart opento enter the workspace. - Press
Enterto open a new expression, oreto edit the selected series. - Build derived series with expressions such as
$1 - $2,($1, !/time[..]), or$1[0..256]. - Use zoom and pan to inspect the area of interest.
Groups with H5V_PREVIEW_EXPR also work here. Pressing m on /group_preview adds the group preview expression as a chart item.
Expression editor
Enteropens a new expression without changing the chart viewporteedits the selected series in placeEntersubmits the current expressionTabcompletes the selected suggestionUpandDownmove through suggestions while editingEsccloses the editor
The editor validates expressions live and suggests chart item ids, dataset paths, and attribute references.
Raw dataset references such as !/big_dataset[..] are queued and loaded in the background when submitted.
Zoomed dataset-backed views can request a denser viewport sample in the background while the coarse overview stays visible.
Derived series can also refine to viewport detail when their referenced chart-item inputs share the same loaded detail window.
Config
Use h5v.multichart = { ... } in Lua to tune large-series behavior.
overview_max_sampleslimits the initial background overview sampledetail_enabledturns viewport-driven detail refinement on or offdetail_samples_per_columnscales viewport detail against chart widthdetail_min_samplesanddetail_max_samplesclamp viewport detail sizedetail_padding_ratioloads extra x-range around the visible viewportderived_detail_enabledlets derived series refine when inputs share the same detail window
Visibility and organization
- move through chart items with
j/k - hide or show an item with
Spaceorv - remove the selected item with
d,Backspace, orDeletewhen nothing depends on it - clear the whole workspace with
C - open multichart help with
?
Zoom and pan
+,=, orShift+Upto zoom in-orShift+Downto zoom outh/Shift+Leftto pan leftl/Shift+Rightto pan rightfto fit all visible seriesFto fit the selected seriescto reset zoom
Mouse interaction follows the same anchored viewport model as heatmap:
- wheel zoom over the plot anchors to the hovered point
- plain wheel zoom changes both x and y
Ctrl+ wheel zoom changes x onlyShift+ wheel zoom changes y only- right-click drag snapshots on press and pans on release
The same actions are available from the command line, including mchart fit ... and axis-specific zoom like mchart zoom x in 20.
Expression workflows
See Multichart expressions for syntax and Command reference for the full mchart command surface.
Multichart expressions
Supported references
Multichart expressions can refer to existing chart items, datasets, and attributes directly, but the reference type is always explicit.
| Syntax | Meaning |
|---|---|
$1 | Chart item series by workspace id |
$1[0..256] | Chart item series slice by sample range |
!/dataset | Dataset series |
!/dataset[..,0] | Dataset series with explicit slicing |
!/group:trace | Series-valued attribute on a group or dataset |
!$1:trace | Series-valued attribute on the dataset backing chart item $1 |
#/group/scalar | Scalar dataset value |
#/group/ds:BIAS | Scalar attribute on a group or dataset |
#$1:SCALE | Scalar attribute on the dataset backing chart item $1 |
Y-series and x/y-series
An expression can produce:
- a normal y-series
- a tuple-based x/y series
Examples:
$1 * #$1:SCALE
!/signals/sine_wave + #/group_preview/offset
$1[0..512] - $2[128..640]
($1 * #/group_preview:scale, !/group_preview/time)
The tuple form is the most important one for custom x/y plots because it gives you explicit control over both axes.
The same syntax is also used by group preview expressions. In the bundled example, /group_preview defines:
(!/group_preview/time, (!/group_preview/value - #/group_preview/offset) * #/group_preview:scale)
Here is an example of a parametric x/y series using sine and cosine signals to form a circle:
(!/signals/sine_wave, !/signals/cosine_wave)

Interactive prompt
Open the expression prompt with:
Enterorein multichart mode, ormchart prompt
The editor stays below the chart, so opening it does not change the plot viewport.
Enter starts a new expression. e loads the selected series expression so you can update it in place.
EntersubmitsTabapplies the selected suggestionUpandDownmove through suggestionsEsccloses the editor
Invalid expressions are reported inline. Suggestions include chart item ids, dataset paths, and attribute names when they can be resolved from the current file.
Practical tips
- add a raw dataset first so you have stable
$1,$2, and$3references to build from - use
$id[start..end]when you want to align or compare only part of an existing chart item - use
:ATTRonly when you want an explicit attribute lookup on an object or dataset-backed chart item - prefer explicit dataset slicing when the same dataset can be interpreted several ways
Troubleshooting and limits
"Cannot edit in read-only mode"
h5v only writes when the file is opened with -w:
h5v -w file.h5
If you forget -w, edit actions report that the file must be reopened in write mode.
An image dataset does not render as an image
Check the image metadata:
CLASSmust beIMAGEIMAGE_SUBCLASSmust be a supported image subclass- truecolor and indexed images also need
INTERLACE_MODE
See Image conventions.
The UI is blank or badly garbled
Try:
h5v --no-terminal-graphics file.h5
If the terminal also struggles with richer symbols or line drawing:
h5v --compatibility file.h5
Compatibility mode switches to simpler symbols and text/braille fallbacks. Multichart also falls back to a terminal-native braille plot.
See Installation for persistent compatibility settings.
A compound dataset does not show in matrix mode
That is expected for the compound container itself. The root node shows a schema preview. Drill down to a projected leaf field for preview or matrix rendering.
Large fixed strings look truncated
Fixed strings are read with a 32768 byte cap.
Very large previews are chunked
Chart previews are segmented with a maximum segment size of 250000 elements. Use PageUp and PageDown to move through the data.
A numeric preview fails to render bounds
If the current slice contains only invalid numeric values such as NaN or infinity, h5v cannot compute chart bounds.
Very wide or tall images
If an image is much wider or taller than the content pane, h5v may switch to a pannable windowed view instead of shrinking it aggressively.
Use /images/wide_grayscale from the bundled example file to test this path.