-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
All commands run through the ai-config executable. Running ai-config with no command prints the help text.
Initialize the unified configuration structure under ~/.agents/.
ai-config init # create config dirs and default files
ai-config init --fresh # remove existing config and start overCreates:
-
~/.agents/config/config.json(default unified config) -
~/.agents/config/mcp-config.json(empty MCP server list) -
~/.agents/config/AGENTS.md(shared rules file) -
data/,state/, andcache/directories
--fresh deletes the entire existing ~/.agents/config directory first. Use with care.
Migrate existing provider configurations into the unified layout.
ai-config migrate # migrate all detected providers
ai-config migrate devin # migrate one provider
ai-config migrate --project # migrate the current project's configs
ai-config migrate --all-projects # scan all projects, move skills to ~/.agents/skillsBehavior:
- Without flags: migrates user-level configs for all detected providers (Devin, Windsurf, Claude, Cursor, Codex, Gemini, VS Code, Copilot CLI, Zed, Continue).
- With a provider name: migrates only that provider. Exits non-zero if the provider is unknown.
-
--project: finds the project root (via.gitor.ai) and migrates project-level provider configs. Errors if you are not inside a project. -
--all-projects: scans all projects and migrates their skills into the global~/.agents/skillsdirectory.
Legacy configs are backed up with a .backup extension before changes. See Migration.
Validate the unified configuration setup. Exits non-zero when issues are found.
ai-config validateChecks:
-
config,data,state, andcachedirectories exist -
config.jsonparses and containsshared,providers,context_servers, andskills - Each configured provider and MCP server is listed
- Skills directory counts
*/SKILL.mdentries - If inside a project, reports
.ai/config.jsonand.ai/config.local.jsonpresence
Show current configuration status.
ai-config statusReports directory locations, whether the unified config exists, configured providers, MCP servers, enabled skills, and project detection.
Initialize a .ai/ directory in the current project.
cd your-project
ai-config init-projectRequires a git repository (finds the root via .git). Creates:
-
.ai/config.jsonwith default permissions andread_config_fromflags -
.ai/AGENTS.mdfor project rules -
.ai/skills/directory -
.gitignoreentries for.ai/config.local.jsonand.ai/mcp-config.local.json
Does nothing if .ai/ already exists.
Print the effective configuration for a provider as JSON.
ai-config get-config devinExits non-zero if the unified config cannot be read.
Write the unified config back to each provider's native files. This is the
export direction: migrate imports provider configs into ~/.agents/, and
sync renders ~/.agents/ back out to native locations.
ai-config sync --dry-run # preview every write, touch nothing
ai-config sync # sync providers opted in via config
ai-config sync --provider cursor # sync one provider (repeatable flag)
ai-config sync --all # sync every known provider
ai-config sync --project # project-level targets (must be in a repo)
ai-config sync --prune # remove MCP servers no longer in scopeSync is opt-in. Bare ai-config sync only writes to providers with
"providers.<name>.sync": true in config.json. Detection alone never
pushes config (or credentials in MCP env) into a provider file. Providers
can instead read the unified config directly - see Provider Integration.
By default sync merges: existing keys in provider files are preserved, so
servers added outside the unified config survive a sync. --prune makes the
provider's MCP list an exact mirror of its scoped unified set, removing
extras. Pruned files get a .backup copy first; combine with --dry-run to
preview removals safely.
Per-provider MCP scoping lives in ~/.agents/config/config.json:
{
"providers": {
"cursor": { "mcp": { "include": ["github"] } },
"claude": { "mcp": { "exclude": ["internal-tools"] } }
}
}include is an allowlist; exclude filters the full set. Use it to keep
credential-bearing servers out of providers that don't need them. Servers
flagged "disabled": true in mcp-config.json are never exported, even
when named in include. See Configuration.
What gets written per provider:
-
MCP servers: translated to each provider's shape -
mcpServers(Cursor, Claude, Windsurf, Devin, Gemini),serverswithtypefields (VS Code),context_servers(Zed, stdio only), TOML[mcp_servers.*](Codex), or a YAML list (Continue) -
Rules: unified
AGENTS.mdcontent written as a managed block (<!-- BEGIN ai-config managed -->markers) in file targets likeCLAUDE.md,GEMINI.md,.rules,.github/copilot-instructions.md, or as dedicated files like.cursor/rules/ai-config.mdc -
Provider settings:
providers.<name>settings merged into the provider's native config file -
Skills:
~/.agents/skills/*copied to provider skills directories
Existing native files are merged, not overwritten - other keys in a provider's config file are preserved, and managed-block rules can be re-synced safely.
Set a single configuration value for a provider.
ai-config set-config devin model your-model-name
ai-config set-config devin theme_mode dark
ai-config set-config devin verbose true<value> is parsed as JSON first and falls back to a plain string, so true, 42, ["a"], and {"k":1} are stored as real JSON types.
DevArtsLab/tool-universal-ai-config | MIT License | pip install universal-ai-config