aix is a unified configuration manager for AI agent editors (e.g., Claude Code, Cursor, Copilot, Zed). It provides a single source of truth via an ai.json file to manage:
- MCP Servers: Model Context Protocol servers for extending agent capabilities.
- Skills: Reusable agent behaviors and tools.
- Rules: System instructions and coding standards.
- Prompts: Workflow definitions and slash commands.
The project is structured as a TypeScript monorepo using npm workspaces.
packages/cli: Theoclif-based CLI tool (@a1st/aix). Handles user commands, interactive prompts (using Ink/React), and editor installations.packages/core: Core logic for configuration discovery, loading, inheritance (extends), merging, and filesystem operations.packages/schema: Centralized Zod schemas defining the structure ofai.jsonand internal types.packages/mcp-registry-client: Client for fetching metadata from the official MCP registry.packages/site: (TBD) Documentation or landing site.
- Language: TypeScript (ESM)
- Frameworks:
oclif(CLI),Ink(CLI UI),React - Validation:
Zod - Testing:
Vitest - Linting/Formatting:
oxlint,oxfmt - Build Tool:
tsc(TypeScript Compiler)
npm run build: Build all packages in the monorepo.npm run test: Run all tests across workspaces.npm run standards: Run lint, format check, and typecheck.npm run lint: Runoxlintfor fast linting.npm run format: Format code usingoxfmt.npm run typecheck: Runtsc --noEmitto verify types.
npm run dev -w @a1st/aix: Run the CLI in development mode usingts-node.
- ESM First: All packages use
"type": "module". - Schema-Driven: All configuration changes must adhere to the schemas in
packages/schema. - Testing: New features or bug fixes should include tests in the relevant
__tests__directory. - Fast Linting: Use
oxlintfor linting. Configuration is in.oxlintrc.json. - Formatting: Use
oxfmt. Configuration is in.oxfmtrc.json. - Atomic Writes: Core logic should prioritize atomic file writes with backups (handled by
packages/core). - Releases: Releases are triggered by pushing a signed git tag (e.g.,
git tag -s vX.Y.Z -m "vX.Y.Z"). Usenpm run version:bumpto update versions across the monorepo before tagging.
ai.json: The primary configuration file for a workspace.package.json: Monorepo root configuration and shared scripts.packages/schema/src/config.ts: Defines the mainAiJsonConfigschema.packages/cli/src/commands/: Implementation of CLI commands (init, add, install, etc.).packages/core/src/loader.ts: Logic for loading and mergingai.jsonfiles.