CommandKit Plugins
CommandKit offers a powerful plugin api that allows you to extend the functionality of your CommandKit application. This means you can create custom plugins that add new features, modify existing ones, or even change the way CommandKit works. CommandKit offers two types of plugins:
- Compiler Plugins: These plugins are used at compile time to modify the way CommandKit compiles your application. They are used to add new features or modify existing ones. For example, you can use a compiler plugin to transform the source code itself (e.g. CommandKit's
use cache
oruse macro
directives). - Runtime Plugins: These plugins are used at runtime to modify the way CommandKit works. They are used to add new features or modify existing ones. For example, you can use a runtime plugin to add new commands or even custom handlers.
Official Plugins
CommandKit provides a set of official plugins that you can use to extend the functionality of your application.
- @commandkit/redis: This plugin registers a redis cache provider for CommandKit. It allows you to store cached data in redis.
- @commandkit/i18n: This plugin enables internationalization (i18n) for CommandKit using i18next. It allows you to translate your application into different languages.
- @commandkit/legacy: This plugin enables legacy commands and events handler in CommandKit. This is useful if you are migrating from an older version of CommandKit and want to incrementally upgrade your application without making major changes.