### Standard aix install Source: https://aix.a1st.dev/cli/install Executes a standard installation by reading local configuration files. ```bash aix install ``` -------------------------------- ### Limit Editor Installation (Array) Source: https://aix.a1st.dev/llms-full.txt Specify a list of editors to install AI configuration to, using an array of strings. ```json { "editors": ["cursor", "copilot", "opencode"] } ``` -------------------------------- ### Install to specific editor Source: https://aix.a1st.dev/cli/install Limits the installation to a single specified editor, such as GitHub Copilot. ```bash aix install --target copilot ``` -------------------------------- ### Install AIX CLI Source: https://aix.a1st.dev/llms-full.txt Install the AIX CLI globally using npm. Ensure Node.js and npm meet the specified version requirements before installation. ```bash npm install -g @a1st/aix ``` -------------------------------- ### Install remote config and save locally Source: https://aix.a1st.dev/cli/install Installs configuration from a remote source and saves it to the local `ai.json` file. ```bash aix install github:company/ai-config --save ``` -------------------------------- ### Install only specific fields Source: https://aix.a1st.dev/cli/install Installs only the specified fields (e.g., MCP servers) from the configuration. ```bash aix install --only mcp ``` -------------------------------- ### Example Prompt File Content Source: https://aix.a1st.dev/llms-full.txt This is an example of a prompt file written in markdown. The content is preserved as-is and can include instructions, context, and formatting. ```markdown Review the selected code for: 1. Logic errors 2. Security vulnerabilities 3. Performance bottlenecks Provide the output in markdown format with code blocks for suggested fixes. ``` -------------------------------- ### Skill Frontmatter Example Source: https://aix.a1st.dev/concepts/skills Example of frontmatter metadata for a skill. This includes the skill's name and a description. ```yaml --- name: react-expertdescription: Expert knowledge for React 19 and Next.js 14+--- ``` -------------------------------- ### Install remote config directly Source: https://aix.a1st.dev/cli/install Installs configuration directly from a remote source like a GitHub repository. ```bash aix install github:company/ai-config ``` -------------------------------- ### Clean .aix folder before install Source: https://aix.a1st.dev/cli/install Ensures a fresh installation state by removing the `.aix` folder before proceeding. ```bash aix install --clean ``` -------------------------------- ### Skill Structure Example (SKILL.md) Source: https://aix.a1st.dev/llms-full.txt A typical skill is defined in a SKILL.md file, containing frontmatter for metadata like name and description, followed by markdown instructions for the AI. ```markdown --- name: react-expert description: Expert knowledge for React 19 and Next.js 14+ --- # React Expert You are an expert in React. Follow these principles: 1. Always use functional components. 2. Prefer hooks for state management. ... ``` -------------------------------- ### Verify AIX Installation Source: https://aix.a1st.dev/llms-full.txt Verify that the AIX CLI has been installed correctly by checking its version. This command should be run after the global installation. ```bash aix --version ``` -------------------------------- ### Configure Editors with Array Shorthand Source: https://aix.a1st.dev/configuration/ai-json-reference Specify a list of editors to install or configure using an array shorthand. ```json { "editors": ["cursor", "copilot", "claude-code", "opencode"] } ``` -------------------------------- ### Updated ai.json with Configurations Source: https://aix.a1st.dev/getting-started/quick-start An example of an ai.json file after adding a rule, a prompt, and an MCP server. Note the GITHUB_TOKEN environment variable for the MCP server. ```json { "skills": {}, "mcp": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" } } }, "rules": { "typescript-strict": { "content": "Always use TypeScript strict mode" } }, "prompts": { "review": "./prompts/review.md" } } ``` -------------------------------- ### Limit Editor Installation (Object) Source: https://aix.a1st.dev/llms-full.txt Control editor installation using an object, enabling or disabling specific editors. ```json { "editors": { "cursor": { "enabled": true }, "copilot": { "enabled": true }, "opencode": { "enabled": true }, "windsurf": { "enabled": false } } } ``` -------------------------------- ### Local Configuration Override Example Source: https://aix.a1st.dev/llms-full.txt An example of an ai.local.json file used for local configuration overrides, such as storing sensitive GitHub tokens. This file is intended to be ignored by version control. ```json { "mcp": { "github": { "env": { "GITHUB_TOKEN": "ghp_my_secret_token" } } } } ``` -------------------------------- ### Updated `ai.json` with Configuration Source: https://aix.a1st.dev/llms-full.txt This JSON shows an example of `ai.json` after adding a rule, a prompt, and an MCP server using the `aix add` commands. It includes the configurations for `mcp`, `rules`, and `prompts`. ```json { "skills": {}, "mcp": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" } } }, "rules": { "typescript-strict": { "content": "Always use TypeScript strict mode" } }, "prompts": { "review": "./prompts/review.md" } } ``` -------------------------------- ### Extend Configuration from a Single Source Source: https://aix.a1st.dev/llms-full.txt Example of using the 'extends' field in ai.json to inherit configuration from a single remote source, such as a GitHub repository. ```json { "extends": "github:my-org/ai-standards" } ``` -------------------------------- ### Apply AIX configuration to editors Source: https://aix.a1st.dev/llms-full.txt Use `aix install` to apply `ai.json` configurations to editors. You can specify a target editor with `--target`, perform a preview with `--dry-run`, or refresh the lockfile with `--lock`. ```bash aix install [source] [flags] ``` ```bash # Standard install: aix install ``` ```bash # Install only to GitHub Copilot: aix install --target copilot ``` ```bash # Install a remote config directly: aix install github:company/ai-config ``` ```bash # Install remote config and save it to your local ai.json: aix install github:company/ai-config --save ``` ```bash # Install only MCP servers: aix install --only mcp ``` ```bash # Refresh the lockfile, then install: aix install --lock ``` ```bash # Override scope to install as user-level config: aix install --scope user ``` -------------------------------- ### Sync Copilot Config to Zed Source: https://aix.a1st.dev/llms-full.txt Use this command to copy supported GitHub Copilot configurations into Zed. Review the comparison guide first to understand expected differences in terminology, paths, and support. ```bash aix sync copilot --to zed ``` -------------------------------- ### Setup AIX Shell Autocomplete Source: https://aix.a1st.dev/llms-full.txt Enable tab completion for AIX commands and flags by running the `aix autocomplete` command. Follow the on-screen instructions to integrate the completion script into your shell's profile. ```bash aix autocomplete ``` -------------------------------- ### Filter MCP Server Tools and Resources Source: https://aix.a1st.dev/llms-full.txt Restrict the tools and resources an MCP server exposes to the AI. This example configures a filesystem server to only allow reading and listing files, excluding write operations. ```json { "mcp": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."], "tools": { "include": ["read_file", "list_directory"], "exclude": ["write_file", "edit_file"] } } } } ``` -------------------------------- ### Initialize ai.json Source: https://aix.a1st.dev/getting-started/quick-start Run this command in your project root to create a minimal ai.json file. Use the --from flag to import existing editor configurations. ```bash aix init ``` ```bash aix init --from cursor ``` -------------------------------- ### Combine Initialization Options Source: https://aix.a1st.dev/cli/init Initializes a new ai.json file with both an 'extends' reference and a 'user' scope, also creating a lockfile. ```bash aix init --extends github:company/ai-config --scope user --lock ``` -------------------------------- ### Initialize with Lockfile Source: https://aix.a1st.dev/cli/init Initializes a new ai.json file and creates a corresponding ai.lock.json file. ```bash aix init --lock ``` -------------------------------- ### Initialize with Extends Reference Source: https://aix.a1st.dev/cli/init Initializes a new ai.json file and sets the 'extends' field to a specified reference, such as a GitHub repository. ```bash aix init --extends github:company/ai-config ``` -------------------------------- ### Initialize Minimal `ai.json` Source: https://aix.a1st.dev/llms-full.txt Run `aix init` in your project root to create a basic `ai.json` file. This command generates a minimal configuration structure if no existing configuration is detected. ```bash aix init ``` -------------------------------- ### Initialize aix Configuration Source: https://aix.a1st.dev/cli/init Creates a new ai.json file in the current directory. Use flags to customize initialization. ```bash aix init [flags] ``` -------------------------------- ### Refresh lockfile and install Source: https://aix.a1st.dev/cli/install Refreshes the `ai.lock.json` file before performing the installation. Requires `--save` when used with a remote source. ```bash aix install --lock ``` -------------------------------- ### Initialize Starlight Theme Provider Source: https://aix.a1st.dev/editors/migrations/how-to-migrate-from-zed-to-opencode Initializes the theme provider by checking local storage or system preferences. Sets the initial theme for the document. ```javascript const StarlightThemeProvider = (() => { const storedTheme = typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme'); const theme = storedTheme || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'); document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark'; return { updatePickers(theme = storedTheme || 'auto') { document.querySelectorAll('starlight-theme-select').forEach((picker) => { const select = picker.querySelector('select'); if (select) select.value = theme; /** @type {HTMLTemplateElement | null} */ const tmpl = document.querySelector(`#theme-icons`); const newIcon = tmpl && tmpl.content.querySelector('.' + theme); if (newIcon) { const oldIcon = picker.querySelector('svg.label-icon'); if (oldIcon) { oldIcon.replaceChildren(...newIcon.cloneNode(true).childNodes); } } }); }, }; })(); ``` -------------------------------- ### Initialize AIX config from an editor Source: https://aix.a1st.dev/getting-started/import-from-editor Use `aix init --from` to convert an editor's existing AI configuration into an `ai.json` file for AIX. Specify the source editor using its flag value. ```bash aix init --from ``` -------------------------------- ### Limit AIX Installation to Specific Editors Source: https://aix.a1st.dev/configuration/editor-configuration Use the `editors` field to specify an array of editor names to limit AIX installation. This ensures AIX only syncs configuration to the listed editors. ```json { "editors": ["cursor", "copilot", "opencode"] } ``` -------------------------------- ### Override scope for user-level config Source: https://aix.a1st.dev/cli/install Overrides the `scope` from `ai.json` to install configuration as user-level settings. ```bash aix install --scope user ``` -------------------------------- ### Ignore ai.local.json in Git Source: https://aix.a1st.dev/llms-full.txt Example .gitignore content to ensure ai.local.json and the .aix directory are not committed to version control. ```text ai.local.json .aix/ ``` -------------------------------- ### Import Configuration from Editor Source: https://aix.a1st.dev/cli/init Initializes a new ai.json file by importing configuration settings from a specified editor. The extracted content is saved to .aix/imported/, and ai.json links to these files. ```bash aix init --from cursor ``` -------------------------------- ### Define Hooks in ai.json Source: https://aix.a1st.dev/concepts/hooks Define custom hooks in your ai.json configuration file. This example shows how to set up hooks for 'session_start' and 'pre_tool_use' events. ```json { "hooks": { "session_start": [ { "matcher": ".*", "hooks": [ { "command": "./scripts/init-session.sh", "show_output": true } ] } ], "pre_tool_use": [ { "matcher": "write_file", "hooks": [ { "command": "echo 'AI is writing to a file...'" } ] } ] } } ``` -------------------------------- ### Sync Windsurf to Cursor Configuration Source: https://aix.a1st.dev/editors/migrations/how-to-migrate-from-windsurf-to-cursor This command synchronizes configuration from Windsurf to Cursor using the AIX CLI. It's part of a migration guide. ```bash aix sync windsurf --to cursor ``` -------------------------------- ### Initialize a new AIX configuration Source: https://aix.a1st.dev/llms-full.txt Use `aix init` to create a new `ai.json` file. The `--extends` flag can set an initial reference, and `--scope` can define if it's user or project-level. ```bash aix init [flags] ``` ```bash # Initialize with an extends reference aix init --extends github:company/ai-config ``` ```bash # Initialize with a lockfile aix init --lock ``` ```bash # Initialize a user-scoped config aix init --scope user ``` ```bash # Combine both aix init --extends github:company/ai-config --scope user ```