docs DocsCapabilitiesGitHub
Reference / Configuration
Reference / Configuration

aide Configuration

Config Location

aide splits its global configuration by concern under ~/.config/aide/ (or $XDG_CONFIG_HOME/aide/ when $XDG_CONFIG_HOME is set):

~/.config/aide/
├── config.yaml         # Global settings: default_profile, agents, preferences, statusline
├── sandbox.yaml        # Security & isolation: capabilities, sandboxes, custom_guards, guard_types, never_allow, never_allow_env, scrub_env
├── provisioning.yaml   # Shared tooling: plugins, mcp_servers, hooks
├── profiles/           # One flat YAML file per profile (no outer profiles: wrapper)
│   ├── work.yaml
│   └── personal.yaml
└── secrets/            # Age-encrypted secret stores (<name>.enc.yaml)

Only config.yaml and the files for sections you actually use need to exist on disk. To split an existing single-file config.yaml into this modular layout, run aide config migrate (preview) and aide config migrate --write.

To override settings for a specific project, place a .aide.yaml file in the project root. aide walks up from the current directory and stops at the git root when searching for this file.


Minimal Format

For a single profile setup, a flat config.yaml with no agents: key acts as a single default profile:

# ~/.config/aide/config.yaml
agent: claude
gateways:
  anthropic: {preset: anthropic, store: personal, key: anthropic_api_key}
gateway_choice: {claude: anthropic}
yolo: true          # optional: skip agent permission checks
auto_approve: true  # alias for yolo

aide registers the agent binary automatically using the name provided. Credentials belong on the profile, not on a separate agent definition.


Full Format

For multiple projects with different agents, credentials, sandbox policies, or shared tooling, configure global settings in config.yaml and each profile in ~/.config/aide/profiles/<name>.yaml:

# ~/.config/aide/config.yaml
default_profile: personal

agents:
  claude:
    binary: claude
    icon: "🤖"
  aider:
    binary: aider

preferences:
  show_info: true
  info_style: compact
  info_detail: normal
  prefix: "ctrl+b"
  bindings:
    menu: "m"
    capabilities: "c"
    sandbox: "s"
    gateway: "g"
    diagnostics: "d"
    reload: "r"
    config: "u"
  tui_key: "ctrl+]"
  reload_key: "ctrl+\\"

mux:
  rex:
    enabled: true
    resume: true
    actions: true
    prefix: "ctrl+a>a"
    keys:
      reload: "r"
# ~/.config/aide/profiles/work.yaml
match:
  - remote: "github.com/acme/*"
  - path: "~/work/*"
icon: "💼"
agent: claude
secret: work
gateways:
  anthropic: {preset: anthropic, store: work, key: anthropic_api_key}
gateway_choice: {claude: anthropic}
sandbox:
  network: outbound
  writable:
    - "{{ .project_root }}"
# ~/.config/aide/profiles/personal.yaml
match:
  - remote: "github.com/myuser/*"
icon: "🏠"
agent: claude
secret: personal
gateways:
  anthropic: {preset: anthropic, store: personal, key: anthropic_api_key}
gateway_choice: {claude: anthropic}
sandbox: false
# ~/.config/aide/profiles/open-source.yaml
match:
  - path: "~/oss/*"
agent: aider
secret: oss
credentials:
  openai-key:
    store: oss
    key: openai_api_key
    env: [OPENAI_API_KEY]
    agents: [aider]
default_credentials: [openai-key]
sandbox: strict
# ~/.config/aide/profiles/infra.yaml
match:
  - path: "~/infra/*"
agent: claude
secret: work
capabilities: [docker, k8s]
auto_approve: true

Agent Definitions

The agents: block in config.yaml maps names to binaries. The agent name is the map key. binary: is the executable name or absolute path; if omitted, aide uses the agent name as the binary. Agents are binary definitions only. Credentials and environment variables belong on profiles.

Known agents that aide detects automatically on PATH: agy, aider, amp, claude, codex, copilot, cursor-agent, gemini, goose, omp, opencode, pi. (hermes is also recognized for hook provisioning.)

# ~/.config/aide/config.yaml
agents:
  claude:
    binary: claude
    icon: "🤖"        # optional; shown in banner and prompt
  aider:
    binary: aider

The icon field (optional) sets a Unicode symbol displayed alongside the agent name in the banner and aide prompt output.


Global Config Files and Fields

config.yaml (Global Settings)

# ~/.config/aide/config.yaml
statusline:
  order: [sandbox, network, caps, trust, context]
  sandbox:
    on: "🔒"
    off: "🔓"
    unmanaged: "💀"   # shown when AIDE_SANDBOX is absent entirely
  network:
    outbound: "🌐"
    unrestricted: "🌍"
    unmanaged: "🌫️"   # shown when AIDE_NETWORK_MODE is absent entirely
  caps:
    icon: "⚡"        # prefix; value is comma-joined capability list
  trust:
    untrusted: "⚠️"  # only shown when .aide.yaml is untrusted
  context:            # the matched profile's name
    icon: "📁"
  gateway:            # opt-in gateway choice (⇄<gw>, ⇄login, ⇄?); disabled by default
    disabled: true
    icon: "⇄"
  auto_approve:
    value: "🚨"       # always shown when active; disabled: true has no effect

Setting any state value to "" hides that state silently (e.g. sandbox.off: "" hides the module when sandbox is disabled). Each module also accepts disabled: true to remove it from output. The gateway module is disabled by default and is enabled when statusline.gateway.disabled: false, when "gateway" is listed in statusline.order, or when requested via aide statusline --module gateway. The agent key is accepted but ignored by the renderer (reserved for a future module).

The sandbox/network modules also accept an unmanaged: value, rendered when the corresponding AIDE_SANDBOX/AIDE_NETWORK_MODE env var is absent entirely rather than set to off/unrestricted; this distinguishes “aide didn’t launch this session at all” from “aide launched it with the sandbox explicitly disabled.” Defaults to "💀" for sandbox and "🌫️" for network.

sandbox.yaml (Security and Isolation)

# ~/.config/aide/sandbox.yaml
capabilities:
  k8s-dev:
    extends: k8s
    readable: ["~/.kube/dev-config"]
    deny: ["~/.kube/prod-config"]
    env_allow: [KUBECONFIG]

provisioning.yaml (Shared Tooling)

# ~/.config/aide/provisioning.yaml
hooks:
  pre_tool:
    - command: "rtk hook {agent}"
      matcher: shell   # optional: "shell" → agent-native name (e.g. Bash)

The {agent} template variable is replaced with the resolved agent name for each profile. Reconciled by aide sync. See Hooks below.


Credential-clean environment

A configured launch (any config.yaml) does not hand the agent the credentials exported in your shell. Before the profile’s env: is applied, aide removes from the inherited environment, whether or not --clean-env is set:

The full list lives in internal/envscrub. What still reaches the agent:

Limits: aide matches names. A credential exported under a name the registry does not know passes through unless you add it to scrub_env:, and files or keychains a scrubbed variable would have pointed at (~/.aws/credentials, gcloud application-default credentials, system keychains) are not removed; only the sandbox controls whether the agent can read them. Provisioning subprocesses (aide sync, plugin/MCP listing) drop the same names, including scrub_env:.

Claude Code has two authentication sources no environment scrub reaches:

Pi’s Vertex provider without GOOGLE_CLOUD_API_KEY uses gcloud application-default credentials (~/.config/gcloud/application_default_credentials.json). That file is one per user, not per profile: aide does not isolate it. The sandbox grants ~/.config/gcloud only with the gcp capability, so every Pi profile with gcp (or launched without the sandbox) shares the same Google login.

Codex reads a custom model provider’s key from the variable its config.toml names in model_providers.<id>.env_key (and header values from env_http_headers), so those names are not in the registry. aide treats them like credential binding names: every configured launch (any agent) and every provisioning subprocess scrubs, from the inherited environment, each such name declared in any Codex home aide knows of: ~/.codex, an exported CODEX_HOME, and every profile’s own Codex dir, each with its config.toml and profile files (<name>.config.toml). Only the names are read, never values or experimental_bearer_token; names of process essentials (PATH, HOME, …) and AIDE_* are ignored. A missing file declares nothing. When the Codex home being launched has an unreadable or invalid file, the launch prints aide: note: <dir>/config.toml is not valid TOML (line N): custom model provider keys it names are not scrubbed from the shell and continues. To inject such a key, bind it with a custom credentials: entry (env: [CORP_LLM_KEY], agents: [codex]). Limits: a project’s .codex/config.toml and Codex homes outside these are not read; list names you always want removed in scrub_env:. MCP server tokens (bearer_token_env_var) are resource credentials and are left alone.

Every launch (including zero-config launches when default is synthesized from PATH) runs through the full credential scrub and sandbox policy.

Every env name a credentials: binding declares (in any profile) is also scrubbed from the inherited environment, so a custom key exported in your shell cannot reach an agent that did not select it.


Credential bindings

LLM endpoints and keys (hosted providers, company gateways, cloud switches) are gateways; credentials: is for plain environment-variable secrets such as GITHUB_TOKEN, for env-only harnesses (gemini, aider, goose, amp) and for the built-in gemini key, which is also injected into pi, omp and opencode (and skipped there while a gateway is chosen for that harness). Provider credentials written the old way are migrated to gateways (see Upgrading from earlier gateways). default_credentials: names the bindings a launch injects when nothing else selects (--gateway <binding> replaces it); a binding it leaves out is never decrypted or injected. Each binding refers to one key in an age-encrypted secret store (the same stores secret: names; see aide secrets).

# ~/.config/aide/profiles/work.yaml
agent: claude
credentials:
  github:
    backend: age            # the only backend
    store: work             # secret store, named like secret:
    key: github_token       # key inside that store
    env: [GITHUB_TOKEN]
    agents: [claude]        # required for a custom name
  gemini:                   # built-in name: GEMINI_API_KEY
    backend: age
    store: work
    key: gemini_api_key

Routes: one binding, every agent

Pick an agent and the profile picks the variables: give a binding a route per agent with for:. Each route says which variables carry the key (env:) and which non-secret settings travel with it (set:).

# ~/.config/aide/profiles/work.yaml
agent: claude
credentials:
  cloud:                           # keyless: AWS login via the capability
    capabilities: [aws]
    for:
      claude: {set: {AWS_PROFILE: dev}}
      pi: {set: {AWS_REGION: us-east-1}}

Gateways

A gateway is a named LLM endpoint a harness can use instead of its own login: a hosted service (OpenRouter), a company proxy (LiteLLM), a local model server, or a cloud switch (Bedrock, Vertex). It lives under gateways: in the profile, lists the harnesses it serves, and keeps its key in an age secret store. aide writes each marked harness’s own config with an aide-<name> provider entry that names a variable, never the key, and a launch injects the key as AIDE_GW_<NAME>_KEY (the name uppercased, - becoming _).

aide gateway add corp --url https://gateway.example.com --profile work

This prompts for the key (input hidden), then:

  1. Creates a default age identity when none exists and you are on a terminal (anywhere else, pass --generate-age-key), and encrypts the key into ~/.config/aide/secrets/work.enc.yaml under corp_token.

  2. Saves the gateway and the choice on the profile (~/.config/aide/profiles/work.yaml):

    gateways:
      corp:
        url: https://gateway.example.com
        api: anthropic-messages
        store: work
        key: corp_token
        agents: [claude, pi]      # which agents may use it
        model: claude-sonnet-4-5  # optional startup model
    gateway_choice:
      claude: none                # recorded by `add`; see below
    
  3. Fetches <url>/v1/models, caches the result in ~/.local/state/aide/gateways/work/corp.json, and writes it into the config of every harness whose profile dir exists. Harnesses without a dir yet show pending and get the file on first launch.

Read the key from a password manager with --key-stdin or from an environment variable with --from-env=VAR (a bare --from-env on a preset reads the first of the preset’s usual variables that is set). No flag takes the key itself, so it never lands in shell history.

Choosing a gateway: no silent billing changes

aide never selects a gateway by itself, even when only one exists. Each launch uses a gateway only when you chose it:

OrderSourceSet with
1--gateway <name|none> for this run (--auth login means none)the flag
2Repository preferenceaide gateway use <name|none> --agent <a> --repo, or aide project set --gateway <name|none> --agent <a>
3The profile’s gateway_choice:aide gateway use <name|none> --agent <a>
4No gateway marked for the agentthe agent’s own login
5Gateways marked, choice unsetthe picker on a terminal; exit 78 in a script

none means the agent’s own login. claude and codex take exactly one endpoint, so they need a choice. pi, omp and opencode list every marked aide-<name> entry in /model; a choice only decides which one they start on. Unset gateways for them start on the agent’s default.

aide gateway add never changes how existing launches authenticate: for each marked claude or codex whose choice was unset it records none, unless you pass --default-for <agent> (repeatable) or --default to make the new gateway the choice. On a terminal without those flags, add asks per claude/codex whether to make it the default, and records none on No or off a terminal. A stored choice that names a gateway no longer marked for the agent is reported on stderr and treated as unset. aide gateway use --agent <a> --unset clears one.

The picker

With an unset claude or codex choice on a terminal, the launch lists the marked gateways (URL, store and key name, never a value) and none (use <agent>'s own login), with nothing preselected and no secret decrypted. Then it asks whether to apply the choice “Just this once”, “Always in this repo” (when the repository has an origin), or “Always in profile <name>”. A read-only config directory falls back to “Just this once” with a notice.

Exit code 78

When the choice is unset and stdin is not a terminal (or the picker is aborted), aide stops before starting the agent with exit code 78 (EX_CONFIG) and prints the candidate gateways and the commands to resolve it, along the lines of this example (not exact output):

claude has gateways marked in profile "work" (corp, openrouter) but none chosen;
choose one with: aide gateway use <name|none> --agent claude, or pass --gateway <name|none>

Scripts and CI can test for 78 and fix the configuration; the same launch never falls back to metered billing. The choice is unset after aide gateway use --unset, after gateway remove or unmarking the chosen gateway, when a stored choice goes stale, after a hand edit, or when a synced config arrives without gateway_choice:. aide which, aide status, aide prompt and aide statusline never ask and never exit 78; which and status print unset (would prompt on a terminal, exit 78 in scripts) for claude and codex.

Kinds and presets

KindNeedsExample
Static keyURL, wire protocol (api), stored keycorp, openrouter-anthropic
Keyless loopbacka 127.0.0.1, localhost or ::1 URL, no_auth: trueollama
Provider switchregion (and project for Vertex); no URL, no keybedrock, vertex

Built-in presets (anthropic, openai, codex, openrouter, openrouter-anthropic, opencode-go, zai, ollama, bedrock, vertex) supply URL, wire protocol and compatible harnesses, so aide gateway add openrouter-anthropic --from-env needs only a key. Codex accepts only gateways that serve the OpenAI Responses API (/v1/responses); Codex 0.167 and later refuse wire_api = "chat".

A provider switch (bedrock, vertex) serves claude only. Launching with it sets CLAUDE_CODE_USE_BEDROCK=1 and AWS_REGION (Vertex: CLAUDE_CODE_USE_VERTEX=1, CLOUD_ML_REGION, ANTHROPIC_VERTEX_PROJECT_ID) and opens the aws (or gcp) capability for that launch only, which grants the full capability (~/.aws and AWS_* variables, or the gcloud equivalent). Two regions are two named gateways.

aide gateway add takes any preset and any --api (anthropic-messages, openai-chat, openai-responses). A provider switch takes --region (and --project for vertex) and no key.

When a custom anthropic-messages gateway (the default) serves codex, aide writes Codex’s provider entry with wire_api = "responses" and <url>/v1 automatically while keeping <url> and anthropic-messages for the other agents on the same gateway entry. Its gateway_choice.codex stays none unless you pass --default or --default-for codex. Pass --agents without codex to exclude Codex. An openai-chat or openai-responses gateway keeps its exact url.

Flag of gateway addDefaultMeaning
<preset>|<name>first DNS label of the URL’s host (prompted on a terminal)Preset or gateway name
--urlthe preset’s (prompted on a terminal)Base URL; https://, or http:// for loopback only
--apithe preset’sWire protocol (anthropic-messages, openai-chat, openai-responses)
--no-authoffKeyless loopback gateway
--key-stdin, --from-env[=VAR]hidden promptWhere the key comes from
--agentsthe preset’s, else the defaults its --api can serveAgents that may use it
--modelnoneModel the agents start on
--default, --default-for <a>offMake it the choice for every agent it serves
--refresh-ttl24hLaunch-time model refresh interval
--secret-storethe profile’s secret: store, else the profile nameStore for the key
--key<name>_tokenKey inside the store
--age-key, --generate-age-keythe discovered identityRecipient for a new store; create an identity without a terminal
--forceoffReplace a same-name gateway with another URL, or overwrite a store key no gateway owns

--token-stdin, --token-env, --ttl, --store and --harnesses still work as deprecated aliases and print a notice. --no-credentials is removed. Running add again with the same name and URL replaces the key, which is how you rotate it.

What each agent gets

Agent config files name the variable, never the key.

AgentVariable injectedFile written
claudeANTHROPIC_BASE_URL and the key as ANTHROPIC_AUTH_TOKEN (or ANTHROPIC_API_KEY); --settings <dir>/cache/aide-gateway-corp.json<dir>/cache/aide-gateway-corp.json (modelPicker with replaceBuiltInOptions: true)
piAIDE_GW_CORP_KEY<dir>/models.json, providers.aide-corp
ompAIDE_GW_CORP_KEY<dir>/models.yml, providers.aide-corp
opencodeAIDE_GW_CORP_KEY<dir>/opencode.jsonc, providers.aide-corp
codexAIDE_GW_CORP_KEY<dir>/config.toml, [model_providers.aide-corp] (env_key, wire_api = "responses")

<dir> is the profile’s config dir for that harness. aide edits only aide-<name> entries; other providers, MCP servers and plugins stay. It no longer writes OpenCode’s top-level model or Codex’s model_provider: the choice reaches the launched process instead (-c model_provider=aide-<name> for Codex; --provider/--model for Pi and omp; OPENCODE_CONFIG_CONTENT for OpenCode, which yields to a value you set yourself unless --gateway is passed). Comments in opencode.jsonc and config.toml are not preserved on rewrite.

Upgrading from earlier gateways

On the first launch or config-writing command after upgrading, aide migrates a legacy profile: base_url: gateways, LLM provider credentials: (anthropic, openai, codex, openrouter, and custom ones that set ANTHROPIC_BASE_URL or OPENAI_BASE_URL), keyless bedrock/vertex bindings, env: provider switches, an env: ANTHROPIC_BASE_URL with its key, and default_credentials: become gateways: entries plus an explicit gateway_choice: (default_credentials: keeps the plain credentials that stay), so the launch uses the same endpoint and key as before. gemini, an env: key no gateway preset serves (it moves under credentials:, still injected by default) and credentials for other tools (GITHUB_TOKEN) stay under credentials:. What a gateway cannot express exactly (a route that sets another variable beside the endpoint, a remote keyless Claude endpoint, an env: provider endpoint with no key, an OPENAI_BASE_URL in env:, an ANTHROPIC_API_KEY sent to a custom URL: a gateway you add with --url sends its key as a bearer token, so such keys are not converted automatically) is not converted: the config still loads, but launching that profile fails with a hint to edit it by hand (aide gateway add for the gateway, then remove the old entry). It backs up the YAML and preferences.json under ~/.local/state/aide/migrations/<UTC-timestamp>/ first and prints a one-time summary, highlighting any choice inherited from the old alphabetical rule. Read-only commands (aide prompt, aide statusline, completion) never write; they translate in memory. On a read-only config (a Nix dotfile) aide runs from the in-memory translation and hints at aide config migrate, which previews the change and applies it with --write. Downgrading means restoring the backups.

Things that change:

Refresh at launch

When the cached models are older than refresh_ttl, a launch fetches them again before starting the agent and prints what it did. If the gateway cannot be reached, the launch warns and uses the cached models; with no cache at all it launches without a model list. When the cache is fresh but the agent’s file is missing or out of date, aide writes it from the cache with no network call. --gateway none launches skip all of this.

Commands

Safety rules


Control Environment Variables

Alongside AIDE_SANDBOX, AIDE_NETWORK_MODE, and AIDE_INFO_STYLE (used elsewhere in this doc to detect or override aide’s runtime state), aide also honors:


Profile Fields

Each file in ~/.config/aide/profiles/<name>.yaml defines one profile (the filename stem is the profile name):

# ~/.config/aide/profiles/work.yaml
hooks:
  exclude: [session_start]   # drop a top-level event entirely
  extra:
    pre_tool:
      - command: "notify work-hook {agent}"
sandbox:
  writable:
    - "{{ .project_root }}"
  network: outbound
  allow_subprocess: true

Preferences

The top-level preferences: block controls the startup display and mid-session keybindings.

Override any of these per-project in .aide.yaml under a preferences: key (including preferences.prefix, preferences.bindings, preferences.tui_key, and preferences.reload_key).


Multiplexer Integrations (mux:)

The top-level mux: block configures native integrations per multiplexer (rex, herdr, tmux, wezterm, zellij, kitty):

mux:
  rex:
    enabled: true
    resume: true
    actions: true
    prefix: "ctrl+a>a"
    keys:
      capabilities: "c"
      sandbox: "s"
      gateway: "g"
      diagnostics: "d"
      reload: "r"

Per-Project Override

.aide.yaml supports: agent, env, sandbox, preferences, yolo, capabilities, disabled_capabilities, statusline, mcp_servers, capability_variants. aide merges it on top of the matched global profile. It cannot set secret:; set the secret store in the profile.

Relative sandbox paths (writable, readable, denied and their _extra forms) are interpreted against the root of the checkout that contains the declaring .aide.yaml, not the directory you launch from (and not the file’s own directory when the file sits in a subdirectory of the checkout). The checkout is found from the file’s real location (symlinks in its directory resolved), the same location trust is keyed on, so a repository that symlinks to another one’s directory cannot re-anchor its paths. Outside git, paths anchor at the file’s real directory; if git cannot be run there, a file with relative paths is not applied and aide prints a warning. Paths starting with /, ~, $ or {{ are left as written.

Trust gate

.aide.yaml files are not applied until trusted. On first encounter, aide shows the file’s contents and skips it. Run aide trust to approve the file, or aide deny to block it permanently. See Sandbox for details.

Trust is recorded per file, keyed on where the file is found (parent directories symlink-resolved) and its contents: editing a file withdraws its approval. A .aide.yaml that is a symlink is approved at its own location, never through the file it points to; the trust banner shows both. aide trust, aide deny and aide untrust take an optional path for a file outside the current directory.

Linked git worktrees

A linked worktree (git worktree add) inherits the main checkout’s .aide.yaml, then applies its own on top. aide finds the main checkout through git (git rev-parse --git-common-dir and git worktree list), not by looking in parent directories, so the worktree can live anywhere.

Launch fromFiles applied
Main checkout (or a plain clone)its own .aide.yaml, once
Linked worktreemain checkout’s .aide.yaml, then the worktree’s
Worktree of a bare repositorythe worktree’s own only; a bare repository has no main checkout file
Submodulethe submodule’s own only; it never inherits the superproject’s

When both files apply, the worktree’s file wins:

Each file is trusted separately. An untrusted or denied file contributes nothing; the other file still applies if it is trusted. Changing the main checkout’s file withdraws its approval in every worktree. To approve the inherited file from a worktree, run aide trust <main checkout>/.aide.yaml (the banner prints the exact command).

The launch banner, aide which and aide status list each untrusted or denied file separately, and list the security-sensitive grants that come from the main checkout’s file (capabilities, writable and readable paths, replaced guard or deny lists, extra allow rules, network mode, removed guards, allow_subprocess, clean_env: false, MCP servers, a disabled sandbox, auto-approve) labeled with that file. In --format json these are trust_files and inherited_grants (aide status: project_trust, inherited_grants).

aide inherits only when the repository itself records the checkout as one of its worktrees (the worktree’s administrative directory lies in the repository’s worktrees/, points back at this checkout, and git worktree list names it). A directory whose .git file merely claims to belong to another repository inherits nothing, with a warning.

A missing main checkout .aide.yaml is normal. If the main checkout itself is gone or unreadable (deleted or moved), aide stops with a diagnostic naming the missing path rather than launching with partial policy: restore it, run git worktree repair from the moved checkout or git worktree prune after deleting it, or launch with --ignore-project-config.

aide cap enable|disable and aide env set|remove in a linked worktree edit the worktree’s own .aide.yaml (created if absent); pass --main to edit the main checkout’s file instead. Edits keep the file as written: inherited settings are never copied into it.


Validation

aide validate checks:

Warnings print separately from hard errors. The command exits non-zero on any error.


Hooks

Hooks inject commands into agent lifecycle events. aide writes them to the agent’s config file during aide sync; the agent runs them, not aide.

Supported events

EventClaudeGeminiCursorCopilotHermesOpenCodeOMPPi
pre_toolPreToolUseBeforeTool (script)preToolUsePreToolUse (file)pre_tool_call (plugin)tool.execute.beforetool_calltool_call
post_toolPostToolUse----tool.execute.aftertool_resulttool_result
session_startSessionStart----session.created (event)session_startsession_start
session_endSessionEnd----disposesession_shutdownsession_shutdown
notificationNotification-------
stopStop-------

Events not supported by an agent are silently skipped during sync.

OpenCode’s session_start hook skips subagent sessions, and its session_end hook runs when OpenCode exits normally, not when it is killed. OMP’s and Pi’s session hooks skip extension reloads. As with Claude, all three also fire when you switch to a new or resumed session.

Supported matchers

MatcherClaudeCursorOpenCodeOMPPi
shellBashShellbashbashbash

Matchers not supported by an agent are ignored. Claude, OpenCode, OMP and Pi pass any other matcher through as a native tool name. OpenCode, OMP and Pi have no matcher field, so their generated hook scripts check the tool name themselves and return early for other tools.

Storage formats per agent

The {agent} template variable

The command field supports {agent}, replaced with the profile’s resolved agent name at sync time:

hooks:
  pre_tool:
    - command: "rtk hook {agent}"

This lets a single top-level hook declaration work across all your profiles without per-profile duplication.

Management

aide hook list                                          # show declared hooks
aide hook add --event pre_tool --command "rtk hook {agent}"  # add a hook
aide hook remove --event pre_tool --command "rtk hook {agent}"  # remove a hook
aide sync                                               # write to agent config

Viewing and Editing

aide config show                      # print all global config files (with YAML syntax highlighting on TTY)
aide config edit                      # open $EDITOR on config.yaml, validate after save
aide config migrate [--write]         # split a single-file config.yaml into modular files
aide config schema show <kind>        # print an embedded JSON Schema to stdout
aide config schema export [--dir]     # export all JSON Schemas locally
aide config schema stamp [flags]      # add yaml-language-server $schema headers to existing files

Editor Schema & Autocomplete

aide ships Draft 2020-12 JSON Schemas for all five YAML configuration file shapes. Adding a yaml-language-server modeline at the top of a file prevents SchemaStore false positives (such as profiles/*.yaml matching unrelated schemas) and enables autocomplete, hover docs, and validation in Neovim, VS Code, Helix, Zed, and other YAML LSP editors:

# yaml-language-server: $schema=https://raw.githubusercontent.com/jskswamy/aide/main/schemas/profile.schema.json
agent: claude
capabilities:
  - k8s
FileSchema KindHosted URL (main)
~/.config/aide/config.yamlconfighttps://raw.githubusercontent.com/jskswamy/aide/main/schemas/config.schema.json
~/.config/aide/profiles/<name>.yamlprofilehttps://raw.githubusercontent.com/jskswamy/aide/main/schemas/profile.schema.json
~/.config/aide/sandbox.yamlsandboxhttps://raw.githubusercontent.com/jskswamy/aide/main/schemas/sandbox.schema.json
~/.config/aide/provisioning.yamlprovisioninghttps://raw.githubusercontent.com/jskswamy/aide/main/schemas/provisioning.schema.json
.aide.yamlprojecthttps://raw.githubusercontent.com/jskswamy/aide/main/schemas/project.schema.json

Version-pinned release assets are also published on each GitHub Release at https://github.com/jskswamy/aide/releases/download/<tag>/<kind>.schema.json (and releases/latest/download/<kind>.schema.json).

Automatic headers & preservation: Whenever aide writes a new or modified config file (or migrates a config), it prepends the default # yaml-language-server: $schema=... header if none is present. Existing custom # yaml-language-server: headers are always preserved.

Dotfiles / Nix & offline use: