## Examples

{% tabs %}
{% tab label="Create a new lib" %}

```shell
nx g lib my-lib
```

{% /tab %}
{% tab label="Create a new lib under a directory" %}

The following will create a library at `libs/shared/my-lib`.

```shell
nx g lib my-lib --directory=shared
```

{% /tab %}
{% /tabs %}
