# Projects

# Projects

A project holds everything you set up for one job on a computer. Keep one per
test stand, product or campaign, and switch between them.

## What a project holds

| In the project | Not in the project |
|---|---|
| Inputs and their settings | Recorded data and runs |
| Calibrations | Cloud sync, storage and disk budget |
| Pipelines | Folder access you granted |
| Trellis setups, recipes and notebooks | Installed connectors |
| Live and Replay layouts | The computer's sign-in |
| Recording settings (what **Record** asks, what a run's end saves) | Peers |
| Channel names and units | |
| Each connector's settings | |

Recorded data belongs to the computer, not the project. Switching projects
never deletes it.

Passwords stay on the computer. A saved version, an exported file and a
published project never carry them.

## One active project

A computer runs one project at a time. Its name is in the title bar, with its
version and any unsaved changes: `cell-2 · v4 · 3 changes`.

To switch, click the name in the title bar and pick a project under **This
computer**. Phloem restarts to apply it:

- The inputs and pipelines of the old project stop.
- The new project's inputs, layouts and Trellis documents take over.
- Neither project changes. Unsaved changes stay with their project.

Phloem refuses a switch while a Trellis run, a recording or a deployed setup is
active, and says why.

Two projects can't share an input. Set it up in both; only the active one runs
it.

## Start a project

Open the project list from the title bar. Its foot has:

| Choose | Does |
|---|---|
| **New project** | Makes an empty project. Type a name and press Enter. |
| **Open profile…** | Makes a project from a profile file. |
| **Recover from backup…** | Brings back a project from another computer's backup, or one deleted here. |

The welcome screen offers the same, plus **Load published…**.

Opening never switches. The new project appears in the list, and the message
offers **Switch to it**.

To rename the active project, double-click its name in the title bar, or click
the name on the **Project** screen.

## Save a version

Changes since the last save show as a count beside the name. Click it to see
them, add a **Note**, and press **Save**. The button names the next version,
such as **Save v5**. ⌘S or Ctrl+S saves too.

The **Project** screen, at the foot of the rail, lists every saved version
under **Versions**, newest first.

To go back, press **Restore** on a version. Phloem shows what changes, then
restarts to apply it. Every version stays. If you have unsaved changes, choose
**Save, then restore** or **Discard and restore**.

## Share a project

Sharing copies a saved version. Unsaved changes are not included.

| To | Do | Result |
|---|---|---|
| Send a file | **Export** on the **Project** screen, then pick a folder | A profile file, `<name>-v<N>.project.phloem` |
| Share with your workspace | **Publish** on the **Project** screen | The version joins the workspace library |

Each version's menu has **Export…** and **Publish…** for older versions.
Published versions are marked `published`.

A project loaded from a profile shows **Loaded from** at the foot of
**Versions**. When a newer version is published, press **Upgrade to v5** to
bring it in. **Upgrade from file…** does the same from a profile file.

## Load a published project

| Where | Do |
|---|---|
| Computer | Click the project name, find it under **Published**, and pick it. Or choose **Load published…** on the welcome screen. |
| Console | Open **Projects** › **Published**, open the project, press **Load on devices**. Pick a **Version**, tick the devices, and press **Load on 2 devices** (the count
you picked). |

Each device gets a new project. What it runs now keeps running. Someone on the
device switches to it.

The console's **On devices** tab lists every project on every device. It shows
which is active, its saved version, and where it came from.

## Recover a project

Each project is backed up to your workspace while you are signed in, unless
the computer is set to **Local only**. If a
computer dies or is replaced, choose **Recover from backup…** on the new one.
Pick the old computer, then the project, and press **Recover**.

A project deleted on this computer is listed there too, under **Deleted on this
computer**.

## Runs remember their project

Every run is stamped with the project it started in, and that project's
version. A run list reads `v4`, `v4 (edited)` when it ran unsaved changes, or
`(unsaved)` when the project was never saved.

Replay lists the active project's runs. The console's **Runs** page can filter
by **Project**.

> **Note:** Renaming a project doesn't rename past runs. They keep the name the
> project had when they started.

- [Inputs](https://phloem.ai/docs/inputs/): Add the inputs a project runs
- [Devices and fleets](https://phloem.ai/docs/workspace/devices/): Connect computers and servers to your workspace
- [Cloud sync and working offline](https://phloem.ai/docs/workspace/sync/): What reaches the cloud, and when
