Permission prompts ask you about every command. Turn them off: aide --auto-approve starts your agent inside an OS sandbox: your project is in, your SSH keys, cloud credentials and browser data are out. When a task needs more, you add one named tool, such as docker or aws, with one key, and take it away with the same key. The conversation carries on. The agent cannot move the line itself.
curl -sSfL https://raw.githubusercontent.com/jskswamy/aide/main/install.sh | sh$ aide --auto-approve π‘ sandbox: primary (Seatbelt), network outbound only, code-onlyNo prompts. The agent runs anything inside the line. β Bash(go test ./...) ok β Bash(cat ~/.aws/credentials) Operation not permittedThe task needs Docker. aide tells you what was refused, and the key. β Bash(docker compose up -d) permission deniedPermission denied (read): ~/.docker/config.json β press Ctrl+B m to allowCtrl+B m [x] docker scope: βΈ sessionβ» Restarting claude with updated permissionsβ¦ β Bash(docker compose up -d) okThe same key takes it away again. The agent cannot press it.
You asked the agent to debug a failing deploy. To "check the config" it read your cloud credentials. The usual fix is approving every command by hand, until you stop reading them. aide does neither. The operating system holds the line, so the agent needs no supervision inside it, and nothing it runs can step outside.
On from the first launch, with no config file. 13 guards are active by default.
Refused by the kernel, for the agent and everything it starts: shell commands, MCP servers, hooks. On Linux, files inside your project are an exception: see the limits.
You: "figure out why the deploy fails"$ claude --dangerously-skip-permissions β Let me check the AWS configuration. β Bash(cat ~/.aws/credentials) [default] aws_access_key_id = AKIAβ¦Nothing malicious. Your keys are now in a model context.Or turn the prompts back on. Allow Bash(ls)? Allow Allow Read(main.go)? Allow Allow Bash(go test)? Allowβ Γ 200. By lunch you have stopped reading them.
At launch: name the tools this task needs.$ aide --with docker,aws β docker ~/.docker β --with β aws ~/.aws β --withMid-task, the agent reaches for something outside the line. β Bash(kubectl get pods) permission deniedPermission denied (read): ~/.kube/config β press Ctrl+B m to allowCtrl+B m [x] k8s scope: βΈ sessionβ» Restarting claude with updated permissionsβ¦ β Bash(kubectl get pods) okLeave one out for a single run.$ aide --without dockerAnd a ceiling that no tool can lift.$ aide cap never-allow ~/.kube/prod-config$ aide --with k8s β denied /Users/you/.kube/prod-config (never-allow)
A capability is a tool with a name: docker, aws, k8s, ssh. Adding one lets the agent reach what that tool needs and nothing else. You decide once per tool, not once per command.
aide --with docker,awsaide --without dockeraide restart --with dockeraide cap enable docker / aide cap disable dockeraide sandbox allow ~/datasets (add --write to write)aide sandbox deny ~/notesaide sandbox network noneaide cap never-allow ~/.kube/prod-configaide statusaide's settings, its session controls and the project's .aide.yaml are closed to the agent. It cannot edit its own limits.
Every change is staged, shown to you, and applied only when you confirm it at your keyboard.
A project file you have not trusted is shown to you and not applied.
aide trust$ aide sandbox test (version 1) (deny default) β¦
Prints the exact rules the operating system will enforce. Everything is denied unless a rule allows it.
The network is open outbound by default: what the agent can read, it can send. Close it with aide sandbox network none.
Git over SSH needs --with ssh.
Adding a tool restarts the agent. The conversation is resumed.
macOS and Linux 6.7 or newer enforce file and network rules. Older Linux kernels get file rules only. With neither Landlock nor bubblewrap, aide warns and runs the agent with no sandbox.
On Linux with Landlock, a rule cannot close a file inside a folder the agent may write. So .env files, .git/hooks and .aide.yaml inside your project, and a never-allow path inside a writable folder, are closed on macOS and under bubblewrap but not under Landlock. A changed .aide.yaml still loses its trust and is not applied until you approve it. aide sandbox test marks each such rule as not enforced. Platform details.
aide does not replace your agent. It starts the one you already use, with the same login and the same model, and decides two things first: which account it runs as, and where the line is.
claude or codex. Anything after -- goes to the agent untouched.docker or aws, becomes operating-system rules for what the agent may reach.aide which prints the profile it matched and the reason, without launching anything.
aide doctor reports every problem a launch would hit here, each with the command that fixes it.
$ aide whichProfile: workMatched: path glob match: ~/work/*Agent: claude (/usr/local/bin/claude)Secret: workEnv: AWS_PROFILE β from secrets.aws_profile
A day job and your own projects. Two teams. An employer and an open-source repo. An agent keeps its login, its history, its plugins and its MCP servers in one folder, and carries all of it into every repo you open. aide gives each account its own folder, and the sandbox closes the others. It picks the right one from the repo you are in.
At launch the sandbox opens only the active profile's folder. The other profiles, and your default folder, are outside the line.
Daytime. A work repo, on the company account.$ export ANTHROPIC_API_KEY=sk-ant-β¦work$ cd ~/work/api && claude β¦ a day of work, and an MCP server for the staging databaseEvening. Your own project. Same agent, same home folder.$ cd ~/code/my-app && claude MCP servers: staging-db connected Recent sessions: ~/work/api (2 hours ago)Work came home with you. And work is paying for it.
Daytime. A work repo.$ cd ~/work/api && aideπ§ aide Β· work (π€ claude β /usr/local/bin/claude (dir: ~/.claude-work)) π remote match: github.com/acme/*Evening. Your own project. Same agent, a different home.$ cd ~/code/my-app && aideπ§ aide Β· personal (π€ claude β /usr/local/bin/claude (dir: ~/.claude-personal)) π remote match: github.com/you/*Its own login, history and MCP servers. Work is outside the line. β Bash(ls ~/.claude-work) Operation not permitted
Create the profile from inside the repo. aide offers to match this repository, the whole organisation, or this folder. Matching by git remote means a fresh clone or a second worktree lands in the same profile.
The keys you left exported in your shell are dropped at launch, so the side project cannot run on the company account because of one forgotten export.
No profile at all? aide uses your agent's setup as it is.
$ aide profile create work --agent claude --no-here$ aide profile bind workSelect match scope: [1] This repository only (github.com/acme/api) (default) [2] All repositories in github.com/acme/* [3] This folder path only (/home/you/work/api)Choose [1]: 2Bound this folder to profile "work" (matched by remote github.com/acme/*)$ aide whichProfile: workMatched: remote match: github.com/acme/*
Every agent keeps its endpoint in a different file, in a different format, with the key pasted beside it. With aide you add the gateway once. aide configures every agent that supports gateways, in that agent's own file and format, keeps the key encrypted, and keeps the model list up to date in all of them.
Security says: every model call goes through the company gateway.$ vim ~/.claude/settings.json "ANTHROPIC_BASE_URL": "https://llm.example.com"$ vim ~/.codex/config.toml base_url = "https://llm.example.com"$ vim ~/.config/opencode/opencode.json "baseURL": "https://llm.example.com"Three files, three formats, and the token pasted into each.It rotates next quarter. Do all of it again.
Add it once. The key comes from your password manager, never from your keyboard.$ op read op://Eng/Gateway/credential | aide gateway add corp --url https://llm.example.com --key-stdinaide wrote it into every agent that supports gateways, each in its own format.$ aide gateway list corp https://llm.example.com claude synced codex synced opencode synced pi synced omp syncedIt rotates next quarter. One command, all five.$ aide gateway edit corp --rotate-token
aide never picks a gateway for you, even when there is only one. With no choice saved, a terminal shows a picker with nothing preselected and a script stops. A launch cannot move to another billing account behind your back.
No flag takes the key, so it never lands in shell history. It is decrypted in memory at launch. A key left exported in your shell does not reach the agent.
claude, codex, pi, omp and opencode each get the gateway written into their own config, with its model list. Add an agent later and one sync brings it in line.
aide gateway syncBuilt-in presets cover Anthropic, OpenAI and OpenRouter, Bedrock and Vertex for Claude, and local servers such as Ollama that take no key. For one launch on the agent's own login: aide --gateway none. The Gateways guide has the rest.
Where the line is, which account each repo uses, which keys: with aide these are a few small files, not habits you rebuild from memory. Commit them, and a new laptop, a container or a teammate starts with the limits you already chose.
~/.config/aide/ βββ profiles/ repo β account βββ sandbox.yaml the line βββ secrets/ keys, encrypted βββ provisioning.yaml plugins, MCP, hooks βββ config.yaml defaults
Plain YAML you can read and review. Every command that changes the line, such as aide cap enable or aide sandbox deny, writes one of these files.
New laptop. Bring the repo.$ git clone git@github.com:you/aide-config.git ~/.config/aideYour age key comes from your password manager or YubiKey. Git never carries it.$ cd ~/work/api && aideπ§ aide Β· work (π€ claude β /usr/local/bin/claude (dir: ~/.claude-work)) π remote match: github.com/acme/* π‘ sandbox: primary (Seatbelt), network outbound only β docker ~/.docker β denied /Users/you/.kube/prod-config (never-allow)Same profile, same tools, same ceiling as the old machine.
A repo can carry its own .aide.yaml naming the tools its work needs. Everyone who clones the repo gets the same request.
aide shows it to you and applies nothing until you trust it. If the file changes later, the trust is withdrawn and you are asked again. A pull request cannot quietly widen the line.
# .aide.yaml, committed with the projectcapabilities: [docker, k8s] $ aide trust# trust this file as it is now$ aide deny# or block it for good
API keys are stored encrypted with your own age key and decrypted in memory at launch. The encrypted file is safe to commit.
aide secrets create workAdd their public key. Everyone decrypts with their own private key, and nobody passes a secret around in chat.
aide secrets rotate work --add-key age1β¦Put the config in the image and pass the key in at run time. The same limits apply to an unattended run.
aide --agent claude -- -p "run tests"Claude Code's status line shows the profile, the sandbox and the tools in use, so you always know where the line is.
aide statusline claude --installtmux, WezTerm, Zellij, kitty, Rex and herdr. One command adds the aide menu, and a sandboxed agent cannot drive your other panes.
aide mux tmux installaws, gcp, docker, k8s, terraform, ssh and more are built in. Make a narrower one from any of them.
aide cap create k8s-dev --extends k8s --deny ~/.kube/prod-configLists every problem a launch would hit in this folder and offers each fix, one at a time.
aide doctor --fixWhen an agent dies with a cryptic message, get a redacted report you can share.
aide --diagnoseToken use and cost for the profile you are in, or across all of them.
aide usage daily