# upload

**This command can only be used with access to an** [**Electrode Native bundle store server**](https://github.com/electrode-io/ern-bundle-store)

**To use this command, the `bundleStore` config must be set in cauldron**

## Description

Upload a JS bundle to the current store.

## Remarks

* Both iOS and Android bundles will be generated and uploaded to the store by default. If you only need to upload a bundle for a single platform, use the `--platform` option.
* By default development bundle(s) will be generated. If you rather need to upload a production bundle you can use the `--prod` flag.
* There are three different ways to generate and upload a bundle :
  * Using a Cauldron, by providing a descriptor and eventually some extra JS dependencies (`--descriptor`/`--extraJsDependencies` option)
  * By manually specifying all the MiniApps/JS API Implementations and extra JS dependencies to put in the bundle (`--miniapps`/`--jsApiImpls`/`--extraJsDependencies` options)
  * From a metro server (packager) running locally (`--fromPackager` flag)

## Syntax

`ern bundlestore upload`

### Options

`--baseComposite <compositePath>`

* Git or File System path, to the custom Composite repository (refer to the \[custom Composite] documentation for more information).

`--descriptor/-d <descriptor>`

* Generate and upload a JS bundle out of all the MiniApps/JS API implementations associated to this *complete native application descriptor*.
* Mutually exclusive with `--miniapps`/`--jsApiImpls` options.

`--extraJsDependencies/-e <dependencies>`

* Add extra JavaScript dependencies to the JS bundle to upload.
* Can be used in combination with `--descriptor` or `--miniapps`/`--jsApiImpls` options.

`--fromPackager`

* Get and upload the bundle served by the current local metro server (packager).
* A metro server must be running on `localhost:8081` in order to use this flag.
* Mutually exclusive with `--descriptor`/`-miniapps`/`jsApiImpls`/`extraJsDependencies` options.

`--fromGitBranches`

* Create Composite using the latest commits made to each of the MiniApp branches (HEAD), rather than using the MiniApps SHAs that are inside the current Container version. &#x20;
* Can only be used in combination with the `--descriptor` option.
* This flag will be ignored if the target descriptor does not contain any MiniApps tracking git branches

  **Default** false

`--jsApiImpls`

* One or more JS API implementation(s) to add to the JS Composite project.
* The  JS API implementation(s) passed to this command can be a valid Yarn package format or a Git format or file scheme. &#x20;
* Mutually exclusive with `--descriptor` option.

`--miniapps/-m <miniapps>`

* One or more MiniApps to add to the JS Composite project.
* The MiniApps passed to this command can be a valid Yarn package format or a Git format or file scheme. &#x20;
* Mutually exclusive with `--descriptor` option.

`--platform`

* Set this option to generate and upload bundle for a single platform.
* Either `android` or `ios`.
* If this option is not provided, both iOS and Android bundles will be generated and uploaded.

`--prod`

* Set this flag to geenrate and upload a production bundle.
* If this flag is not set, a development bundle will be generated and uploaded.

### Related commands

[bundlestore create](/v0.38/cli-commands/bundlestore/create.md) | Create a store [bundlestore use](/v0.38/cli-commands/bundlestore/use.md) | Use a specific store\
[bundlestore delete](/v0.38/cli-commands/bundlestore/delete.md) | Delete a store

\[custom Composite]: ../../platform-parts/composite/index.md


---

# 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.38/cli-commands/bundlestore/upload.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.
