Skip to main content
hibi reads two configuration files. The repository’s .hibi/hibi.toml is committed and says what the repository needs. Your user config is private to you and holds everything that runs a program or reads outside the repository. hibi schema config and hibi schema user-config print their JSON Schemas.

.hibi/hibi.toml

hibi init writes this file with version = 1 and commented examples:
Unknown keys are the error invalid_config, as is a file larger than 1 MiB. A scope on a scheme that is neither file, repo nor declared under [schemes] is also invalid_config.

User config

The first that applies:
  1. the path in HIBI_CONFIG, when it is set and not empty. A relative path is taken relative to the working directory;
  2. $XDG_CONFIG_HOME/hibi/config.toml;
  3. ~/.config/hibi/config.toml on Linux and macOS, %APPDATA%\hibi\config.toml on Windows.
A missing file is an empty config. hibi providers prints the path in use.
root and path must be absolute; ~ and environment variables are not expanded. Unknown keys and two entries with the same root and alias are the error invalid_user_config. A provider command runs only when the scheme is declared in the repository’s hibi.toml, your user config has a command for it, and a command needs a locator of that scheme (or you ran hibi providers --check <scheme>). See external providers.

Sibling repositories

A claim in one repository can use evidence from another with a repo:<alias>//<path> locator, such as repo:api//src/lib.rs#timeout_secs. Two steps make it work:
  1. The repository declares the alias:
  2. Each user allows a directory for it in their user config, with a [[repo]] entry whose root is this repository and whose path is the sibling.
Until step 2, sides on that alias are unavailable with reason repo_not_allowed, and both hibi providers and the error message print the exact [[repo]] lines to add, with absolute paths filled in from the suggested location. Files in a sibling are read only when git lists them there. Resolving a repo: locator needs git. Each run checks the sibling before reading anything from it; a failure gives one of two reasons:
--since does not evaluate repo: sides or scopes.

Cache

hibi keeps one SQLite file of cached unit lists (keyed by the file’s git blob id, the resource class, and the hibi version with its unit rules revision) and cached judge answers. The first that applies:
  1. $HIBI_CACHE_DIR/cache.sqlite3;
  2. $XDG_CACHE_HOME/hibi/cache.sqlite3;
  3. ~/.cache/hibi/cache.sqlite3 on Linux and macOS, %LOCALAPPDATA%\hibi\cache.sqlite3 on Windows.
The cache is never committed and never authoritative. Deleting it changes no result of any command except the judge commands, for which it is the only source of repeatable answers. --no-cache makes a run neither read nor write it. A cache that cannot be opened is skipped with the warning cache_unavailable.

Environment variables

Global options

Every command accepts these: hibi completions zsh prints a completion script for zsh. The other shells are bash, fish, powershell and elvish.