Quick Start
Get started with h5forest in minutes. This guide covers everything you need to begin exploring HDF5 files interactively.
Installation
Install h5forest using pip:
For detailed installation instructions including troubleshooting, see the Installation Guide.
Launch h5forest
Open any HDF5 file:
You'll see the interactive interface with several panels:
- Tree Panel (left): Hierarchical view of your HDF5 file structure
- Metadata Panel (bottom left): Information about the selected item
- Attributes Panel (bottom right): HDF5 attributes for the selected item
- Hotkeys Panel (bottom): Context-sensitive keyboard shortcuts
Configuration
h5forest creates a configuration file on first run that lets you customize key bindings and behavior.
Config File Location
The configuration file is automatically created at:
You can edit this file with any text editor to customize h5forest to your preferences.
Enabling Vim Motions
If you're familiar with Vim, you can enable Vim-style navigation keys (h, j, k, l) for tree navigation:
- Open
~/.h5forest/config.yamlin your text editor - Set
vim_mode: truein theconfigurationsection:
- Save and restart
h5forest
When Vim mode is enabled:
h- Move left (collapse group)j- Move downk- Move upl- Move right (expand group)- Arrow keys continue to work alongside Vim keys
Reserved Keys in Vim Mode
When Vim mode is enabled, the keys h, j, k, and l are reserved for navigation and cannot be remapped to other functions.
Customizing Key Bindings
You can customize any key binding in the config file. For example, to change the quit key from q to Q:
See the config file comments for a complete list of customizable key bindings. For more details on configuration options, see the Configuration Guide.
Basic Navigation
Moving Around
- Use arrow keys to navigate the tree (or hjkl if you've enabled Vim mode)
{and}to jump up/down 10 lines at a time- Enter to expand or collapse groups
Viewing Data
When you select a dataset (not a group), you'll see its metadata including:
- Shape and data type
- Compression information
- Memory usage
- Number of attributes
Your First Exploration
Let's walk through a typical workflow:
1. Navigate the Tree Structure
▼ my_simulation.h5
▼ PartType0
▶ Coordinates
▶ Masses
▶ Velocities
▼ PartType1
▶ Coordinates
▶ Masses
Use arrow keys to move between items. Groups (folders) have triangular arrows, datasets (files) don't.
2. Expand Groups
Press Enter on a group to expand it and see its contents.
3. Examine a Dataset
Navigate to a dataset like Coordinates. The metadata panel will show:
Dataset: /PartType0/Coordinates
Shape: (1000000, 3)
Datatype: float32
Compressed Memory: 11.4 MB
Compression: gzip
4. Enter Dataset Mode
Press d to enter Dataset Mode. Now you have additional options:
v- View dataset values (truncated for large arrays)m- Get minimum and maximum valuesM- Calculate mean values- Calculate standard deviation
5. View Values
Press v to see actual data values:
6. Generate Statistics
Press m to get min/max values. For large datasets, you'll see a progress bar as h5forest efficiently processes the data in chunks.
Understanding Modes
h5forest uses a modal interface (similar to Vim) where different keyboard shortcuts become active depending on your current task:
| Key | Mode | Purpose |
|---|---|---|
| Default | Normal Mode | Navigate the file tree |
s |
Search Mode | Find datasets and groups |
d |
Dataset Mode | Analyze data and compute statistics |
g |
Goto Mode | Jump to specific locations |
w |
Window Mode | Manage panel layout |
p |
Plotting Mode | Create scatter plots |
H |
Histogram Mode | Generate histograms |
Press q to exit any mode and return to Normal Mode. The hotkeys panel at the bottom always shows what's available in your current mode.
Quick Reference
Essential Keys
q- Quit (works in any mode)Ctrl+Q- Force quit- Escape - Return to Normal Mode
A- Toggle expanded attributes panel
Mode Switching
s- Search mode (fuzzy find datasets/groups)d- Dataset analysis modeg- Goto navigation modew- Window management modep- Plotting modeH- Histogram mode
Dataset Mode
v- View valuesV- View values in range (prompts for indices)m- Min/Max statisticsM- Mean calculations- Standard deviation
Tips for Success
Vim Users
If you're familiar with Vim, you'll feel right at home with the modal interface. Enable Vim mode to use hjkl navigation keys!
Terminal Compatibility
For the best experience, use a modern terminal emulator with Unicode and 256-color support.