<h1 id="heading-platform-marketplace"><a name="heading-platform-marketplace">Platform Marketplace</a></h1><p>This section provides an overview the <a href="http://software.appcelerator.com">Appcelerator Platform Marketplace</a>.</p>
<h2 id="heading-overview"><a name="heading-overview">Overview</a></h2><p>The Platform Marketplace is a repository of building blocks for both Apps and APIs.  Developers can discover and install components from the Marketplace, and they can also publish new components.  The Platform Marketplace supports setting the access policy of a component. The following access policies are supported:</p>
<ul>
<li><code>public</code>: Everyone can see it (even those outside of your organization).</li>
<li><code>private</code>: Only the publisher see it.  This is the default policy when a component is first published.</li>
<li><code>org</code>: Only certain organizations can see it.  Organizations can be added or removed to/from a component via the <code>appc org</code> command, which is covered later in this section.</li>
<li><code>user_or_org</code>: Only certain organizations or users can see it.  Users can be added or removed to/from a component via the <code>appc user</code> command, which is covered later in this section, and Organizations can be added or removed to/from a component via the <code>appc org</code> command, which is covered later in this section.</li>
</ul>
<p>You can access the Platform Marketplace in the <a href="http://software.appcelerator.com">Appcelerator Platform Marketplace</a> or via the Appcelerator CLI.</p>
<p>To publish something to the Platform Marketplace, you must use the Appcelerator CLI.</p>
<p>Currently, the Platform Marketplace supports the following component types:</p>
<ul>
<li><code>Blocks</code>: Used for building APIs</li>
<li><code>Connectors</code>: Used for building APIs</li>
<li><code>Models</code>: Used for building APIs</li>
</ul>
<p>Eventually, it will also support mobile app modules and Alloy widgets.</p>
<h2 id="heading-cli-options"><a name="heading-cli-options">CLI Options</a></h2><p>The Appcelerator Platform CLI provides a number of options for interacting with the Platform Marketplace from the command line.  The table below outlines the commands that can be used:</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Arguments</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>search</td>
<td>[search_term]</td>
<td>Search the Marketplace for a particular component or set of components.  </td>
</tr>
<tr>
<td>install</td>
<td>[component_name]</td>
<td>Install a specific component.  You should run this command from within an API project. The CLI will ensure the component is installed in the proper location (i.e., models will be installed in the <code>models</code> directory and connectors will be installed in the     <code>connectors</code> directory)</td>
</tr>
<tr>
<td>publish</td>
<td>None</td>
<td>Publish a component to the Marketplace.  You should run this command from the root directory of your component project.</td>
</tr>
<tr>
<td>unpublish</td>
<td>[component_name]</td>
<td>Unpublish a component from the Marketplace.  [compononent_name] is only needed when the command is run outside the component’s project directory.</td>
</tr>
<tr>
<td>access</td>
<td>get or set</td>
<td>Get the current access policy or set it.  The valid values are: <code>public</code>, <code>private</code>, <code>org</code>, and <code>user_or_org</code>.  The default is <code>private</code> - the component can only be seen by the publisher.</td>
</tr>
<tr>
<td>org</td>
<td>add, rm, or ls</td>
<td>Add, remove or list the current organizations tied to your component.  Note: the <code>org</code> values are only relevant if your access policy is set to <code>org</code> or <code>org_or_user</code>.</td>
</tr>
<tr>
<td>user</td>
<td>add, rm, or ls</td>
<td>Add, remove or list the current users tied to your component.  Note: the <code>user</code> values are only relevant if your access policy is set to <code>user_or_org</code></td>
</tr>
<tr>
<td>owner</td>
<td>add, rm, or ls</td>
<td>Add, remove or list the current owners tied to your component.  Owners can set/change values for the <code>access</code>, <code>org</code> and <code>user</code> commands.</td>
</tr>
</tbody>
</table>
<h2 id="heading-install-a-model"><a name="heading-install-a-model">Install a Model</a></h2><p>To install an existing Model from the Platform Marketplace, run the following command from within your API project</p>
<pre class="highlight shell">appc install model/model_name</pre><p>If you are unsure of the exact name, you can search the Marketplace using the CLI:</p>
<pre class="highlight shell">appc search search_string</pre><p>or you can go to  <a href="http://software.appcelerator.com">Platform Marketplace</a></p>
<p>The <code>install</code> command will place the model in the <code>models</code> folder of your project.</p>
<h2 id="heading-install-a-connector"><a name="heading-install-a-connector">Install a Connector</a></h2><p>To install an existing Connector from the Platform Marketplace, run the following command from within your API project</p>
<pre class="highlight shell">appc install connector/connector_name</pre><p>If you are unsure of the exact name, you can search the Platform Marketplace using the CLI:</p>
<pre class="highlight shell">appc search search_string</pre><p>or you can go to  <a href="http://software.appcelerator.com">Platform Marketplace</a></p>
<p>The <code>install</code> command will place the connector in the <code>connectors</code> folder of your project.</p>
<h2 id="heading-install-a-block"><a name="heading-install-a-block">Install a Block</a></h2><p>To install an existing Block from the Platform Marketplace, run the following command from within your API project</p>
<pre class="highlight shell">appc install block/block_name</pre><p>If you are unsure of the exact name, you can search the Platform Marketplace using the CLI:</p>
<pre class="highlight shell">appc search search_string</pre><p>or you can go to  <a href="http://software.appcelerator.com">Platform Marketplace</a></p>
<p>The <code>install</code> command will place the block in the <code>blocks</code> folder of your project.</p>
