2013-09-03 18:08:28 +00:00
|
|
|
---
|
2016-01-19 18:08:53 +00:00
|
|
|
layout: "docs"
|
2013-09-06 16:50:43 +00:00
|
|
|
page_title: "vagrant plugin - Command-Line Interface"
|
2013-09-03 18:08:28 +00:00
|
|
|
sidebar_current: "cli-plugin"
|
2016-01-19 18:08:53 +00:00
|
|
|
description: |-
|
|
|
|
The "vagrant plugin" command is used to manage Vagrant plugins including
|
|
|
|
installing, uninstalling, and license management.
|
2013-09-03 18:08:28 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Plugin
|
|
|
|
|
|
|
|
**Command: `vagrant plugin`**
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
This is the command used to manage [plugins](/docs/plugins/).
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
The main functionality of this command is exposed via another level
|
|
|
|
of subcommands:
|
|
|
|
|
|
|
|
* `install`
|
|
|
|
* `license`
|
|
|
|
* `list`
|
|
|
|
* `uninstall`
|
2013-09-06 16:50:43 +00:00
|
|
|
* `update`
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
# Plugin Install
|
|
|
|
|
2014-01-07 22:17:48 +00:00
|
|
|
**Command: `vagrant plugin install <name>...`**
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
This installs a plugin with the given name or file path. If the name
|
|
|
|
is not a path to a file, then the plugin is installed from remote
|
2016-01-19 18:08:53 +00:00
|
|
|
repositories, usually [RubyGems](https://rubygems.org). This command will
|
2013-09-06 16:50:43 +00:00
|
|
|
also update a plugin if it is already installed, but you can also use
|
|
|
|
`vagrant plugin update` for that.
|
2013-09-03 18:08:28 +00:00
|
|
|
|
2016-04-08 14:38:25 +00:00
|
|
|
```shell
|
|
|
|
# Installing a plugin from a known gem source
|
|
|
|
$ vagrant plugin install my-plugin
|
|
|
|
|
|
|
|
# Installing a plugin from a local file source
|
|
|
|
$ vagrant plugin install /path/to/my-plugin.gem
|
|
|
|
```
|
|
|
|
|
2014-01-07 22:17:48 +00:00
|
|
|
If multiple names are specified, multiple plugins will be installed. If
|
|
|
|
flags are given below, the flags will apply to _all_ plugins being installed
|
|
|
|
by the current command invocation.
|
|
|
|
|
2015-07-07 04:57:53 +00:00
|
|
|
If the plugin is already installed, this command will reinstall it with
|
|
|
|
the latest version available.
|
|
|
|
|
2014-01-06 05:28:16 +00:00
|
|
|
This command accepts optional command-line flags:
|
|
|
|
|
|
|
|
* `--entry-point ENTRYPOINT` - By default, installed plugins are loaded
|
|
|
|
internally by loading an initialization file of the same name as the plugin.
|
2016-01-19 18:08:53 +00:00
|
|
|
Most of the time, this is correct. If the plugin you are installing has
|
2014-01-06 05:28:16 +00:00
|
|
|
another entrypoint, this flag can be used to specify it.
|
|
|
|
|
2015-11-18 19:22:42 +00:00
|
|
|
* `--plugin-clean-sources` - Clears all sources that have been defined so
|
|
|
|
far. This is an advanced feature. The use case is primarily for corporate
|
|
|
|
firewalls that prevent access to RubyGems.org.
|
|
|
|
|
2014-01-06 05:28:16 +00:00
|
|
|
* `--plugin-source SOURCE` - Adds a source from which to fetch a plugin. Note
|
2016-01-19 18:08:53 +00:00
|
|
|
that this does not only affect the single plugin being installed, by all future
|
2014-01-06 05:28:16 +00:00
|
|
|
plugin as well. This is a limitation of the underlying plugin installer
|
|
|
|
Vagrant uses.
|
|
|
|
|
|
|
|
* `--plugin-version VERSION` - The version of the plugin to install. By default,
|
|
|
|
this command will install the latest version. You can constrain the version
|
|
|
|
using this flag. You can set it to a specific version, such as "1.2.3" or
|
2015-10-31 21:47:31 +00:00
|
|
|
you can set it to a version constraint, such as "> 1.0.2". You can set it
|
2014-01-06 05:28:16 +00:00
|
|
|
to a more complex constraint by comma-separating multiple constraints:
|
2016-01-19 18:08:53 +00:00
|
|
|
"> 1.0.2, < 1.1.0" (do not forget to quote these on the command-line).
|
2014-01-06 05:28:16 +00:00
|
|
|
|
2013-09-03 18:08:28 +00:00
|
|
|
# Plugin License
|
|
|
|
|
|
|
|
**Command: `vagrant plugin license <name> <license-file>`**
|
|
|
|
|
|
|
|
This command installs a license for a proprietary Vagrant plugin,
|
2016-01-19 18:08:53 +00:00
|
|
|
such as the [VMware Fusion provider](/docs/vmware).
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
# Plugin List
|
|
|
|
|
|
|
|
**Command: `vagrant plugin list`**
|
|
|
|
|
2014-01-06 05:28:16 +00:00
|
|
|
This lists all installed plugins and their respective installed versions.
|
|
|
|
If a version constraint was specified for a plugin when installing it, the
|
|
|
|
constraint will be listed as well. Other plugin-specific information may
|
|
|
|
be shown, too.
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
# Plugin Uninstall
|
|
|
|
|
2014-01-07 22:11:33 +00:00
|
|
|
**Command: `vagrant plugin uninstall <name> [<name2> <name3> ...]`**
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
This uninstalls the plugin with the given name. Any dependencies of the
|
|
|
|
plugin will also be uninstalled assuming no other plugin needs them.
|
2013-09-06 16:50:43 +00:00
|
|
|
|
2014-01-07 22:11:33 +00:00
|
|
|
If multiple plugins are given, multiple plugins will be uninstalled.
|
|
|
|
|
2013-09-06 16:50:43 +00:00
|
|
|
# Plugin Update
|
|
|
|
|
2014-01-06 05:28:16 +00:00
|
|
|
**Command: `vagrant plugin update [<name>]`**
|
|
|
|
|
|
|
|
This updates the plugins that are installed within Vagrant. If you specified
|
|
|
|
version constraints when installing the plugin, this command will respect
|
|
|
|
those constraints. If you want to change a version constraint, re-install
|
|
|
|
the plugin using `vagrant plugin install`.
|
2013-09-06 16:50:43 +00:00
|
|
|
|
2014-01-06 05:28:16 +00:00
|
|
|
If a name is specified, only that single plugin will be updated. If a
|
|
|
|
name is specified of a plugin that is not installed, this command will not
|
|
|
|
install it.
|