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/e7997746676c2b18be64230c918cb998973d18b5/packages/commandkit/src/CommandKit.ts#L71)