Projects, permissions, and trust
Projects group sessions and define the roots Hya can work in. One Project can
include several directories, such as a frontend and an API. Run hya from a
Project directory to open it, or use hya --continue to resume its latest
session. Project trust determines which checkout resources Hya loads.
Permission rules determine which actions can run.
Managing Projects (/project)
Type /project inside Hya to open the full-screen Projects manager:
Enterswitches to the highlighted Project and opens its latest chat.ncreates a new Project (give it a name, then add one or more folder paths withTabcompletion).eadds, removes, or reorders the folders (roots) of a Project (the first folder in the list is the primary root).topens a Temporary Session (--temp) in an isolated scratch folder when you want to ask a quick question unrelated to any project.
Choose which checkout resources to load
Keep shared configuration and extensions in the repository’s .hya/
directory. This includes .hya/config.toml, .hya/bundles/, .hya/plugins/,
.hya/commands/, and .hya/workflows/. A machine-local
.hya/config.local.toml can override the shared config. Keep personal rules,
remembered grants, and trust decisions in your user-local
<config-dir>/permissions.toml.
| Trust | Effect |
|---|---|
limited |
Open with user-local resources. Skip repository config, bundles, plugins, workflows, commands, and skills. |
all |
Also load resources from the trusted checkout, including repository skills. |
none |
Block opening the directory. |
Both limited and all load general-path skills from
<config-dir>/skills, ~/.claude/skills, ~/.codex/skills, and
~/.agents/skills. In a multi-root Project, a saved none on any root
blocks the Project. Each all root can contribute its own repository
resources. Limited and undecided roots contribute user-local policy only.
When you open an undecided directory, the TUI pauses before loading Project
configuration and shows the canonical path and detected artifacts. Choose
Trust All or Limited to save the decision. Do not trust and
Esc exit on startup or cancel a Project switch, leaving the decision
unset. To persist a block, run hya trust <path> none, use /trust none,
or set trust = "none" in that directory’s permissions table.
Headless openings use limited trust for undecided directories. For an
in-process command, --trust all or --trust limited overrides trust for
that invocation without saving it. A saved block takes precedence. ACP
and commands routed to an existing daemon use that daemon’s trust policy.
hya trust show /home/alex/src/apphya trust set limited /home/alex/src/apphya trust list --jsonhya --trust all exec "Summarize this project"Folder boundaries
File tools check paths, including symlinks, against the active Project roots.
Outside those roots they also check ExternalDir rules and
additional_directories. Without a matching rule or authorized directory,
the selected mode decides whether to ask, allow, or deny. Bash uses command
rules because a shell command can access files anywhere your account can.
Choose a permission mode
Use /permissions to pick a mode, /permissions plan to select one
directly, or Shift+Tab to cycle. Available bundle modes follow the five
built-in choices and use IDs of the form <bundle-id>/<mode-id>.
| Mode | Behavior after explicit rules |
|---|---|
default |
Allow read-only operations and ask for other actions. |
accept_edits |
Also allow edits and writes within the Project boundary. |
plan |
Allow read-only analysis and ask before mutations. |
dont_ask |
Allow read-only operations and explicit grants. Deny actions that require approval, including matching ask rules. |
bypass |
Skip prompts. Explicit denials still apply with the default bypass_ignores_deny = false. |
The TUI asks for confirmation before first switching into bypass.
Legacy session labels manual and yolo correspond to default and
bypass. In permissions.toml, yolo and danger resolve to
bypass, strict asks even for reads by default, and allow approves
unmatched actions. acceptEdits and auto_edits resolve to
accept_edits, dontAsk to dont_ask, and bypassPermissions to
bypass.
Write rules in permissions.toml
Save this example beside your user config.toml. Replace the Project key
with the canonical absolute path reported by hya trust show. Set
permission_preset = "review" in your user config or active profile to use
the preset.
#:schema https://hya.ed-aisys.com/schema/v3/permissions.jsonschema_version = 1default_mode = "default"bypass_ignores_deny = falsedeny = ["Read(.env)"]ask = ["Bash(git push *)"]allow = ["Bash(git status)"]additional_directories = ["/home/alex/reference"]
[presets.review]default_mode = "plan"allow = ["Bash(git diff *)"]
[projects."/home/alex/src/app"]trust = "limited"allow = ["WebFetch(domain:docs.rs)"]Hya combines rules from the user-wide lists, selected preset, and matching
Project roots. It checks deny, then ask, then allow across all
scopes. For example, the global Read(.env) denial wins over a Project
allow for that path. If no rule matches an external-directory check, a
directory inside additional_directories is allowed. Otherwise the
selected mode supplies the fallback.
Rules use Claude Code-style Tool(pattern) strings. A bare operation
matches the whole operation, and * matches any sequence of characters.
| Rule | Worked match |
|---|---|
Bash(git status) |
Exact trimmed command git status. |
Bash(git diff *) |
Matches git diff HEAD, with a literal space before *. |
Bash(re:^git (status|diff)$) |
Rust regex matching either git status or git diff. |
Read(./src/*) |
Reads and grep resources under src/ relative to the call’s working directory. Leading ./ is optional. |
Edit(src/*) |
Edits and writes under src/. |
Write(notes.md) |
Writes to notes.md in the call’s working directory. |
WebFetch(domain:docs.rs) |
Fetches from the exact host docs.rs. Use domain:*.example.org for subdomains or https://docs.rs/* as a URL glob. |
WebSearch(Rust *) |
Search queries such as Rust TOML parser. Bare WebSearch matches any query. |
mcp__github__* |
Tools on the github MCP server. Mcp(github:list_issues) matches one tool. |
Skill(review) |
The skill named review. |
Tool(my_plugin__run) |
The named tool. A bare my_plugin__run also works. |
ExternalDir(/tmp/output) |
An exact absolute external directory. |
See the configuration reference for field types, file selection, and preset merging.
Answer prompts and manage saved rules
In a permission prompt, press 1 for Allow once, 2 for Always
allow, or 3 or Esc to deny. Always allow saves a concrete rule
in the user-wide or Project allow list. Use /rules to inspect rules
by text, bucket, and scope, d then Enter to delete one, or r to
refresh.
hya permissions add allow 'Bash(git status)' --project .hya permissions show --dir . --jsonhya permissions list --jsonhya permissions revoke 'Bash(git status)' --project .Omit --project to add or revoke by text at user scope. To revoke a
specific rule and bucket, pass its ID from the list. See the
CLI reference
for the full command and output contracts.