Vagrant provides many options and features, but when you require something that isn't available, you can extend this functionality in the form of a plugin. Vagrant provides a powerful and robust internal API that is easy to use and flexible to develop with. Vagrant actually uses its own API for many core features.
Understanding Vagrant plugins
The anatomy of a Vagrant plugin
There are multiple parts of a Vagrant plugin. Some parts are for development and others are for the general use of the plugin. We'll focus on two core elements: gem and bundler.