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

# analytics:create

> Generate a new analytics class.

Scaffolds an analytics class and its test file in a module. It writes the class under the module's `src/analytics` directory, generates a matching test spec, and installs the `@ooneex/analytics` package if it is missing.

## Usage

```bash theme={null}
ooneex analytics:create [options]
```

## Examples

```bash theme={null}
ooneex analytics:create
```

```bash theme={null}
ooneex analytics:create --name=PageView
```

```bash theme={null}
ooneex analytics:create --name=PageView --module=tracking --override
```

## Options

| Option       | Description                                                             | Default             |
| ------------ | ----------------------------------------------------------------------- | ------------------- |
| `--name`     | Analytics class name. The `Analytics` suffix is appended automatically. | Prompted if omitted |
| `--module`   | Target module the class is generated into.                              | `shared`            |
| `--override` | Overwrite an existing class without prompting.                          | `false`             |

## AI Skill

This command ships a matching `analytics:create` skill. It generates the analytics class and its test file, then guides your AI agent through completing an analytics tracking class built on the `@ooneex/analytics` package.

<Tabs>
  <Tab title="Claude">
    ```bash theme={null}
    ooneex claude:init
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    ooneex codex:init
    ```
  </Tab>
</Tabs>
