Skip to content

aix init

Creates a new ai.json file in the current directory.

Terminal window
aix init [flags]
FlagDescription
--force / -fOverwrite existing ai.json if it exists.
--from <editor>Import supported config from an existing editor.
--extends <ref>Set the extends reference in the new ai.json.
--lockCreate ai.lock.json beside the new config.
--scope <scope> / --user / --projectSet the scope field (user or project).

The --extends flag accepts any reference type: local paths, URLs, git repos, or npm packages.

Terminal window
# Initialize with an extends reference
aix init --extends github:company/ai-config
# Initialize with a lockfile
aix init --lock
# Initialize a user-scoped config
aix init --scope user
# Combine both
aix init --extends github:company/ai-config --scope user

The --from flag lets you bootstrap ai.json from:

  • cursor
  • copilot
  • windsurf
  • claude-code
  • zed
  • codex
  • gemini
  • opencode

When importing, aix will:

  1. Read the editor’s config files.
  2. Extract rules, prompts, and MCP settings.
  3. Write extracted content to .aix/imported/.
  4. Generate an ai.json linking to those files.

aix init --from is the right command when you want ai.json to become the source of truth. If you want direct editor-to-editor migration, use aix sync.

See Import from an Editor for details.