# create-miniapp

## Description

* Create a new MiniApp in a new directory named after the MiniApp. &#x20;

The generated MiniApp is a starter `HelloWorld MiniApp` that you can use to launch a standalone MiniApp on the iOS or Android platforms in our Runner—using the `ern run-ios` and `ern run-android` commands.

If you used react-native previously, you'll notice that the generated JavaScript react-native MiniApp is exactly the same react-native starter app as the one provided by react-native. A MiniApp is simply a react-native application. One of the differences with react-native is that we generate our own native projects which use a locally-generated `ern` container.

iOS and Android directories are not generated by this command. To generate those directories, run the `ern run-ios` or `ern run-android` commands.

## Syntax

`ern create-miniapp <appName>`

**Arguments**

`<appName>`

* The name to use for the MiniApp. The MiniApp name must follow Electrode Native module name rules.
* We recommend suffixing the name of MiniApp with suffix `App`

**Options**

`--scope/-s <scope>`

* Specify the NPM package scope to use for the MiniApp.
* Add the package scope automatically in the `package.json` of the generated MiniApp.
* **Default** Package will be unscoped.

`--packageName/-p <name>`

* Specify the NPM package name to use for the MiniApp.
* Add the package name automatically in the `package.json` of the generated MiniApp.
* **Default** The command will prompt for the package name to use.

`--platformVersion/-v <version>`

* Specify a platform version if different from the currently activated version.
* This option is rarely used. &#x20;
* **Default** Will use the currently activated platform version.

`--skipNpmCheck`

* Skip the check ensuring package does not already exists in NPM registry.
* **Default** The value defaults to false.&#x20;

## Examples

`ern create-miniapp MyAwesomeApp`

Creates a MiniApp named `MyAwesomeApp`.

`ern create-miniapp MyAwesomeApp --scope MyCompany`

Creates a MiniApp named `MyAwesomeApp` and use `MyCompany` as the scope of the MiniApp NPM package.

`ern create-miniapp MyAwesomeApp --packageName my-awesome-app`

Creates a MiniApp named `MyAwesomeAp` and use `my-awesome-app` as the name of the MiniApp NPM package.

## Remarks

* MiniApp name can only consist of upper and lower case characters. No digits nor special characters can be used.
* Package name should be a valid NPM package name.
* This command is the `ern` equivalent of the `react-native init` command.


---

# 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://native.electrode.io/v0.29/cli-commands/create-miniapp.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.
