2.13.0-beta.20). Features may change before the next stable release.Switch to stable →prefs
ak config prefs resolve
Resolve authored user and current-project preferences with exact merge, spelling, source, privacy, and raw-JSON behavior.
Use ak config prefs resolve to see the preference values that Kit Hooks read
for the current working directory. The command is read-only and works without
network access.
Usage
ak config prefs resolveThe command accepts no positional arguments and has no command-specific flags.
Shared flags are described in CLI conventions. Only
--json changes this command's payload format; --yes and
--no-interactive do not change resolution.
Source order and merge rules
The command considers exactly two paths:
~/.agentkit/config.yaml, or$AGENTKIT_HOME/config.yaml, asuser;<current-working-directory>/.agentkit/config.yamlasproject.
A missing file is recorded as absent and is not an error. An unreadable or malformed file fails the whole resolution so Hooks do not silently fall back when an authored config is broken.
User values are loaded first, then project values are deep-merged over them. Nested project mappings replace only the leaves they name; a scalar or non-mapping project value replaces the corresponding user value. Legacy camel-case and config snake-case spellings are treated as the same field. When both spellings occur in one preference section, the config spelling wins.
Authored values, not defaults
prefs contains only values present in the two files. The command does not
insert binary or Hook defaults. A missing key remains absent, and the consuming
Hook applies its own DEFAULT_CONFIG value.
This distinction matters when comparing CLI and Hook versions: a newer Hook can own a default unknown to an older CLI without the CLI overwriting it.
Included sections and spelling
The resolver emits these preference sections when authored:
assertions, codingLevel, content, docs, gemini, hooks, locale, paths,
plan, privacyBlock, project, simplify, skills, statusline,
statuslineColors, statuslineLayout, statuslineQuota, trust, watch,
workflowArtifactGate, extensionsConfig field names are converted from snake_case to the legacy camel-case
spelling consumed by Hooks. Immediate Hook names under hooks and Skill IDs
under skills remain literal identifiers. Everything below extensions is
passed through without renaming.
Setup-owned sections such as keys, api, provider, updates, and
backups are excluded, preventing the normal provider keys and dashboard
token from reaching Hook output. extensions is user-authored and passed
through verbatim, however. Review it before publishing output. The sources
array also reveals local user and project paths.
Human output
Human stdout first prints both source paths with present or absent. It then
prints the resolved preference object as indented JSON. When no preferences are
authored, it instead prints:
No preferences are set; hooks use their built-in defaults.--quiet does not suppress this command-specific stdout.
JSON output
--json writes exactly one raw JSON document to stdout, with no shared outer
kind or data envelope:
{
"schema_version": 1,
"prefs": {"hooks":{"simplify-gate":false}},
"sources": [
{"scope":"user","path":"/home/user/.agentkit/config.yaml","present":true},
{"scope":"project","path":"/work/project/.agentkit/config.yaml","present":false}
]
}prefs is always an object, and sources always contains the user then
project entries. Value types are preserved from YAML.
Runtime failures do not emit the shared JSON error envelope and can be silent
under --json; use the process exit status and require all three top-level
fields before consuming output. Flag-parse errors can remain plain-text usage.
Exit behavior
| Exit | Meaning | Safe next step |
|---|---|---|
0 | Both candidate sources resolved, including when one or both were absent. | Inspect sources[].present and then prefs. |
1 | An unexpected positional argument, home or working-directory resolution, or reading or parsing a present config failed. | Correct any extra argument; otherwise fix the reported file. |
2 | Flag parsing failed. | Correct the flags. |
The command writes no file, starts no process, creates no backup, and has no preview, apply, force, or rollback path.
Related commands
ak config prefs
Choose a preference lookup, validation, or bounded Hook or journal.auto mutation while preserving scope, defaults, secrets, and backup boundaries.
ak config prefs set
Set one bounded Hook boolean, the journal.auto preference, or the worktree.root default with exact scope, schema, backup, atomic-write, output, and manual-recovery behavior.