blob: db964c05bae53a2f0f81f93756f7462ff3eec534 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
<meta name="description" content="Manage plugins without the CLI when using the platform-centered workflow. ">
<title>
Using Plugman to Manage Plugins - Apache Cordova
</title>
<link rel="SHORTCUT ICON" href="/favicon.ico"/>
<link rel="canonical" href="https://cordova.apache.org/docs/en/dev/plugin_ref/plugman.html">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="/static/css/main.css">
<link rel="stylesheet" type="text/css" href="/static/css/lib/syntax.css">
<!-- Fonts -->
<!-- For attribution information, see www/attributions.html -->
<link href='https://fonts.googleapis.com/css?family=Raleway:700,400,300,700italic,400italic,300italic' rel='stylesheet' type='text/css'>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
var disqus_developer = 1; // this would set it to developer mode
</script>
<!-- JS -->
<script defer type="text/javascript" src="/static/js/lib/jquery-2.1.1.min.js"></script>
<script defer type="text/javascript" src="/static/js/lib/bootstrap.min.js"></script>
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '16']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body>
<header>
<a class="scroll-point pt-top" name="top"></a>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/"><img id="logo_top" src="/static/img/cordova-logo-newbrand.svg"/></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<div class="nav_bar_center">
<ul class="nav navbar-nav">
<li class="active">
<a href="/docs/en/latest/">Documentation</a>
</li>
<li >
<a href="/plugins">Plugins</a>
</li>
<li >
<a href="/blog" id="blog_button">Blog<span class="badge" id="new_blog_count"></span></a>
</li>
<li >
<a href="/contribute">Contribute</a>
</li>
<li >
<a href="/contribute/team.html">Team</a>
</li>
<li>
<a href="/#getstarted">Get Started</a>
</li>
<li>
<form class="navbar-form navbar-right" id="header-search-form" role="search">
<div class="input-group">
</div>
</form>
</li>
</ul>
</div>
</div><!--/.navbar-collapse -->
</div>
</nav>
<div id="_fixed_navbar_spacer" style="padding-top:50px"></div>
</header>
<div class="docs">
<!-- Table of Contents -->
<div class="hidden-xs hidden-sm site-toc-container">
<ul class="site-toc">
<li>
<span class="toc-section-heading">
Getting Started
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/guide/overview/index.html">
Overview
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/cli/installation.html">
Installation
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/cli/index.html">
Creating an App
</a>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
Cordova Projects
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/reference/cordova-cli/index.html">
CLI Commands
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/support/index.html">
Platform Support
</a>
</li>
<li>
<a class="" href="/docs/en/dev/platform_pinning/index.html">
Platform Pinning
</a>
</li>
<li>
<a class="" href="/docs/en/dev/platform_plugin_versioning_ref/index.html">
Version Management
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/appdev/hooks/index.html">
Hooks
</a>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
App Development
</span>
<ul class="site-toc">
<li>
<span class="toc-section-heading">
Platforms
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/guide/platforms/android/index.html">
Android
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/platforms/ios/index.html">
iOS
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/platforms/electron/index.html">
Electron
</a>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
Customization
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/config_ref/images.html">
Icons
</a>
</li>
<li>
<a class="" href="/docs/en/dev/core/features/splashscreen/index.html">
Splash Screen
</a>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
Security & Privacy
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/guide/appdev/security/index.html">
Security
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/appdev/privacy/index.html">
Privacy
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/appdev/allowlist/index.html">
Allow List
</a>
</li>
</ul>
</li>
<li>
<a class="" href="/docs/en/dev/cordova/storage/storage.html">
Data Storage
</a>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
Plugin Development
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/guide/hybrid/plugins/index.html">
Create a Plugin
</a>
</li>
<li>
<span class="toc-section-heading">
Support a Platform
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/guide/platforms/android/plugin.html">
Android
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/platforms/ios/plugin.html">
iOS
</a>
</li>
</ul>
</li>
<li>
<a class="this-page" href="/docs/en/dev/plugin_ref/plugman.html">
Use Plugman
</a>
<span class="entry-highlight"></span>
<div id="page-toc" class="page-toc"></div>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
References
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/config_ref/index.html">
Config.xml API
</a>
</li>
<li>
<a class="" href="/docs/en/dev/plugin_ref/spec.html">
Plugin.xml API
</a>
</li>
<li>
<a class="" href="/docs/en/dev/cordova/events/events.html">
Cordova JavaScript API
</a>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
Resources
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/third-party/index.html">
Third-party Tools
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/cli/template.html">
App Templates
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/next/index.html">
Next Steps
</a>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
Plugins
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-battery-status/index.html">
Battery Status
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-camera/index.html">
Camera
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-device/index.html">
Device
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-dialogs/index.html">
Dialogs
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-file/index.html">
File
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-geolocation/index.html">
Geolocation
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-inappbrowser/index.html">
Inappbrowser
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-media/index.html">
Media
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-media-capture/index.html">
Media Capture
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-network-information/index.html">
Network Information
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-screen-orientation/index.html">
Screen Orientation
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-splashscreen/index.html">
Browser Splashscreen
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-statusbar/index.html">
Statusbar
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-vibration/index.html">
Vibration
</a>
</li>
</ul>
</li>
<li>
<span class="toc-section-heading">
Advanced Topics
</span>
<ul class="site-toc">
<li>
<a class="" href="/docs/en/dev/guide/hybrid/webviews/index.html">
Embed Cordova in native apps
</a>
</li>
</ul>
</li>
</ul>
</div>
<!-- Page content -->
<div class="page-content-container">
<div class="page-content">
<div class="content-header">
<!-- ToC Dropdown (for XS and SM sizes only) -->
<div class="toc-dropdown dropdown visible-xs-block visible-sm-block">
<button class="btn btn-default dropdown-toggle" type="button" id="tocDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Table of Contents
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li>
<a class="" href="/docs/en/dev/guide/overview/index.html">
Overview
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/cli/installation.html">
Installation
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/cli/index.html">
Creating an App
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-cli/index.html">
CLI Commands
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/support/index.html">
Platform Support
</a>
</li>
<li>
<a class="" href="/docs/en/dev/platform_pinning/index.html">
Platform Pinning
</a>
</li>
<li>
<a class="" href="/docs/en/dev/platform_plugin_versioning_ref/index.html">
Version Management
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/appdev/hooks/index.html">
Hooks
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/platforms/android/index.html">
Android
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/platforms/ios/index.html">
iOS
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/platforms/electron/index.html">
Electron
</a>
</li>
<li>
<a class="" href="/docs/en/dev/config_ref/images.html">
Icons
</a>
</li>
<li>
<a class="" href="/docs/en/dev/core/features/splashscreen/index.html">
Splash Screen
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/appdev/security/index.html">
Security
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/appdev/privacy/index.html">
Privacy
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/appdev/allowlist/index.html">
Allow List
</a>
</li>
<li>
<a class="" href="/docs/en/dev/cordova/storage/storage.html">
Data Storage
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/hybrid/plugins/index.html">
Create a Plugin
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/platforms/android/plugin.html">
Android
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/platforms/ios/plugin.html">
iOS
</a>
</li>
<li>
<a class="this-page" href="/docs/en/dev/plugin_ref/plugman.html">
Use Plugman
</a>
</li>
<li>
<a class="" href="/docs/en/dev/config_ref/index.html">
Config.xml API
</a>
</li>
<li>
<a class="" href="/docs/en/dev/plugin_ref/spec.html">
Plugin.xml API
</a>
</li>
<li>
<a class="" href="/docs/en/dev/cordova/events/events.html">
Cordova JavaScript API
</a>
</li>
<li>
<a class="" href="/docs/en/dev/third-party/index.html">
Third-party Tools
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/cli/template.html">
App Templates
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/next/index.html">
Next Steps
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-battery-status/index.html">
Battery Status
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-camera/index.html">
Camera
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-device/index.html">
Device
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-dialogs/index.html">
Dialogs
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-file/index.html">
File
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-geolocation/index.html">
Geolocation
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-inappbrowser/index.html">
Inappbrowser
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-media/index.html">
Media
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-media-capture/index.html">
Media Capture
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-network-information/index.html">
Network Information
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-screen-orientation/index.html">
Screen Orientation
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-splashscreen/index.html">
Browser Splashscreen
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-statusbar/index.html">
Statusbar
</a>
</li>
<li>
<a class="" href="/docs/en/dev/reference/cordova-plugin-vibration/index.html">
Vibration
</a>
</li>
<li>
<a class="" href="/docs/en/dev/guide/hybrid/webviews/index.html">
Embed Cordova in native apps
</a>
</li>
</ul>
</div>
<a class="edit" href="https://github.com/apache/cordova-docs/tree/master/www/docs/en/dev/plugin_ref/plugman.md"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> </a>
<!-- Version dropdown -->
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="versionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
dev
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="versionDropdown">
<!-- List versions available in this language -->
<li>
<a href="/docs/en/dev/" class="missing-page">
<span class="selected">
dev
</span>
</a>
</li>
<li>
<a href="/docs/en/latest/" class="missing-page">
12.x
(Latest)
</a>
</li>
<li>
<a href="/docs/en/11.x/" class="missing-page">
11.x
</a>
</li>
<li>
<a href="/docs/en/10.x/" class="missing-page">
10.x
</a>
</li>
<li>
<a href="/docs/en/9.x/" class="missing-page">
9.x
</a>
</li>
<li>
<a href="/docs/en/8.x/" class="missing-page">
8.x
</a>
</li>
<li>
<a href="/docs/en/7.x/" class="missing-page">
7.x
</a>
</li>
<li>
<a href="/docs/en/6.x/" class="missing-page">
6.x
</a>
</li>
<li>
<a href="/docs/en/5.4.0/" class="missing-page">
5.4.0
</a>
</li>
<li>
<a href="/docs/en/5.1.1/" class="missing-page">
5.1.1
</a>
</li>
<li>
<a href="/docs/en/5.0.0/" class="missing-page">
5.0.0
</a>
</li>
<li>
<a href="/docs/en/4.0.0/" class="missing-page">
4.0.0
</a>
</li>
<li>
<a href="/docs/en/3.6.0/" class="missing-page">
3.6.0
</a>
</li>
<li>
<a href="/docs/en/3.5.0/" class="missing-page">
3.5.0
</a>
</li>
<li>
<a href="/docs/en/3.4.0/" class="missing-page">
3.4.0
</a>
</li>
<li>
<a href="/docs/en/3.3.0/" class="missing-page">
3.3.0
</a>
</li>
<li>
<a href="/docs/en/3.2.0/" class="missing-page">
3.2.0
</a>
</li>
<li>
<a href="/docs/en/3.1.0/" class="missing-page">
3.1.0
</a>
</li>
<li>
<a href="/docs/en/3.0.0/" class="missing-page">
3.0.0
</a>
</li>
<li>
<a href="/docs/en/2.9.0/" class="missing-page">
2.9.0
</a>
</li>
<li>
<a href="/docs/en/2.8.0/" class="missing-page">
2.8.0
</a>
</li>
<li>
<a href="/docs/en/2.7.0/" class="missing-page">
2.7.0
</a>
</li>
<li>
<a href="/docs/en/2.6.0/" class="missing-page">
2.6.0
</a>
</li>
<li>
<a href="/docs/en/2.5.0/" class="missing-page">
2.5.0
</a>
</li>
<li>
<a href="/docs/en/2.4.0/" class="missing-page">
2.4.0
</a>
</li>
<li>
<a href="/docs/en/2.3.0/" class="missing-page">
2.3.0
</a>
</li>
<li>
<a href="/docs/en/2.2.0/" class="missing-page">
2.2.0
</a>
</li>
<li>
<a href="/docs/en/2.1.0/" class="missing-page">
2.1.0
</a>
</li>
<li>
<a href="/docs/en/2.0.0/" class="missing-page">
2.0.0
</a>
</li>
<li>
<a href="/docs/en/1.9.0/" class="missing-page">
1.9.0
</a>
</li>
<li>
<a href="/docs/en/1.8.1/" class="missing-page">
1.8.1
</a>
</li>
<li>
<a href="/docs/en/1.8.0/" class="missing-page">
1.8.0
</a>
</li>
<li>
<a href="/docs/en/1.7.0/" class="missing-page">
1.7.0
</a>
</li>
<li>
<a href="/docs/en/1.6.1/" class="missing-page">
1.6.1
</a>
</li>
<li>
<a href="/docs/en/1.6.0/" class="missing-page">
1.6.0
</a>
</li>
<li>
<a href="/docs/en/1.5.0/" class="missing-page">
1.5.0
</a>
</li>
</ul>
</div>
</div>
<!-- Show warnings for special versions -->
<!-- dev warning -->
<div class="alert docs-alert alert-info" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
This version of the documentation is under development!
<a href="/docs/en/latest/">
Click here for the latest released version.
</a>
</div>
<!-- outdated warning -->
<!-- plugin version warning -->
<div id="page-toc-source">
<h1>Using Plugman to Manage Plugins</h1>
<p>From version 3.0 onward, Cordova implements all device APIs as
plugins, and leaves them disabled by default. It also supports two
different ways to add and remove plugins, depending on your choice of
workflow discussed in the <a href="../guide/overview/index.html">Overview</a>:</p>
<ul>
<li>
<p>If you use a cross-platform workflow, you use the <code>cordova</code> CLI
utility to add plugins, as described in <a href="../guide/cli/index.html">The Command-Line Interface</a>.
The CLI modifies plugins for all specified platforms at once.</p>
</li>
<li>
<p>If you use a platform-centered workflow, you use a lower-level
<a href="https://github.com/apache/cordova-plugman/">Plugman</a> command-line
interface, separately for each targeted platform.</p>
</li>
</ul>
<p>This section details the Plugman utility. For more information on
consuming Plugman as a node module or modifying the source code, see
<a href="https://github.com/apache/cordova-plugman/blob/master/README.md">the README file in its repository</a>.</p>
<h2>Installing Plugman</h2>
<p>To install plugman, you must have <a href="https://nodejs.org/">node</a> installed
on your machine. Then you can run the following command from anywhere
in your environment to install plugman globally, so that it is
available from any directory:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ npm install -g plugman
</code></pre></div></div>
<p>You must have also have <code>git</code> on your <code>PATH</code> to be able to install plugins directly from remote git URLs.</p>
<p><strong>TIP</strong>: If you find that after installing plugman with <code>npm</code> you are
still unable to run any <code>plugman</code> commands, make sure that you have
added the <code>/npm/</code> directory into your <code>PATH</code>.</p>
<p><strong>NOTE</strong>: You can skip this step if you don&#39;t want to pollute your
global <code>npm</code> namespace by installing Plugman globally. If this is the
case, then when you create a Cordova project with the shell tools,
there will be a <code>node_modules</code> directory inside your project which
contains Plugman. Since you did not install globally, you need to
invoke <code>node</code> for each Plugman command, for example <code>node
./node_modules/plugman/main.js -version</code>. The rest of this guide
assumes you have installed Plugman globally, meaning you can invoke it
with just <code>plugman</code>.</p>
<h2>Create a Cordova Project</h2>
<p>Before you can use Plugman, you must create a Cordova project. You can do this with either the Command-line Interface or with
the lower level shell scripts. Instructions for using the shell scripts to create your project are located in the various &quot;Command-line Tools&quot; guides
listed on the Platform guides page.</p>
<h2>Adding a Plugin</h2>
<p>Once you have installed Plugman and have created a Cordova project, you can start adding plugins to the platform with:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> &lt;name|url|path&gt; <span class="o">[</span><span class="nt">--plugins_dir</span> &lt;directory&gt;] <span class="o">[</span><span class="nt">--www</span> &lt;directory&gt;] <span class="o">[</span><span class="nt">--variable</span> &lt;name&gt;<span class="o">=</span>&lt;value&gt; <span class="o">[</span><span class="nt">--variable</span> &lt;name&gt;<span class="o">=</span>&lt;value&gt; ...]]
</code></pre></div></div>
<p>Using minimum parameters, this command installs a plugin into a cordova project. You must specify a platform and cordova project location for that platform. You also must specify a plugin, with the different <code>--plugin</code> parameter forms being:</p>
<ul>
<li><code>name</code>: The directory name where the plugin contents exist. This must be an existing directory under the <code>--plugins_dir</code> path (see below for more info) or a plugin in the Cordova registry.</li>
<li><code>url</code>: A URL starting with https:// or git://, pointing to a valid git repository that is clonable and contains a <code>plugin.xml</code> file. The contents of this repository would be copied into the <code>--plugins_dir</code>.</li>
<li><code>path</code>: A path to a directory containing a valid plugin which includes a <code>plugin.xml</code> file. This path&#39;s contents will be copied into the <code>--plugins_dir</code>.</li>
</ul>
<p>Other parameters:</p>
<ul>
<li><code>--plugins_dir</code> defaults to <code>&lt;project&gt;/cordova/plugins</code>, but can be any directory containing a subdirectory for each fetched plugin.</li>
<li><code>--www</code> defaults to the project&#39;s <code>www</code> folder location, but can be any directory that is to be used as cordova project application web assets.</li>
<li><code>--variable</code> allows to specify certain variables at install time, necessary for certain plugins requiring API keys or other custom, user-defined parameters. Please see the <a href="spec.html#Plugin%20Specification">plugin specification</a> for more information.</li>
</ul>
<h2>Remove a Plugin</h2>
<p>To uninstall a plugin, you simply pass the <code>uninstall</code> command and provide the plugin ID.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>plugman uninstall <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> &lt;<span class="nb">id</span><span class="o">&gt;</span> <span class="o">[</span><span class="nt">--www</span> &lt;directory&gt;] <span class="o">[</span><span class="nt">--plugins_dir</span> &lt;directory&gt;]
</code></pre></div></div>
<h2>Help Commands</h2>
<p>Plugman features a global help command which may help you if you get stuck or are experiencing problems. It will display
a list of all available Plugman commands and their syntax:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>plugman <span class="nt">-help</span>
plugman <span class="c"># same as above</span>
</code></pre></div></div>
<p><strong>NOTE</strong>: <code>plugman -help</code> may show some additional registry-related commands. These commands are for plugin developers and may not be implemented on third-party plugin registries.</p>
<p>You can also append the <code>--debug|-d</code> flag to any Plugman command to run that command in verbose mode, which will display
any internal debugging messages as they are emitted and may help you track down problems like missing files.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Adding Android battery-status plugin to "myProject":</span>
plugman <span class="nt">-d</span> <span class="nb">install</span> <span class="nt">--platform</span> android <span class="nt">--project</span> myProject <span class="nt">--plugin</span> cordova-plugin-battery-status
</code></pre></div></div>
<p>Finally, you can use the <code>--version|-v</code> flag to see which version of Plugman you are using.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>plugman <span class="nt">-v</span>
</code></pre></div></div>
<h2>Registry Actions</h2>
<p>There are a number of plugman commands that can be used for interacting with the <a href="https://plugins.cordova.io">Plugin registry</a>.
Please note that these registry commands are specific to the <em>plugins.cordova.io</em> plugin registry and may not be implemented by
third-party plugin registries.</p>
<h3>Searching for a Plugin</h3>
<p>You can use Plugman to search the <a href="https://plugins.cordova.io">Plugin registry</a> for plugin id&#39;s that match the given space separated list of keywords.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>plugman search &lt;plugin keywords&gt;
</code></pre></div></div>
<h3>Changing the Plugin Registry</h3>
<p>You can get or set the URL of the current plugin registry that plugman is using. Generally you should leave this set at http://registry.cordova.io unless you want to use a third party plugin registry.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>plugman config <span class="nb">set </span>registry &lt;url-to-registry&gt;
plugman config get registry
</code></pre></div></div>
<h3>Get Plugin Information</h3>
<p>You can get information about any specific plugin stored in the plugin repository with:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>plugman info &lt;<span class="nb">id</span><span class="o">&gt;</span>
</code></pre></div></div>
<p>This will contact the plugin registry and fetch information such as the plugin&#39;s version number.</p>
<h2>Installing Core Plugins</h2>
<p>The examples below show how to add plugins as needed so that any
Cordova APIs you use in your project still work after you upgrade to
version 3.0. For each command, you need to select the target
platform, and reference the platform&#39;s project directory.</p>
<ul>
<li>
<p>cordova-plugin-battery-status</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-battery-status
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-camera</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-camera
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-console</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-console
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-contacts</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-contacts
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-device</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-device
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-device-motion (accelerometer)</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-device-motion
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-device-orientation (compass)</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-device-orientation
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-dialogs</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-dialogs
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-file</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-file
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-file-transfer</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-file-transfer
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-geolocation</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-geolocation
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-globalization</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-globalization
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-inappbrowser</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-inappbrowser
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-media</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-media
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-media-capture</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-media-capture
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-network-information</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-network-information
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-splashscreen</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-splashscreen
</code></pre></div> </div>
</li>
<li>
<p>cordova-plugin-vibration</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code> plugman <span class="nb">install</span> <span class="nt">--platform</span> &lt;ios|android&gt; <span class="nt">--project</span> &lt;directory&gt; <span class="nt">--plugin</span> cordova-plugin-vibration
</code></pre></div> </div>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="blue-divider"></div>
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-sm-9">
<h1>More Resources</h1>
<div class="row">
<div class="col-sm-4">
<h2>General</h2>
<ul class="nav">
<li>
<a target="_blank" href="https://projects.apache.org/project.html?cordova">Apache Project Page</a>
</li>
<li>
<a href="https://www.apache.org/dyn/closer.cgi/cordova">Source Distribution</a>
</li>
<li>
<a target="_blank" href="https://www.apache.org/licenses">License</a>
</li>
<li>
<a href="/artwork">Artwork</a>
</li>
</ul>
</div>
<div class="col-sm-4">
<h2>Development</h2>
<ul class="nav">
<li><a target="_blank" href="https://github.com/apache?utf8=%E2%9C%93&amp;q=cordova-">Source Code</a></li>
<li><a target="_blank" href="https://github.com/apache/cordova#filing-a-bug">Issue Tracker</a></li>
<li><a target="_blank" href="https://stackoverflow.com/questions/tagged/cordova">Stack Overflow</a></li>
<li><a href="/contact">Mailing List</a></li>
<li><a href="/contribute/nightly_builds.html">Nightly builds</a></li>
</ul>
</div>
<div class="col-sm-4">
<h2>Apache Software Foundation</h2>
<ul class="nav">
<li>
<a target="_blank" href="https://www.apache.org/">About ASF</a>
</li>
<li>
<a target="_blank" href="https://www.apache.org/events/current-event">Events</a>
</li>
<li>
<a target="_blank" href="https://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a>
</li>
<li>
<a target="_blank" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
</li>
<li>
<a target="_blank" href="https://www.apache.org/security/">Security</a>
</li>
<li>
<a target="_blank" href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy policy</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-sm-3">
<h1>Contribute</h1>
<p style="padding-top:20px"><strong>Help Cordova move forward!</strong></p>
<p>Report bugs, improve the docs, or contribute to the code.</p>
<a href="/contribute" class="btn btn-lg btn-primary">
Learn More
</a>
<p style="padding-top:20px"> <a href="https://twitter.com/apachecordova" class="twitter-follow-button" data-show-count="false">Follow @apachecordova</a></p>
</div>
</div>
<p class="copyright_text">
Copyright &copy; 2024 <a href="https://apache.org">The Apache Software Foundation</a>, Licensed under the <a target="_blank" href="https://www.apache.org/licenses/">Apache License, Version 2.0</a>.<br/>
Apache and the Apache feather logos are <a target="_blank" href="https://www.apache.org/foundation/marks/list/">trademarks</a> of The Apache Software Foundation.
<br/>
<p>See the <a href="/attributions/">attributions page</a> for other copyright & trademark notices.</p>
</p>
</div>
</footer>
</div>
</div>
</div>
<script defer type="text/javascript" src="/static/js/lib/toc.min.js"></script>
<script defer type="text/javascript" src="/static/js/docs.js"></script>
<script defer type="text/javascript" src="/static/js/index.js"></script>
<script defer type="text/javascript" src="/static/js/twitter.js"></script>
</body>
</html>