# Plugin Quickstart

This page provides a comprehensive overview of the capabilities that users can unlock with Plugins in App Maker. By following a few straightforward steps, users can effortlessly create, publish, and utilize Plugins from projects beyond their own. Whether it's building custom functionalities or integrating third-party tools, the power of Plugins empowers users to enhance their App Maker experience effortlessly.

{% stepper %}
{% step %} <mark style="color:red;">**Create Plugin**</mark>

To create the development environment for users to create their plugin, the following command should be executed in the project's root directory :

```sh
$ appmaker plugin create
```

Plugin names must be unique and comply with the akinon-react-native-camera formatting. Users can find the plugins they have created stored under the `.plugins` directory within the project.
{% endstep %}

{% step %} <mark style="color:red;">**Installation Scripts**</mark>

All changes that will affect project files must be developed within the `./plugins/YOUR_PLUGIN_NAME/installation` directory, specifically within the android and iOS files. For more information, please refer to [here](/technical-guides/app-maker/mobile/mobile-app-framework/dependency-integration/plugins.md#installation).
{% endstep %}

{% step %} <mark style="color:red;">**Run Installation Scripts**</mark>

To run the scripts developed on the installation layer, follow these two steps:

1. First, execute the command `plugin preview` to preview the type of diff installation scripts will generate in project files. Use the following commands for Android and iOS respectively:

```sh
$ appmaker plugin preview android
$ appmaker plugin preview ios
```

2. After ensuring that installation scripts are running properly, users can proceed to edit the project files. To do this, run the command `plugin run`:

```sh
$ appmaker plugin run android
$ appmaker plugin run ios
```

To execute the plugin's Post Install scripts, simply add the `—-post-install` parameter.
{% endstep %}

{% step %} <mark style="color:red;">**Integration**</mark>

All integrations intended for the JavaScript scope, particularly Framework Services like Analytics and DeepLing, should be developed exclusively within this layer. For more information, please refer to [here](/technical-guides/app-maker/mobile/mobile-app-framework/dependency-integration/plugins.md#integration).
{% endstep %}

{% step %} <mark style="color:red;">**Publish Plugin**</mark>

**1. Privacy Settings**

In the `./plugins/YOUR_PLUGIN_NAME/package.json` file, choose whether the plugin to be published is private by setting the `private` field to either `true` or `false`.

```json
{
  "private": true // or "false" depending on your preference
}
```

**2. Plugin Pack**

Navigate to the directory `./plugins/YOUR_PLUGIN_NAME/` and pack the plugin in order to publish it on App Maker.

```sh
$ appmaker plugin pack --major|--minor|--patch
```

{% hint style="warning" %}
This command will create a `.tgz` file in the `./plugins/YOUR_PLUGIN_NAME/` directory, which contains the plugin's code and metadata. Make sure to specify the version increment you want to apply using `--major`, `--minor`, or `--patch` to follow [semantic versioning](https://semver.org/) practices. This will update the version number in the `package.json` file accordingly. For more examples on how to use the `appmaker plugin pack` command, refer to the [Plugin Pack](/technical-guides/app-maker/cli.md#plugin-pack) section.
{% endhint %}

**3. Plugin Publish**

Next, go to the directory `./plugins/YOUR_PLUGIN_NAME/` and publish the plugin on App Maker using the following command:

```sh
$ appmaker plugin publish
```

{% endstep %}

{% step %} <mark style="color:red;">**Add Plugin**</mark>

If the user wants to include a plugin that was developed for another project (different from their own), they need to follow these steps:

1. Clone the Plugin: Clone the plugin's repository into the `.plugins` directory located within the main directory of the current project.
2. Run the `plugin add` Command: After cloning the plugin, use the following command to add the plugin to the current project.

```sh
$ appmaker plugin add <name>
```

{% endstep %}
{% endstepper %}

{% hint style="info" %}
For more information on how to use the `appmaker plugin` command, refer to the [Plugin Command](/technical-guides/app-maker/cli.md#command-list) section.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akinon.com/tutorials/app-maker/plugin-quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
