> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/SynkraAI/aiox-core/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Overview

> AIOX CLI architecture, command structure, and global options

The AIOX CLI provides a comprehensive command-line interface for managing AIOX installations, running diagnostics, and working with the framework.

## Command Structure

The AIOX CLI follows a hierarchical command structure:

```bash theme={null}
aiox [command] [subcommand] [options]
```

### Main Entry Points

**Primary CLI**: `npx aiox-core` or `aiox` (if installed globally)

* Installation and project management commands
* System diagnostics and information
* Framework updates and validation

**Modular CLI**: `aiox <category>` (requires local installation)

* Workers discovery (`aiox workers`)
* Configuration management (`aiox config`)
* Quality gates (`aiox qa`)
* Metrics tracking (`aiox metrics`)
* Pro features (`aiox pro`)

## Global Options

These options are available across most commands:

<ParamField path="--version" type="flag">
  Display the installed version of AIOX

  ```bash theme={null}
  npx aiox-core --version
  ```
</ParamField>

<ParamField path="--version -d" type="flag">
  Display detailed version information including installation metadata

  ```bash theme={null}
  npx aiox-core --version -d
  ```

  Shows:

  * Package version
  * Installation mode (project-development or framework-development)
  * Installed and updated timestamps
  * File count and customization status
  * Version comparison with latest
</ParamField>

<ParamField path="--help" type="flag">
  Display help information for any command

  ```bash theme={null}
  npx aiox-core --help
  aiox workers --help
  aiox config show --help
  ```
</ParamField>

<ParamField path="-v, --verbose" type="flag">
  Enable verbose output for detailed logging (command-specific)

  ```bash theme={null}
  aiox update --verbose
  aiox validate --verbose
  ```
</ParamField>

<ParamField path="--json" type="flag">
  Output results in JSON format for CI/CD integration (command-specific)

  ```bash theme={null}
  aiox validate --json
  aiox doctor --json
  ```
</ParamField>

## Exit Codes

The CLI uses consistent exit codes across commands:

* **0**: Success - command completed successfully
* **1**: Validation/check failed - issues detected (run with `--fix` if available)
* **2**: Error - command could not complete due to an error

## CLI Architecture

### Standalone Entry Point

The main CLI (`bin/aiox.js`) is standalone with no external dependencies for `npx` compatibility. This ensures:

* Fast execution for common commands
* Works even if `node_modules` is not installed
* Minimal overhead for simple operations

### Modular Commands

Advanced commands are modular and loaded from `.aiox-core/cli/`:

* Workers discovery
* Configuration management
* Quality gates
* Metrics tracking
* Pro license features

These require a local AIOX installation.

## Common Patterns

### Dry Run Mode

Many commands support `--dry-run` to preview changes:

```bash theme={null}
aiox install --dry-run
aiox validate --repair --dry-run
aiox update --dry-run
aiox config migrate --dry-run
```

### Force Mode

Use `--force` to bypass confirmation prompts:

```bash theme={null}
aiox install --force
aiox uninstall --force
aiox update --force
```

### Quiet Mode

Minimize output with `--quiet` (ideal for CI/CD):

```bash theme={null}
aiox install --quiet --force
aiox doctor --quiet
```

## Getting Help

For detailed help on any command:

```bash theme={null}
# General help
aiox --help

# Command-specific help
aiox init --help
aiox install --help
aiox validate --help

# Subcommand help
aiox config --help
aiox config show --help
aiox workers search --help
```

## Configuration Files

The CLI interacts with several configuration files:

* `.aiox-installation-config.yaml` - Installation metadata
* `.aiox-core/version.json` - Version tracking for updates
* `.aiox-core/install-manifest.yaml` - File integrity manifest
* `.aiox-core/framework-config.yaml` - Framework configuration (L1)
* `.aiox-core/project-config.yaml` - Project configuration (L2)
* `.aiox-core/local-config.yaml` - Local overrides (L4)

## Next Steps

* [init command](/cli/init) - Create new AIOX projects
* [install command](/cli/install) - Install AIOX in existing projects
* [All commands reference](/cli/commands) - Complete command reference
