Hya resolves four per-user roots. A nonempty HYA_HOME sets all four.
Otherwise each root uses its own XDG override, then its path under HOME.
Empty root variables are treated as unset.
| Root |
With HYA_HOME |
XDG override |
Home default |
| Config |
$HYA_HOME/config |
$XDG_CONFIG_HOME/hya |
~/.config/hya |
| Data |
$HYA_HOME/data |
$XDG_DATA_HOME/hya |
~/.local/share/hya |
| State |
$HYA_HOME/state |
$XDG_STATE_HOME/hya |
~/.local/state/hya |
| Cache |
$HYA_HOME/cache |
$XDG_CACHE_HOME/hya |
~/.cache/hya |
Run HYA_HOME=/srv/hya hya config paths --json to inspect resolved locations
for an isolated installation.
| Root |
Relative path |
Purpose |
| Config |
config.toml |
Backend config v3. --config wins over HYA_CONFIG. |
| Config |
models.toml |
Model declarations v1. Defaults beside the active base config. |
| Config |
permissions.toml |
User-local rules, presets, remembered grants, and Project trust. Defaults beside the active base config, usually $XDG_CONFIG_HOME/hya/permissions.toml or $HYA_HOME/config/permissions.toml. |
| Config |
profiles/*.toml |
Standalone profiles beside the active base config. |
| Config |
bundles/<ns>/<name>.toml |
External bundle defaults beside the active base config. |
| Config |
tui.toml |
Declarative TUI config v2. |
| Config |
skills/, commands/, workflows/ |
User skills, slash commands, and Workflows. |
| Data |
auth.json |
API keys and OAuth credentials. On Unix Hya writes the file with mode 0600 and creates its directory with mode 0700 when missing. |
| Data |
bundles/registry.sqlite3 |
Installed user bundle registry under bundles/. |
| State |
sessions.db |
SQLite event log and Projects. |
| State |
tui-state.json |
Interactive preferences and pane layout. |
| State |
sessions.db.{server.json,runtime-owner.lock,server.log} |
Daemon discovery, single-writer lock, and log. These follow a custom --db path. |
| State |
sessions.db.relay-identity.json |
Relay identity and link PSK (0600). Follows the database path. |
| State |
hya.log |
Terminal launcher and WebUI log (rotates at 4 MiB). |
| Cache |
models-registry.json |
Cached models.dev registry document. |
| Cache |
models-discovered/<provider>.json |
Per-provider model discovery cache. |
| Cache |
scratch/<session_id>/ |
Working directory for temporary sessions. |
Project-local folder (<project-root>/.hya/)
Hya reads shared .hya/config.toml and machine-local .hya/config.local.toml
only under registered Project roots with all trust. See the
configuration reference
for the restrictions on these files.
Project-local resources include the following.
<root>/AGENTS.md — Project instructions
<root>/.hya/skills/<name>/SKILL.md (and <root>/.agents/skills/<name>/SKILL.md) — Project skills
<root>/.hya/commands/**/*.md — Project slash commands
<root>/.hya/workflows/*.hya.md — Project Workflows
<root>/.hya/bundles/<dir>/ — Project bundles (and their config.toml)
<root>/.hya/plugins/<name>/plugin.toml — Project plugins
2. Environment variables
Directory and configuration overrides
| Variable |
Meaning |
HYA_HOME |
Common parent for the config, data, state, and cache roots. |
XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_STATE_HOME, XDG_CACHE_HOME |
Individual parent directories, with hya/ appended. |
HOME |
Parent for the default roots when explicit overrides are absent. |
HYA_CONFIG_HOME |
Deprecated Workflow-only fallback. Workflow looks here after HYA_HOME/config and XDG_CONFIG_HOME/hya, before ~/.config/hya. |
HYA_CONFIG |
Base TOML file, overridden by --config. |
HYA_PROFILE |
Standalone profile name, overridden by --profile. |
HYA_PERMISSIONS_CONFIG |
A nonempty path overrides the active profile or base config’s permissions_file and the sibling permissions.toml default. |
HYA_MODELS_CONFIG |
Models file path, overriding models_file and the sibling default. |
HYA_DISABLE_MODELS_FETCH |
Set to 1 to skip remote models.dev registry sync. |
HYA_DISABLE_LOCAL_DISCOVERY |
Set to 1 to disable automatic local provider discovery. |
HYA_TUI_TOML |
Explicit declarative TUI path. Defaults to a sibling tui.toml of HYA_TUI_CONFIG if set, then the config root. |
HYA_TUI_STATE |
Explicit saved TUI state path. Falls back to HYA_TUI_CONFIG, then state-root tui-state.json. |
HYA_TUI_CONFIG |
Legacy TUI saved-state override. Also supplies the sibling TOML location when HYA_TUI_TOML is unset. |
HYA_PLUGIN_CONFIG_JSON |
Set for a plugin child process with the JSON serialization of its configuration table. |
Everyday runtime & model overrides
| Variable |
Default |
Meaning |
HYA_MODEL |
config.toml default_model |
Default model when --model is not passed on the CLI. |
HYA_RELAY_LINK |
— |
Secret hya://... link read by hya --connect and hya bridge when - is not used (scrubbed from child environments after reading). |
SSL_CERT_FILE |
System + WebPKI roots |
Custom PEM CA bundle for outbound HTTPS provider calls behind corporate proxies. |
VISUAL / EDITOR |
vi |
External text editor opened by /editor and /config edit. |
Context, compaction & subagent overrides (env wins over the config files)
| Variable |
Default |
Overrides |
HYA_COMPACTION_KEEP_RECENT |
6 |
compaction.keep_recent in hya/compaction’s TOML settings (read by the bundle) |
HYA_COMPACTION_SUMMARY_MAX_TOKENS |
4096 |
compaction.summary_max_tokens in hya/compaction’s TOML settings (the terminal handoff cap, read by hya/multi-agent at start) |
HYA_PROVIDER_RETRY_MAX_ATTEMPTS, HYA_PROVIDER_RETRY_BACKOFF_BASE_MS, HYA_PROVIDER_RETRY_BACKOFF_MAX_MS |
Route retry settings |
Override the effective retry fields. The backoff values are in milliseconds. |
HYA_TOKEN_ACCOUNTING |
auto |
config.toml context.token_accounting (auto | provider | estimate); an unknown value is ignored |
HYA_SUBAGENT_MAX_CONCURRENCY |
100 |
subagents.max_concurrency |
HYA_SUBAGENT_BUDGET |
1024 |
subagents.per_run_budget |
HYA_SUBAGENT_TURN_BUDGET |
1024 |
subagents.per_team_turn_budget |
HYA_SUBAGENT_MESSAGE_BUDGET |
1024 |
subagents.per_team_message_budget |
Provider preset key variables are listed in Models, Providers & Auth.
Built-in bundle selection and development overrides are listed in the
CLI reference.
Installer variables (install.sh)
| Variable |
Default |
Meaning |
HYA_VERSION |
Latest stable |
Version tag to install (same as --version). |
HYA_INSTALL_DIR |
$HOME/.local |
Target prefix directory (same as --prefix). |
HYA_RELEASES_URL |
https://github.com/chrono-foundry/hya/releases |
Mirror URL for release archives and SHA256SUMS. |
HYA_REPO |
chrono-foundry/hya |
GitHub owner/repo used to construct the default releases URL. |
HYA_TARGET |
Auto-detected |
Override target triple (x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, aarch64-apple-darwin). |
Advanced, developer & diagnostic variables
| Variable |
Default |
Meaning |
BUN |
Bundled lib/hya/bin/bun, else PATH |
Path to the bun executable used for TUI, WebUI, and Bun extensions. |
HYA_BIN |
PATH |
Path to hya binary used when launching packages/hya-tui directly from source. |
HYA_TUI_DIR / HYA_TUI_WEB_DIR |
<prefix>/lib/hya/{tui,tui-web} |
Override frontend package directories for bare hya. |
HYA_BUN_ADAPTER_DIR / HYA_CLAUDE_ADAPTER_DIR |
<prefix>/lib/hya/{bun,claude}-adapter |
Override adapter directories. |
HYA_GRPC_BIND |
— |
Optional extra <host:port> gRPC listener (in addition to single-port gRPC on --bind). |
HYA_DEFER_SIDEPLANES |
1 (deferred) |
Set to 0 or false to block server readiness until all MCP servers finish connecting. |
HYA_EVENT_BUS_CAPACITY |
8192 |
In-memory live broadcast ring buffer size. |
HYA_STARTUP_TRACE |
off |
Set to 1 or true to print JSON startup timing phases on stderr. |
HYA_STARTUP_TRACE_FILE |
— |
Append Backend + TUI startup timing marks as JSONL to this file. |
HYA_BUNDLE_CONFIG_DIR / HYA_BUNDLE_CONFIG_FILE |
Set by Hya |
Passed into bundle/plugin child processes so they can read their config.toml. |
HYA_TERMINAL |
1 (output only) |
Set inside Hya PTY shells so child programs know they are inside Hya. |