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

# generate

> Generate new Zopio modules and components

# generate Command

The `generate` command creates new modules, components, and other code artifacts for your `zopio` project.

## Usage

```bash theme={"system"}
zopio generate <type> <name> [options]
```

## Arguments

* `type` - Type of module to generate (core | addon | data | i18n)
* `name` - Name of the module

## Options

* `-d, --directory <directory>` - Custom directory for the module

## Examples

<CodeGroup>
  ```bash i18n theme={"system"}
  zopio generate i18n user-messages
  ```

  ```bash core theme={"system"}
  zopio generate core authentication
  ```

  ```bash custom directory theme={"system"}
  zopio generate addon analytics --directory src/features
  ```
</CodeGroup>

## Module Types

### core

Core modules contain essential functionality for your application.

```bash theme={"system"}
zopio generate core <name> [options]
```

Generated structure:

```
src/core/<name>/
├─ index.ts
├─ types.ts
├─ hooks.ts
└─ utils.ts
```

### addon

Addon modules extend your application with additional features.

```bash theme={"system"}
zopio generate addon <name> [options]
```

Generated structure:

```
src/addons/<name>/
├─ index.ts
├─ components/
└─ hooks/
```

### data

Data modules handle data fetching, state management, and API interactions.

```bash theme={"system"}
zopio generate data <name> [options]
```

Generated structure:

```
src/data/<name>/
├─ index.ts
├─ api.ts
├─ hooks.ts
└─ types.ts
```

### i18n

Internationalization modules manage translations and localized content.

```bash theme={"system"}
zopio generate i18n <name> [options]
```

Generated structure:

```
dictionaries/
├─ en/
│  └─ <name>.json
├─ tr/
│  └─ <name>.json
└─ index.ts
```

<Alert type="tip">
  All generated modules include TypeScript type definitions and are compatible with the `zopio` internationalization system.
</Alert>
