Log in and sync cloud projects
Log in once with Google on each computer. Each computer becomes a device of your account and syncs your cloud projects. There is no step to connect each project. Projects you do not make cloud projects stay local.
Log in
Prompt Studio uses the hosted account service at https://base.prompt.studio/accounts by default.
pst login
Login opens Google in the system browser on the computer that runs the native host. Use --open-browser=false to open the printed URL yourself on that same computer. A remote host needs its own browser and loopback access; the dashboard does not forward this callback.
For a self-hosted service, pass pst login --manager https://accounts.example.test, or set PSTDIO_ACCOUNT_MANAGER_ORIGIN in the host’s environment before starting it. An explicit address takes precedence over the environment setting, which takes precedence over the hosted default. HTTPS addresses may include a path. The account service supplies the relay address after login.
After login, the host keeps one device credential. It does not keep your Google session. Logging in again on the same computer replaces the credential.
Make a project a cloud project
pst projects list
pst projects cloud PROJECT_ID
The project keeps its ID, folder and local data. Every device of your account syncs it, together with its name and the origin git remote of its folder. A device notices a new cloud project when it starts, logs in, creates or binds the project, or checks the account again, which it does every minute.
To stop syncing a project, run pst projects local PROJECT_ID. Every device keeps its local copy. A project that syncs cannot be deleted on one device, because every device of the account gets every cloud project back. Make it local first, then delete it.
Get your cloud projects on a new computer
After you log in on a new or reset computer, every cloud project of your account appears in the project picker with its name. Its data, such as tickets, notes and artifacts, downloads without a folder. Until the first download finishes, the project reports first-download-incomplete.
The second line of each cloud project in the picker says where it is on this computer:
| Line | Meaning |
|---|---|
| Cloud · not on this device yet | The first download has not finished. |
| Cloud · waiting to download | Newer changes from other devices are still on their way. |
| Cloud · ready offline · no folder yet | All data is here. The project’s files are not. |
| Cloud · needs attention | Some synced data could not be read. |
| The folder path | The project has a folder on this computer. |
When you select the project, Prompt Studio waits for its content to download, creates a local folder, and restores its notes and declared artifact files. The opening dialog shows progress and offers Retry if setup fails. Opening the project again uses the same folder and keeps your local edits. After its content is downloaded, the project can open offline.
This managed folder lives under PSTDIO_HOME/projects/project-<project-id>. It holds the project’s synced extension content. Opening does not clone its Git remote or copy unrelated source files from another computer, and it works for projects without Git. Existing local folder bindings are preserved.
Agents can use the same operation with client.projects.open(projectId). This prepares the local folder and restores content already downloaded on the device. Read client.account.projectSyncStatus(projectId) to check download readiness before opening a recovered cloud project.
If a download or extension activation failed, client.account.retryProjectSync(projectId) retries discovery and wakes the project’s sync owners immediately. It also clears the extension activation retry delay. The opening dialog uses this operation for Retry while waiting for content.
To get the whole project folder back from another of your computers, including uncommitted files and local Git history, restore its folder copy before opening the project. Opening first creates the managed folder, and a restored folder then stays beside it instead of becoming the project’s folder. On macOS and Linux, run pst projects folder sources PROJECT_ID, then pst projects folder restore PROJECT_ID --device DEVICE_ID --source SOURCE_ID --path /absolute/path/to/new-folder, or use client.projects.folderSources and client.projects.restoreFolder. See restore a project folder.
To use a folder you already have instead, bind the project ID before opening it on the new machine:
pst projects environment
pst projects bind PROJECT_ID --environment ENVIRONMENT_ID --name Notes --path /absolute/path/to/notes
The environment ID comes from pst projects environment on that computer.
Manage devices
pst devices list
pst devices rename DEVICE_ID "Work laptop"
pst devices remove DEVICE_ID
pst logout
devices list marks the current device with *. Removing a device stops it from renewing access. Access it already has ends within the access lifetime the service sets. Data already on that device stays there. pst logout removes the current device and ends sync on it. Edits made while signed out stay on the device and upload when you sign in again. Fields another device changed meanwhile keep that device’s version, and an unusually large set of changes waits on the device until you apply or discard it with pst projects returned-changes PROJECT_ID apply or discard. Run pst projects returned-changes PROJECT_ID to list what is waiting. Signing in to another account keeps your projects from the first one on the device the same way, and signing back in to the first account sends only your own changes. If the account service cannot be reached, it still logs out here; remove the device from another one later.
Native storage and SDK
The host stores its device login in native-account.json beside its database, with mode 0600. With PSTDIO_DB_PATH=/state/pstdio.db, the path is /state/native-account.json. PSTDIO_ACCOUNT_FILE selects another path. Keep this file out of project storage, extension files, synced content, screenshots and logs.
The host APIs are available through createClient(...).account in @pstdio/sdk/client. Responses never contain the device credential.
import { createClient } from "@pstdio/sdk/client";
const client = createClient();
const login = await client.account.login();
// Open login.url on the native host's computer, then wait for "complete".
const { status } = await client.account.loginStatus(login.id);
const devices = await client.account.devices();
await client.account.syncProject("PROJECT_ID");
See AccountClient for the exact methods and response types.
account.login(managerOrigin?) uses the host’s account service when the address is omitted. Pass an address to override it for that login. ctx.account.login() and the webview account client use the same host setting.
On main, account.cancelLogin(id) cancels a pending native login. account.projectSyncStatus(projectId) returns the project’s sync state and whether all known content has been verified on this device. These additions use the same API 0.2.1 additive step as device login.
account.devices() includes online for each device. The native runtime sends a presence heartbeat every 15 seconds without needing a Cloud project. Online means the account service heard from that device within 45 seconds. The manager computes the window with its own clock; clients do not infer online state from their wall clocks. pst devices list shows this status next to last seen.
Extensions
Extensions use the same account through ctx.account and, in webviews, client.account with the account.read and account.manage capabilities. They receive accountEvents.projectSyncChanged when a project’s sync status changes. See Cloud account and sync status for the methods and the meaning of each sync state.
Updated at: 2026-11-07