> ## 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.

# repository:create

> Generate a new repository class.

Scaffolds a repository class and its test file into the target module. It writes `modules/<module>/src/repositories/<Name>Repository.ts` and `modules/<module>/tests/repositories/<Name>Repository.spec.ts`, and installs the `@ooneex/repository` dependency if it is missing.

## Usage

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

## Examples

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

```bash theme={null}
ooneex repository:create --name=Product
```

```bash theme={null}
ooneex repository:create --name=UserRepository --module=auth --override
```

## Options

| Option       | Description                                                        | Default             |
| ------------ | ------------------------------------------------------------------ | ------------------- |
| `--name`     | Resource name (the `Repository` suffix is appended automatically). | Prompted if omitted |
| `--module`   | Target module.                                                     | `shared`            |
| `--override` | Overwrite an existing file without confirmation.                   | `false`             |

## AI Skill

This command ships a matching `repository:create` skill. Your AI agent uses it to generate a new TypeORM repository class and its test file, then complete the CRUD and domain-specific methods for database operations on an entity.

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

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