Writing extensions

Before you start reading the details of extending Albert, make sure you have read the basics.

Albert can be extended using C++ or Python.

  • Native C++ plugins benefit the performance and power of (Obj)C(++) and the native access to Qt (Eventloop, translations, the framework itself …).
  • Python plugins on the other hand are easier to write and distribute and PyPi has a library for almost everything you can think of. However the Albert Python API is a limited subset of the native API and the GIL prevents true parallelism.

Brief core API overview

Every plugin has to implement the PluginInstance, which provides a list of Extension instances. The built-in extension interfaces related to query handling are:

All query handlers provide instances of the Item interface, which contains several methods related to the user interface, most notably the Action factory.

In addition to the core API, utilities facilitate plugin development and help developers to provide users with a streamlined search experience.

Next, read the section of your prefered API, build something cool and share it.