# Other options
likec4 gen hello --project my-project --use-dot
```

## Reusable Generators

There is also helper function `defineGenerators` to define reusable generators:

```ts
// shared_generators.ts
import { defineGenerators } from 'likec4/config'

export default defineGenerators({
  'hello': async ({ likec4model, ctx }) => {
    await ctx.write({
      path: 'hello.txt', // relative to the project root
      content: `Project: ${likec4model.project.id}`,
    })
  },
})
```
Now you can use it in your configs:

```ts
// likec4.config.ts
import { defineConfig } from 'likec4/config'
import generators from './shared_generators'

export default defineConfig({
  name: 'my-project',
  title: 'My Project',
  generators,
})
```

:::tip
You can also use smaller package `@likec4/config`:

```ts
import { defineGenerators } from '@likec4/config'

export default defineGenerators({
  'hello': async ({ likec4model, ctx }) => {
    await ctx.write({
      path: 'hello.txt', // relative to the project root
      content: `Project: ${likec4model.project.id}`,
    })
  },
})
```

:::