> For the complete documentation index, see [llms.txt](https://help.iviva.com/uxp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.iviva.com/uxp/publishing.md).

# Publishing your UIs

Once you have built and tested your interfacs, you need to publish them to Lucy in order to make them available in portals.

Publishing is a two-step process:

1. Prepare your [bundle.json](https://github.com/EutechCybernetic/uxp-documentation/blob/v2.0.0/bundles/README.md) file with the required metadata.
2. Uploading your changes to Lucy

## Preparing your bundle

There is a json file called bundle.json in the root directory of your project. Here, you need to fill in metaata about the components you want to publish. [Look at the bundle configuration page](https://github.com/EutechCybernetic/uxp-documentation/blob/v2.0.0/bundles/README.md) for information on how to fill this.

## Uploading your changes

Uploading your changes is straightforward. You need to use the [lucy-xp](https://github.com/EutechCybernetic/uxp-documentation/blob/v2.0.0/lucyxp/README.md) tool to upload your changes to your Lucy server.

```bash
$ npx lucy-xp upload dist/main.js bundle.json --lucy-apikey "SC:test:124" --lucy-url "https://myserver.iviva.cloud"
```

The parameters to the [lucy-xp](https://github.com/EutechCybernetic/uxp-documentation/blob/v2.0.0/lucyxp/README.md) command are:

* `upload` - this is the command to upload your changes to a Lucy server
* `dist/main.js` - this is the path to the final output javascript file that contains all of your code. This is generated by webpack.
* `bundle.json` - the path to your bundle.json file
* `--lucy-apikey <apikey>` - The api key to use to upload changes to the Lucy server. You need to generate an API Key on the Lucy server and use that here
* `--lucy-url <url>` - The full url to your Lucy server

You can update an existing bundle on the server by simply re-uploading it. As long as the bundle id hasn't changed it will replace the existing bundle.
