Plugin Resourcesedit

Here are some resources that will be helpful for getting started with plugin development

Our IRC channeledit

Many Kibana developers hang out on irc.freenode.net in the #kibana channel. We want to help you with plugin development. Even more than that, we want your help in understanding your plugin goals so we can build a great plugin system for you! If you’ve never used IRC, welcome to the fun. You can get started with the Freenode Web Client.

Some light readingedit

<<<<<<< HEAD - Our {repo}blob/master/CONTRIBUTING.md[contributing guide] can help you get a development environment going - Tim Roes' excellent blog series Writing Kibana Plugins

Videosedit

Our contributing guide can help you get a development environment going. >>>>>>> d26cbef389…​ [DOCS] Adds kibana-pull attribute for release docs (#69554)

Plugin Generatoredit

<<<<<<< HEAD It is recommended that you kick-start your plugin by generating it with the {repo}tree/6.8/packages/kbn-plugin-generator[Kibana Plugin Generator]. Run the following within the Kibana repo and you will be asked a couple questions, see some progress bars, and have a freshly generated plugin ready for you to play within Kibana’s sibling kibana-extra folder.

We recommend that you kick-start your plugin by generating it with the Kibana Plugin Generator. Run the following in the Kibana repo, and you will be asked a couple questions, see some progress bars, and have a freshly generated plugin ready for you to play with in Kibana’s plugins folder. >>>>>>> d26cbef389…​ [DOCS] Adds kibana-pull attribute for release docs (#69554)

node scripts/generate_plugin my_plugin_name # replace "my_plugin_name" with your desired plugin name

Directory structure for pluginsedit

The Kibana directory must be named kibana, and your plugin directory must be located within the sibling kibana-extra folder, for example:

.
├── kibana
├── kibana-extra/foo-plugin
└── kibana-extra/bar-plugin

References in the codeedit

<<<<<<< HEAD - {repo}blob/6.8/src/server/plugins/lib/plugin.js[Plugin class]: What options does the kibana.Plugin class accept?

  • Plugin class: What options does the kibana.Plugin class accept? >>>>>>> d26cbef389…​ [DOCS] Adds kibana-pull attribute for release docs (#69554)
  • UI Exports: What type of exports are available?

Elastic UI Frameworkedit

If you’re developing a plugin that has a user interface, take a look at our Elastic UI Framework. It documents the CSS and React components we use to build Kibana’s user interface.

You’re welcome to use these components, but be aware that they are rapidly evolving and we might introduce breaking changes that will disrupt your plugin’s UI.

TypeScript Supportedit

Plugin code can be written in TypeScript if desired. To enable TypeScript support create a tsconfig.json file at the root of your plugin that looks something like this:

{
  // extend Kibana's tsconfig, or use your own settings
  "extends": "../../kibana/tsconfig.json",

  // tell the TypeScript compiler where to find your source files
  "include": [
    "server/**/*",
    "public/**/*"
  ]
}

<<<<<<< HEAD TypeScript code is automatically converted into JavaScript during development, but not in the distributable version of Kibana. If you use the {repo}blob/6.8/packages/kbn-plugin-helpers[@kbn/plugin-helpers] to build your plugin then your .ts and .tsx files will be permanently transpiled before your plugin is archived. If you have your own build process, make sure to run the TypeScript compiler on your source files and ship the compilation output so that your plugin will work with the distributable version of Kibana.

TypeScript code is automatically converted into JavaScript during development, but not in the distributable version of Kibana. If you use the @kbn/plugin-helpers to build your plugin, then your .ts and .tsx files will be permanently transpiled before your plugin is archived. If you have your own build process, make sure to run the TypeScript compiler on your source files and ship the compilation output so that your plugin will work with the distributable version of Kibana.

Kibana platform migration guideedit

This guide provides an action plan for moving a legacy plugin to the new platform. >>>>>>> d26cbef389…​ [DOCS] Adds kibana-pull attribute for release docs (#69554)