Skip to main content
Version: Next

onApplicationBootstrap

onApplicationBootstrap(fn): void

Registers a bootstrap hook that will be called when the CommandKit instance is created. This is useful for plugins that need to run some code after the CommandKit instance is fully initialized.

```ts
* import { onApplicationBootstrap } from 'commandkit';

onApplicationBootstrap(async (commandkit) => {
// Do something with the commandkit instance
})

| Parameter | Type | Optional | Description |
| ----------- | ----------- | ----------- | ----------- |
| fn | F | ❌ | The bootstrap function to register. |


- [Source](https://github.com/underctrl-io/commandkit/blob/141d1404ab18a8e659209a0fab65466bf3b6dd85/packages/commandkit/src/CommandKit.ts#L67)