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

# service:create

> Generate a new service class with its test file.

Generates a service class in the target module. It writes `modules/<module>/src/services/<Name>Service.ts` and a mirrored `modules/<module>/tests/services/<Name>Service.spec.ts`, and installs the `@ooneex/service` dependency when missing.

## Usage

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

## Examples

Run with no flags to be prompted for the service name:

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

Create a service non-interactively in a specific module:

```bash theme={null}
ooneex service:create --name=Invoice --module=billing
```

```bash theme={null}
ooneex service:create --name=UserProfile
```

## Options

| Option       | Description                                                                | Default             |
| ------------ | -------------------------------------------------------------------------- | ------------------- |
| `--name`     | Service name (normalized to PascalCase, the `Service` suffix is appended). | Prompted if omitted |
| `--module`   | Target module.                                                             | `shared`            |
| `--override` | Overwrite an existing service file without confirmation.                   | `false`             |

## AI Skill

This command ships a matching `service:create` skill. The skill generates the service class and test file, then completes the implementation — defining a proper data type, implementing `execute()` with the business logic, and injecting dependencies through the constructor. Your AI agent uses it when creating a new business-logic service that implements `IService` from `@ooneex/service`.

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

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