Configuration

Hei-DataHub uses a simple YAML config file for customization. Most settings have sensible defaults—you only need to configure what you want to change.


Config File Location

The config file is located at:

~/.hei-datahub/config.yaml

On first run, Hei-DataHub creates this file with default values.


Full Example

# Hei-DataHub Configuration
# ~/.hei-datahub/config.yaml

# Data storage
data:
  path: ~/.hei-datahub/data.json
  auto_save: true
  backup_on_start: true
  max_backups: 5

# Display settings
display:
  theme: auto          # auto, light, dark
  date_format: "%Y-%m-%d"
  show_item_count: true
  default_view: categories  # all, categories, locations, tags

# Search behavior
search:
  fuzzy: true
  case_sensitive: false
  highlight_matches: true
  max_results: 50

# Keybindings (vim-style by default)
keys:
  quit: "q"
  add: "a"
  edit: "e"
  delete: "d"
  search: "/"
  help: "?"

# Categories (pre-defined list)
categories:
  - Electronics
  - Books
  - Tools
  - Documents
  - Supplies
  - Archive

# Default values for new items
defaults:
  category: Uncategorized
  location: Unknown
  quantity: 1

Configuration Options

data

OptionTypeDefaultDescription
pathstring~/.hei-datahub/data.jsonPath to inventory data file
auto_savebooltrueSave automatically on changes
backup_on_startbooltrueCreate backup when launching
max_backupsint5Number of backups to keep

display

OptionTypeDefaultDescription
themestringautoColor theme: auto, light, dark
date_formatstring%Y-%m-%dDate display format
show_item_countbooltrueShow item counts in categories
default_viewstringcategoriesStarting view on launch
OptionTypeDefaultDescription
fuzzybooltrueEnable fuzzy matching
case_sensitiveboolfalseCase-sensitive search
highlight_matchesbooltrueHighlight matched text
max_resultsint50Maximum search results

keys

Customize keybindings. Use standard key notation:

keys:
  quit: "Ctrl+q"
  add: "n"           # Use 'n' for new instead of 'a'
  search: "Ctrl+f"   # Familiar shortcut

categories

Pre-define categories that appear in the category picker:

categories:
  - Electronics
  - Books
  - Kitchen
  - Garage
  - Office

You can always create new categories on the fly when adding items.

defaults

Set default values for new items:

defaults:
  category: Home
  location: Living Room
  quantity: 1

Environment Variables

Override config values with environment variables:

VariableDescription
HEI_DATA_PATHOverride data file location
HEI_CONFIG_PATHOverride config file location
HEI_THEMEForce theme (light or dark)
NO_COLORDisable colors in output

Example:

HEI_THEME=dark hei-datahub

Multiple Inventories

Run separate inventories by pointing to different data files:

# Work inventory
HEI_DATA_PATH=~/work-inventory.json hei-datahub

# Home inventory
HEI_DATA_PATH=~/home-inventory.json hei-datahub

Or create aliases in your shell:

# ~/.zshrc or ~/.bashrc
alias hei-work='HEI_DATA_PATH=~/work-inventory.json hei-datahub'
alias hei-home='HEI_DATA_PATH=~/home-inventory.json hei-datahub'

Reset Configuration

To reset to defaults, delete the config file:

rm ~/.hei-datahub/config.yaml

Hei-DataHub will recreate it on next launch.


Next Steps