ai.local.json
ai.local.json is a companion file to ai.json designed for configuration that should not be shared with your team or committed to version control.
Create a file named ai.local.json in the same directory as your ai.json:
{ "mcp": { "github": { "env": { "GITHUB_TOKEN": "ghp_my_secret_token" } } }}When you run aix install, settings in ai.local.json are merged on top of ai.json.
Best Practices
Section titled “Best Practices”1. Ignore it in git
Section titled “1. Ignore it in git”Always add ai.local.json to your .gitignore:
ai.local.json.aix/2. Store secrets here
Section titled “2. Store secrets here”Do not put API keys or tokens in ai.json. Instead, reference environment variables (${VAR}) in ai.json and set them in your shell, OR define them directly in ai.local.json.
3. Developer preferences
Section titled “3. Developer preferences”Use ai.local.json to enable or disable tools locally without affecting teammates.
Example: turning off a noisy linter rule locally
{ "rules": { "strict-linting": false }}Restrictions
Section titled “Restrictions”Unlike the main ai.json, ai.local.json does not support the extends field. It is designed to be a flat patch file, not part of a complex inheritance chain.
CLI Support
Section titled “CLI Support”Most aix commands support a --local (or -l) flag to operate on the local config instead of the shared one.
# Add an MCP server to local config onlyaix add mcp github --local
# Remove a rule from local config onlyaix remove rule strict-linting --local