4
.. Information on how to use plugins in Bazaar.
9
A plugin is an external component for Bazaar that is typically made by
10
third parties. A plugin is capable of augmenting Bazaar by adding new
11
functionality. A plugin can also change current Bazaar behavior by
12
replacing current functionality. Plugins often work as a way for
13
developers to test new features for Bazaar prior to inclusion in the
14
official codebase. Plugins can do a variety of things, including
15
overriding commands, adding new commands, providing additional network
16
transports, or customizing log output. The sky is the limit for the
17
customization that can be done through plugins.
22
We keep our list of plugins on the http://bazaar-vcs.org/BzrPlugins page.
24
How to install a plugin
25
-----------------------
27
Installing a plugin is very easy! One can either install a plugin
28
system-wide or on a per user basis. Both methods involve creating a
29
``plugins`` directory. Within this directory one can place plugins in
30
subdirectories. For example, ``plugins/bzrtools/``.
32
Two locations are currently checked: the bzrlib/plugins directory
33
(typically found in ``/usr/lib/python2.4/site-packages/bzrlib/plugins/``) and
34
``$HOME/.bazaar/plugins/``.
36
One can additionally override the home plugins by setting the environment
37
variable ``BZR_PLUGIN_PATH`` to a directory that contains plugins. The
38
installation of a plugin can be checked by running ``bzr plugins`` at
39
any time. New commands can be seen by running ``bzr help commands``.
40
The commands provided by a plugin are shown followed by the name of the
43
Plugins work particularly well with Bazaar branches. For example, to
44
install the bzrtools plugins for your main user account, one can perform
47
bzr branch http://panoramicfeedback.com/opensource/bzr/bzrtools
48
~/.bazaar/plugins/bzrtools
50
When installing plugins the directories that you install them in must
51
be valid python identifiers. This means that they can only contain
52
certain characters, notably they cannot contain hyphens (``-``). Rather
53
than installing ``bzr-gtk`` to ``~/.bazaar/plugins/bzr-gtk``, install it
54
to ``~/.bazaar/plugins/gtk``.
56
Listing the installed plugins
57
-----------------------------
59
To do this, use the plugins command like this::
63
The name, location and version of each plugin installed will be displayed.
68
Here is a sample of some of the more popular plugins:
72
If you wish to write your own plugins, it is not difficult to do.
73
See `Writing a plugin`_ in the appendices to get started.