CLI configuration
This page documents how the Amplifier CLI assembles its effective configuration: where it reads settings from, which files exist at user vs project scope, which environment variables override which parts, and what defaults apply.
- Settings (
settings.yaml): select bundle, register module sources, set overrides. - Bundles: the actual mount plan content (providers/tools/hooks/agents/system instructions).
- Environment variables: last-mile overrides (especially module resolution and credentials).
Older versions used profiles and collections. These still work but are deprecated.
For new projects: Use bundles exclusively. See Bundle fundamentals.
For existing projects: See migration guide.
Where the CLI reads and writes
The CLI uses a “project + user” directory convention (plus a local settings file for machine-specific overrides).
User home (~/.amplifier/)
~/.amplifier/settings.yaml— global settings (always enabled)~/.amplifier/keys.env— API keys loaded into environment on startup~/.amplifier/bundles/— installed bundles~/.amplifier/cache/— module git cache (module resolution)~/.amplifier/projects/<project>/sessions/<id>/— saved sessions/transcripts/events~/.amplifier/repl_history— interactive history~/.amplifier/collections/— (deprecated) installed collections
Project workspace (.amplifier/)
.amplifier/settings.yaml— project settings (commit this for teams).amplifier/settings.local.yaml— local-only settings (do not commit).amplifier/AGENTS.md— project-specific agent instructions (see AGENTS.md loading).amplifier/modules/— workspace modules (local development override layer).amplifier/bundles/— project-local bundles.amplifier/profiles/— (deprecated) project profiles.amplifier/agents/— (deprecated) project agents.amplifier/collections/— (deprecated) project-local collections
Settings files and precedence
The CLI uses the amplifier-config library (three-scope configuration) with CLI-specific paths and
guardrails.
- User (global):
~/.amplifier/settings.yaml - Project:
.amplifier/settings.yaml - Local (machine-specific):
.amplifier/settings.local.yaml - Merge order: user → project → local (later wins)
-
Special rule: when you run the CLI from your home directory, project/local scopes are disabled to prevent
confusing “
~/.amplifier/settings.local.yamlonly applies when cwd is ~”.
Code references: amplifier-app-cli/amplifier_app_cli/paths.py, amplifier-config/src/amplifier_config/manager.py.
Settings schema (what keys exist)
Settings are YAML. The CLI reads several top-level keys to determine bundle/module configuration.
Current (Bundle-Based) Configuration
# ~/.amplifier/settings.yaml (recommended for new projects)
# 1) Active bundle (primary configuration)
bundle:
active: foundation # or recipes, design-intelligence, lsp-python, etc.
# 2) Module source overrides (optional)
sources:
tool-bash: /home/me/dev/amplifier-module-tool-bash # Local development
provider-anthropic: git+https://github.com/microsoft/amplifier-module-provider-anthropic@main
# 3) Provider configuration (optional, often set in bundle)
config:
providers:
- module: provider-anthropic
config:
default_model: claude-sonnet-4-5
api_key: ${ANTHROPIC_API_KEY} # From environment
# 4) Registered modules (additional modules beyond bundle)
modules:
tools:
- module: tool-my-custom
source: git+https://github.com/me/tool-custom@main
hooks:
- module: hooks-my-logging
source: /home/me/dev/my-hooks
Legacy (Deprecated) Configuration
# OLD STYLE - Still works but deprecated
# Profile selection (replaced by bundles)
profile:
active: developer-expertise:dev
default: developer-expertise:dev
# Collection source overrides (replaced by bundles)
collection_sources:
toolkit: /home/me/dev/amplifier-collection-toolkit
These settings still function but will be removed in a future version. Migrate to bundles.
Configuration Precedence
When the CLI determines what to run:
- Bundle (if set) -
bundle.activetakes precedence - Profile (if no bundle) - Falls back to
profile.active(deprecated) - Module overrides - Settings can override individual modules from bundle
- Environment variables - Final override layer
bundle.active. Avoid mixing bundles and profiles in the same project.
Code reference for the overlay behavior: amplifier-app-cli/amplifier_app_cli/runtime/config.py.
How the CLI picks profile vs bundle
The run command decides your configuration source in this order:
--bundle(explicit bundle mode)bundle.activein merged settings (bundle mode opt-in)--profile(profile override for this run)profile.activein settings (local > project > user)- System default (compiled into the CLI package)
The system default profile is read from amplifier_app_cli/data/profiles/DEFAULTS.yaml.
Module resolution and overrides (what wins)
The CLI mounts a resolver from amplifier-module-resolution, which uses a fixed resolution order.
This is what makes “I’m developing module X locally” work without changing profiles.
- Environment:
AMPLIFIER_MODULE_<MODULE_ID>=<source> - Workspace convention:
.amplifier/modules/<module_id>/ - Settings:
sources:andmodules.*[].sourcefrom settings - Collections: modules packaged inside installed collections
- Profile hint:
source:specified in the profile/bundle - Installed package: entry points from installed Python packages
Code references: CLI wiring in paths.py, amplifier-module-resolution/src/.../resolvers.py.
Provider credentials: keys.env and env vars
The CLI loads ~/.amplifier/keys.env on startup and injects any key/value pairs into the process
environment if they’re not already set.
Code reference: amplifier_app_cli/key_manager.py.
# Example keys.env entries (written by CLI commands)
ANTHROPIC_API_KEY="..."
OPENAI_API_KEY="..."
AZURE_OPENAI_ENDPOINT="https://...openai.azure.com"
ANTHROPIC_API_KEY).
The set of credential env vars is provider-specific and lives in provider module code, not in the CLI.
Environment variables used by the CLI ecosystem
| Env var | Where it applies | What it does |
|---|---|---|
AMPLIFIER_HOME |
Bundles / foundation | Overrides the default home directory used by foundation’s bundle registry and caches (default: ~/.amplifier). |
AMPLIFIER_MODULE_<ID> |
Module resolution | Highest-precedence module source override (beats workspace/settings/collections/profile). |
AMPLIFIER_MODULES |
Kernel fallback | Colon-separated search paths for module discovery when no source resolver is mounted (entry points + filesystem scan). |
AMPLIFIER_AGENT_<NAME> |
Agent resolution | Overrides an agent file path (used by agent resolver; useful for local agent development). |
AMPLIFIER_BANNER_STYLE |
CLI UX | Selects interactive banner style (e.g. matrix, retro). |
_AMPLIFIER_COMPLETE |
CLI UX | Shell completion plumbing used by the CLI completion integration. |
SHELL |
CLI UX | Used to auto-detect your shell when printing completion setup instructions. |
AMPLIFIER_GIT_HOST |
Module downloads | Rewrites GitHub URLs to a shadow git host for isolated/test environments. |
GITHUB_TOKEN |
Module downloads / status | Used for GitHub API access (e.g. update checks and certain resolver behaviors). |
Env var expansion inside settings
The CLI expands ${VAR} and ${VAR:default} inside the resolved config
right before session creation. This is primarily used for credential injection without committing secrets.
config:
providers:
- module: provider-anthropic
config:
default_model: claude-sonnet-4-5
api_key: ${ANTHROPIC_API_KEY:}
Code reference: expand_env_vars().
Additional references:
foundation: get_amplifier_home(),
core: AMPLIFIER_MODULES discovery.
Important markdown files the CLI can load
The CLI is not “just a prompt runner”: it resolves profiles, agents, and bundle resources from the filesystem and can also
resolve @mentions that include markdown files into prompts/context.
- Profiles:
.amplifier/profiles/*.md,~/.amplifier/profiles/*.md, plus profiles inside collections. - Agents:
.amplifier/agents/*.md,~/.amplifier/agents/*.md, plus agents inside collections/bundles. - Bundles:
bundle.mdinside.amplifier/bundles/or~/.amplifier/bundles/bundle directories. - AGENTS.md (common convention):
~/.amplifier/AGENTS.md,.amplifier/AGENTS.md(often referenced by default contexts). - Mentions: the CLI supports shortcuts like
@user:path→~/.amplifier/pathand@project:path→.amplifier/path.
Code references: amplifier-profiles agent resolver, CLI mention resolver.
AGENTS.md (why it feels “special”)
AGENTS.md is referenced via @mentions and can be pulled into the session’s system message by the CLI’s mention expansion.
See AGENTS.md Loading.