# Setup

{% hint style="warning" %}
This section is useful if you want to use `BitfieldProvider`. If you only want to use the permission models, this is not necessary
{% endhint %}

To use this library, you can choose between two methods. If your project supports NestJs injection, you can choose to inject the client or simply use it via a classic import in a project without injection.

### With NestJs injection

In the desired module, you must import `BitfieldManagerModule` .

{% code title="for example : app.module.ts" %}
```typescript
import { BitfieldManagerModule } from '@monordo/bitfield-permission-manager';

@Module({
    imports: [BitfieldManagerModule]
})
export class AppModule {}
```
{% endcode %}

{% hint style="info" %}
Now you can use `BitfieldProvider` in all desired module class
{% endhint %}

### Without NestJs injection

```typescript
import { vidalClient } from '@monordo/bitfield-permission-manager';

(async () => {
    const manager = await bitfieldPermissionManager();
})();

```
