# Use the terminal

> Open a terminal on a Cloud app's development or production computer, keep a session running, and the limits on sessions.
> Source: https://playcode.io/docs/build/terminal - last reviewed 2026-10-09.
> Ask Playcode's agent: "Run the tests on the development computer and tell me what failed." It runs commands on the development computer itself, and asks you before it changes anything on production.

A Cloud app has a real terminal on each of its computers: the development computer, where you and the agent build, and the production computer, which serves the published app. Open one from **Terminal** in the project menu. A static site has no terminal.

## Do it yourself

1. Open the project menu (☰ and the project name, at the top left) and choose **Terminal**.
2. Choose **New DEV terminal**, or **New PROD terminal** for the production computer. The terminal opens in a tab.
3. Type commands as in any Linux shell.
4. To leave a session running, choose ⋯ (**Terminal actions**) on the terminal, then **Detach**, or close its tab. To stop it, choose **End session**.
5. To go back to a running session, open **Terminal** in the project menu again. Running sessions are listed under **Running**: choose one, then **Reattach**.

> [!WARNING]
> Commands on the production computer change the live app at once. Code you change there is replaced by the next publish: change code on the development computer, then publish.

## If it doesn't work

### "Publish the project first to open a PROD terminal."

The production computer exists only after the first publish. See [Publish a website](/docs/publish/publish-a-website).

### "This computer already has 8 terminal sessions. End one to open another."

Open **Terminal** in the project menu, choose a session under **Running**, then **End session**.

### The terminal shows **Reconnecting…** or **Disconnected**

The computer may be waking up, or the connection dropped. Wait a moment; if it stays disconnected, choose **Connect**.

### Your project has no Terminal in the menu

The project is a static site. To get a terminal, turn it into a Cloud app: see [Browser and Cloud projects](/docs/build/browser-and-cloud-projects).

## Limits

- Up to 8 terminal sessions per computer.
- A detached session keeps running for up to 7 days. Time while the computer sleeps does not count.
- An open terminal keeps its computer awake, and awake hours use credits. A detached session lets the computer sleep on its usual schedule: the session pauses and continues when the computer wakes.
- Sessions survive reloading the page. On a phone, a key bar above the keyboard adds Esc, Tab, Ctrl, the arrow keys and ^C.
- Anyone with edit access to the project can open a terminal. Viewers and people with only the link cannot.
- The agent runs its own commands without a terminal tab. It asks you before a command that changes the production computer.
