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

# database:create

> Generate a new database class.

Scaffolds a database class and its test file in a module. It prompts for the database type (Postgres, Redis, or SQLite), writes the class under the module's `src/databases` directory, generates a matching test spec, and installs the `@ooneex/database` package if it is missing.

## Usage

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

## Examples

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

```bash theme={null}
ooneex database:create --name=Analytics
```

```bash theme={null}
ooneex database:create --name=Analytics --module=reporting --override
```

## Options

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

The database type (Postgres, Redis, or SQLite) has no flag and is always selected through an interactive prompt.

## AI Skill

This command ships a matching `database:create` skill. It generates the database class and its test file, then guides your AI agent through completing a database adapter that extends `TypeormDatabase` from `@ooneex/database`.

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

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