> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Project environment: AI environment setup, environment review, and publishing

> How AI sets up the setup script, start command, secrets, and environment variables for a cloud project on your cloud server: opening the environment setup page, the three-step environment review, results, publishing, and what each environment status means.

The **project environment** is what a cloud project needs to run on your cloud server: the setup script, the start command, and the secrets and environment variables the project uses. AI reads the repository, generates the setup script and start command, and lists missing secrets and variables. After you confirm and fill them in during the **environment review**, AI runs the setup script on the cloud server; once it passes, you publish it.

Environment setup is optional. You can start sessions as soon as a project is created; the setup status does not affect starting sessions. Local projects use the computer's own environment and skip this step.

## Availability

| Platform | Support | Notes |
| - | - | - |
| Desktop app | Supported | |
| Web app | Supported | |
| Mobile web | Supported | |

## Entry points

* The edit button (**Edit environment**) on the right of **Project settings › Environment**.
* A notification about missing environment variables for a project, which opens the environment setup page directly.

The environment setup page is a separate page on the project. It does not belong to a session and does not appear in the sidebar's session list.

## Environment status

In **Settings › Workspace › Projects**, each cloud project shows its environment status:

| Status | Meaning |
| - | - |
| **Environment not set up** | The environment has not been set up; you can start sessions right away |
| **Setting up** | The setup script is running on the cloud server; you can keep using the project in the meantime |
| **Unpublished** | The setup script passed but has not been published, or a published environment has changes |
| **Setup failed** | The setup script did not pass; you can retry. Starting sessions is not affected |
| No label | The environment has been published to the cloud server |

## First setup

When you first open the environment setup page, AI generates a draft from the repository (setup script, start command, and the secrets and variables needed). **It runs the setup script only after you finish the environment review.**

* When secrets or environment variables are missing, the **Review environment** card opens directly above the input box.
* When nothing is missing, click **Edit environment** above the input box to open the same card and confirm.

AI's steps are collapsed under **Worked for 12s**. Expand it to see them.

## Three-step environment review

The **Review environment** card has three steps. Use **Next** and **Skip** to move forward, and click **Finish review** on the last step. When required items are missing, you can click **Later** to collapse the card into one line, **Needs your input**. Click it to expand again; the values you entered are kept.

1. **Confirm setup and start**: review the AI-generated **Setup script** (runs when the environment is created and when dependencies change) and **Start command** (runs after each wake-up). Click the edit button to change them.
2. **Configure secrets**: fill in the value of each secret. Secrets already saved stay unchanged if left empty. Rows marked **Workspace** are suggested for the workspace level and are shared by projects in the workspace; other rows are saved as secrets for this project. Names can contain only letters, digits, and underscores, and cannot start with a digit.
3. **Configure environment variables**: variables with a value suggested by AI are prefilled. You can change them or click **Add variable**. Saved variables do not show their values; leave a field empty to keep it.

In the secrets and environment variables steps, **Next** is available only when all required values are filled in.

## After the review

After you click **Finish review**, the page shows the summary **You finished the environment review** (whether setup and start were changed, which secrets were saved, and the number of environment variables), and AI then runs the setup script on the cloud server with the confirmed script. Secret values are not shown on the page.

## Setup results

### Environment ready

When the setup script passes, an environment card appears with **my-app is ready**, listing the repository, runtime, setup script, start command, secrets (those without a value are marked **(missing)**), and the number of environment variables.

* **Edit**: reopens the review card so you can make changes and run it again.
* **Publish to cloud server**: after publishing, the card changes to **my-app is published**. Click **Start a task** to open the new session page with this project selected.

### Setup failed

When the setup script does not pass, the error message is shown. Starting sessions is not affected:

* **Retry**: runs the latest script again.
* **Edit environment**: change the script, then click **Finish review** to run it again.

## Add more requests

After setup fails, is ready, or is published, you can send a request in the input box at the bottom of the page (**Ask for follow-up changes**), and AI sets up the environment again accordingly. You cannot send while setup is in progress, and you cannot change the model here.

## Change a published environment

Open the environment setup page from **Project settings › Environment**, click **Edit environment**, and click **Finish review** after your changes to run the setup script again. Once it passes, the project becomes **Unpublished**; click **Publish to cloud server** again for the changes to take effect.

You can also change project-level secrets and variables directly in **Settings › Workspace › Secrets & variables**; see [Workspace settings](https://docs.aihubmix.com/en/cloud/settings/workspace.md). After you delete a variable, running environments pick up the change after a restart.

## Notes and limits

* Do not send secrets directly in the input box of a session or the environment setup page. Enter them in the environment review or in **Settings › Workspace › Secrets & variables**.
* The cloud environment can only reach the public internet.
* Environment setup applies only to cloud projects on the cloud server.

## FAQ

### I skipped the environment review. Can I add secrets later?

Yes. Add them in **Settings › Workspace › Secrets & variables**, or go back to the environment setup page and click **Edit environment**.

### Can I change the setup script before publishing?

Yes. Click **Edit** on the environment card, or edit it directly in step 1 of the review.

### Why didn't setup start automatically after I created the project?

Environment setup is optional. When you need it, go to **Project settings › Environment** and click the edit button.

## Related

* [Projects](https://docs.aihubmix.com/en/cloud/projects/projects.md)
* [Workspace settings](https://docs.aihubmix.com/en/cloud/settings/workspace.md)
* [Run environment: on your device and cloud server](https://docs.aihubmix.com/en/cloud/projects/run-environment.md)
* [Cloud server](https://docs.aihubmix.com/en/cloud/cloud-host/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.