Getting Started with aide
aide picks the right AI coding agent and credentials for each project directory.
Run aide in any project and it resolves which agent to launch and which secrets to use.
Zero Config
If one agent is on PATH with its API key in the environment, aide launches it without a config file.
$ aide
๐ง aide ยท default (๐ค claude โ /usr/local/bin/claude (dir: ~/.claude))
๐ default_context (default)
๐ก sandbox: primary (Seatbelt), network outbound only, code-only
The launch uses the built-in default profile, which aide creates on first
run. On Linux the sandbox line reads primary (Landlock ABI N).
If several agents are on PATH, an interactive terminal lists them and asks
which one the default profile should use. In a script aide picks one
without asking. To choose for a single launch, use --agent:
$ aide --agent codex
To skip the agent’s built-in permission prompts while keeping the OS sandbox active, add --auto-approve:
$ aide --auto-approve
This injects the agent-specific approval flag (for example,
--dangerously-skip-permissions for Claude or --approve-for-me for
Codex). --yolo is kept as an alias. You can also set
auto_approve: true (or yolo: true) in config for specific profiles.
Use --no-auto-approve (or --no-yolo) to override config-level settings.
aide’s sandbox: policy is enforced by its OS sandbox and is not translated
into Codex’s separate --sandbox option. Pass native Codex options after
-- when you want Codex to apply them as well.
First-Time Setup
Run aide config (or aide init --ui, or aide setup in an interactive terminal) to launch the 5-area Standalone Configuration and Onboarding Dashboard. It handles age/YubiKey setup, default agent and gateway presets, profile match rules, capabilities and sandbox settings, provisioning sync and aide doctor, and ccusage spend reporting.
In non-interactive scripts, aide setup prints the legacy deprecation hint pointing to aide profile bind and aide profile create (see CLI Reference). During an interactive agent session, press Ctrl+B m (configurable via preferences.prefix / preferences.bindings) or Ctrl+] (preferences.tui_key) to open the Mid-Session Modal, or use aide --resume to resume a previous session.
$ cd ~/work/myproject
$ aide config # interactive 5-area configuration dashboard
$ aide init --ui # open directly on the onboarding wizard
Using Capabilities
Capabilities grant the sandbox additional permissions (filesystem paths, environment variables, network access) for specific tools like Docker, Kubernetes, or AWS.
For session-scoped capabilities, use --with:
$ aide --with k8s,docker
For persistent capabilities, add them to a profile in config:
# ~/.config/aide/profiles/infra.yaml
agent: claude
capabilities: [docker, k8s, aws]
See Capabilities for details on built-in and custom capabilities.
Creating Config Manually
aide init creates a minimal config without the full wizard:
$ aide init
Detected agents on PATH: claude
Primary agent (default: claude):
Set up secrets? (y/N): n
Created /home/user/.config/aide/config.yaml:
agent: claude
The resulting file contains a single line:
agent: claude
Add secrets, environment variables, and profiles by editing the file directly.
Folders with No Matching Profile
When no profile’s match: rules cover the current folder, aide uses the
built-in default profile. It always exists and it uses each agent’s own
config directory (~/.claude, ~/.codex and so on).
$ aide
๐ง aide ยท default (๐ค claude โ /usr/local/bin/claude (dir: ~/.claude))
๐ default_context (default)
๐ก sandbox: primary (Seatbelt), network outbound only, code-only
To make this folder resolve to a profile you already have (say work), bind it:
aide profile bind work
By default bind matches by git remote URL when the folder is a git repo with
an origin remote - so the same profile resolves correctly for any worktree
or fresh checkout of the same repo.
Other ways to change what an unmatched folder gets:
aide profile create [name] # create a new profile for this folder
aide use <name> -- <agent-args> # launch once without persisting
aide profile set-default <name> # use another profile for unmatched folders
Using a Gateway
To run an agent against a hosted service or company gateway instead of its own login, register it and choose it:
$ aide gateway add corp --url https://llm.example.com
$ aide gateway use corp --agent claude
By default, a custom gateway serves all five gateway agents (claude,
pi, omp, opencode, codex), translating the wire protocol and /v1
path per agent internally; pass --agents to restrict it. aide never selects a gateway for you. When claude or codex has gateways
marked and no choice, aide shows a picker on a terminal and exits with code
78 in a script. See Gateways.
Creating a Profile
aide profile create creates a new profile with an interactive wizard (TTY) or
fully scripted flags (non-TTY):
# Interactive wizard
$ aide profile create
# Non-interactive - name, agent, and cwd binding all specified
$ aide profile create work --agent claude --here
# Non-interactive - skip binding the current folder
$ aide profile create work --agent claude --no-here
The first profile created automatically becomes the default_profile.
Binding a Directory to an Existing Profile
aide profile bind attaches the current folder to a profile that already exists. On an interactive terminal inside a git repository, it lets you choose whether to bind just this repository, a parent team/subgroup, the entire organization, or the folder path:
$ cd ~/work/myproject
$ aide profile bind work
Select match scope:
[1] This repository only (github.com/acme/myproject) (default)
[2] All repositories in github.com/acme/*
[3] This folder path only (/home/user/work/myproject)
Choose [1]: 2
Bound this folder to profile "work" (matched by remote github.com/acme/*)
Use --scope (repo, org, <org>/<team>, or path) to select a scope directly without prompting:
$ aide profile bind work --scope org
Bound this folder to profile "work" (matched by remote github.com/acme/*)
$ aide profile bind work --scope path
Bound this folder to profile "work" (matched by path /home/user/work/myproject)
Binding a Directory (legacy aide use)
aide use <agent> creates or updates a profile that matches the current directory.
For new setups, aide profile create and aide profile bind are preferred.
$ cd ~/work/myproject
$ aide use claude
Created profile "myproject":
agent: claude
match: /home/user/work/myproject
Available flags:
--match "~/work/*" Glob pattern instead of exact CWD
--secret work Attach a named secrets file
--sandbox strict Apply a sandbox profile
Your First Multi-Profile Setup
Two profiles: work uses AWS Bedrock, personal uses a direct API key.
# Work profile: bind ~/work/* to claude with Bedrock credentials
$ aide secrets create work --age-key age1abc...
Created secrets/work.enc.yaml
$ aide use claude --match "~/work/*" --secret work
Created profile "work":
agent: claude
match: ~/work/*
secret: work
# Personal profile: bind ~/oss/* to claude with Anthropic API key
$ aide secrets create personal --age-key age1abc...
Created secrets/personal.enc.yaml
$ aide use claude --match "~/oss/*" --secret personal
Created profile "oss":
agent: claude
match: ~/oss/*
secret: personal
# Set default for unmatched directories
$ aide profile set-default oss
Edit the profile files under ~/.config/aide/profiles/ to add env var templates that pull values from secrets:
# ~/.config/aide/profiles/work.yaml
agent: claude
secret: work
match:
- path: ~/work/*
env:
AWS_PROFILE: "{{ .secrets.aws_profile }}"
# ~/.config/aide/profiles/oss.yaml
agent: claude
secret: personal
match:
- path: ~/oss/*
env:
GITHUB_TOKEN: "{{ .secrets.github_token }}"
Select Bedrock for the work profile with a gateway; Bedrock is never set through env::
$ aide gateway add bedrock --region us-east-1 --profile work
$ aide gateway use bedrock --agent claude --profile work
Verifying
aide which shows which profile matched and why:
$ cd ~/work/myproject
$ aide which
Profile: work
Matched: path glob match: ~/work/*
Agent: claude (/usr/local/bin/claude)
Secret: work
Env:
AWS_PROFILE โ from secrets.aws_profile
aide doctor reports what launch would use here and every problem it finds, each with a fix command or steps (aide doctor --fix applies them, asking first):
$ aide doctor
0 errors, 1 warning, 2 tips
Profile work (path glob match: ~/work/*)
Agent claude
...
aide validate checks only the config file for errors:
$ aide validate
OK (2 profiles, 1 agents, 2 secrets)
Validation reports specific failures:
Errors:
- profile "work" references secret "work" which does not exist
1 errors, 0 warnings