Skip to content

ai.json Reference

ai.json is the single configuration file that aix uses to sync your AI editor settings. It supports JSONC (comments and trailing commas).

Add the $schema field for IDE autocompletion and inline validation:

{
"$schema": "https://x.a1st.dev/schemas/v1/ai.json"
}
FieldTypeDescription
$schemastringJSON Schema URL for IDE validation
extendsstring | string[]Inherit from other configs
skillsobjectMap of skill names to skill references
mcpobjectMap of server names to MCP server configs
rulesobjectMap of rule names to rule definitions
promptsobjectMap of prompt names to prompt definitions
editorsobject | string[]Editor targeting and editor-specific settings
hooksobjectLifecycle hooks for AI agent events
aixobjectaix tool settings (cache, backups)

Inherit from other configurations. Supports a single string or an array. Configs are resolved and deep-merged in order — later entries override earlier ones.

{
"extends": "github:company/ai-config"
}
{
"extends": ["@company/aix-base", "github:team/project-overrides", "./local-overrides.json"]
}

Source types:

  • npm package: "@company/aix-config" or "aix-config-react"
  • Git shorthand: "github:user/repo", "gitlab:org/repo#v2.0"
  • URL: "https://raw.githubusercontent.com/..."
  • Local path: "./configs/base.json"

See Config Inheritance for merge semantics.


Map of skill names to skill references. Skill names must be lowercase alphanumeric with hyphens (max 64 characters). See Skills for the full concept.

{
"skills": {
"react": "^1.0.0",
"custom": "./skills/custom",
"remote": "github:user/skills#v2.0"
}
}
{
"skills": {
"react": {
"source": {
"git": "github:user/repo",
"ref": "v2.0",
"path": "skills/react"
},
"enabled": true,
"config": {
"framework": "nextjs"
}
}
}
}
{
"skills": {
"inherited-skill": false
}
}

Map of server names to MCP server configurations. See MCP Servers for the full concept.

{
"mcp": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
},
"cwd": ".",
"shell": false
}
}
}
FieldTypeDefaultDescription
commandstringCommand to run
argsstring[][]Command arguments
envobject{}Environment variables. Use ${VAR} for shell expansion.
cwdstring.Working directory
shellbooleanfalseRun in a shell
{
"mcp": {
"remote-server": {
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer ${TOKEN}"
},
"timeout": 30000
}
}
}
FieldTypeDefaultDescription
urlstringMCP endpoint URL (Streamable HTTP)
headersobject{}Request headers
timeoutnumberConnection timeout in ms
validateOriginbooleantrueValidate server origin

These fields apply to both transport types:

FieldTypeDefaultDescription
enabledbooleantrueEnable/disable the server
toolsstring[] | objectTool access control. Array of allowed tool names, or { include: [], exclude: [] }.
disabledToolsstring[]Tool names to disable
resourcesstring[] | objectResource access control. Array of allowed patterns, or { include: [], exclude: [] }.
autoStartbooleantrueStart with editor
restartOnFailurebooleantrueAuto-restart on crash
maxRestartsnumber3Max restart attempts
{
"mcp": {
"inherited-server": false
}
}

Map of rule names to rule definitions. See Rules.

{
"rules": {
"code-style": "./rules/style.md",
"remote-rule": "github:company/rules#main/typescript.md"
}
}
{
"rules": {
"code-style": {
"activation": "always",
"content": "Always use TypeScript strict mode."
},
"testing": {
"activation": "glob",
"globs": ["**/*.test.ts", "**/*.spec.ts"],
"path": "./rules/testing.md"
},
"security": {
"activation": "auto",
"description": "Apply when working on authentication or authorization code.",
"path": "./rules/security.md"
}
}
}
FieldTypeDefaultDescription
activationstring"always""always", "auto", "glob", or "manual"
descriptionstringWhen the rule applies (required for "auto" mode)
globsstring[]File patterns (required for "glob" mode)
contentstringInline rule text
pathstringPath to a markdown file
gitobject{ url, ref, path } for git-hosted rules
npmobject{ npm, path, version } for npm-hosted rules

One source field (content, path, git, or npm) is required.


Map of prompt names to prompt definitions. See Prompts.

{
"prompts": {
"review": "./prompts/review.md",
"plan": "./prompts/plan.md"
}
}
{
"prompts": {
"review": {
"description": "Review code changes for quality issues",
"argumentHint": "[file] [message]",
"path": "./prompts/review.md"
}
}
}
FieldTypeDescription
descriptionstringShown in the editor’s command picker
argumentHintstringHint for arguments (e.g., "[file] [message]")
contentstringInline prompt text
pathstringPath to a markdown file
gitobject{ url, ref, path } for git-hosted prompts
npmobject{ npm, path, version } for npm-hosted prompts

Configure which editors to install to and provide editor-specific settings.

{
"editors": ["cursor", "vscode", "claude-code"]
}
{
"editors": {
"cursor": {
"enabled": true,
"rules": {
"cursor-only": {
"content": "Cursor-specific instructions here"
}
},
"aiSettings": {}
},
"windsurf": {
"enabled": true,
"cascadeSettings": {}
},
"claude-code": {
"enabled": true,
"permissions": {}
}
}
}

If editors is omitted, aix auto-detects installed editors at install time. See Editor Configuration.


Lifecycle hooks for AI agent events. See Hooks.

{
"hooks": {
"session_start": [
{
"matcher": ".*",
"hooks": [
{
"command": "echo 'Session started'",
"timeout": 5,
"show_output": true
}
]
}
]
}
}

Settings for the aix tool itself. These don’t affect AI editor behavior.

{
"aix": {
"cache": {
"maxBackups": 5,
"maxBackupAgeDays": 30,
"maxCacheAgeDays": 7
}
}
}
FieldTypeDefaultRangeDescription
cache.maxBackupsnumber51–100Max backup files to keep
cache.maxBackupAgeDaysnumber301–365Max backup age before cleanup
cache.maxCacheAgeDaysnumber71–365Max cache age before cleanup