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

# Manage workspaces from the CLI

> Create, inspect, leave and delete Square Cloud workspaces with squarecloud workspace, and choose which of your applications each workspace can see.

A workspace shares applications with a team. `squarecloud workspace` also works as `squarecloud ws`. Every command takes the workspace ID, which `workspace list` and `workspace create` print. To add people, see [Workspace members](/en/cli-reference/workspace-members); the help center explains [what each member can do](https://help.squarecloud.app/en-us/article/workspace-permissions-collaborators-12ahei1/).

## `squarecloud workspace create`

```bash Usage theme={"system"}
squarecloud workspace create <name>
```

Creates a workspace and prints its ID.

```bash theme={"system"}
squarecloud workspace create "My Team"
```

```bash Output theme={"system"}
✓ Workspace My Team (<workspaceID>) created successfully
```

## `squarecloud workspace list`

```bash Usage theme={"system"}
squarecloud workspace list [--json]
```

Shows the name, workspace ID, member count, application count and creation date of every workspace you own or joined.

## `squarecloud workspace info`

```bash Usage theme={"system"}
squarecloud workspace info <workspaceID> [--json]
```

Shows the workspace ID, name, owner and creation date, followed by a table of its members (name, member ID, group and join date) and a table of its shared applications (name, app ID, language and memory), when it has any.

## `squarecloud workspace app add`

```bash Usage theme={"system"}
squarecloud workspace app add <workspaceID> <appID>
```

Shares one of your applications with a workspace you own, so its members can work on it. A workspace holds up to 100 applications.

## `squarecloud workspace app remove`

```bash Usage theme={"system"}
squarecloud workspace app remove <workspaceID> <appID>
```

Stops sharing the application with the workspace. Only the workspace owner can do it.

## `squarecloud workspace leave`

```bash Usage theme={"system"}
squarecloud workspace leave <workspaceID> [-y]
```

| Flag | Description |
| - | - |
| `-y`, `--yes` | Skips the confirmation prompt. |

Removes you from a workspace someone else owns, after a `y/N` confirmation. The workspace itself stays. The owner can't leave their own workspace: delete it instead.

## `squarecloud workspace delete`

```bash Usage theme={"system"}
squarecloud workspace delete <workspaceID> [-y]
```

| Flag | Description |
| - | - |
| `-y`, `--yes` | Skips the confirmation prompt. |

<Warning>
  Deleting a workspace is permanent: its member list and application sharing go with it. The applications themselves stay in their owners' accounts.
</Warning>

Only the owner can delete a workspace. The command asks for `y/N` confirmation first.

## Related

| Command | API | JavaScript SDK | VS Code |
| - | - | - | - |
| `create` | [`POST /v2/workspaces`](/en/api-reference/endpoint/workspace/create) | [`api.workspaces.create()`](/en/sdks/js/workspaces) | [Create workspace](/en/vscode-extension/features#workspaces) |
| `list` | [`GET /v2/workspaces`](/en/api-reference/endpoint/workspace/list) | [`api.workspaces.list()`](/en/sdks/js/workspaces) | [Workspaces section](/en/vscode-extension/features#workspaces) |
| `info` | [`GET /v2/workspaces/{workspaceId}`](/en/api-reference/endpoint/workspace/get) | [`api.workspaces.get()`](/en/sdks/js/workspaces) | |
| `app add` | [`POST .../applications`](/en/api-reference/endpoint/workspace/apps/add) | [`api.workspaces.apps.add()`](/en/sdks/js/workspaces) | |
| `app remove` | [`DELETE .../applications`](/en/api-reference/endpoint/workspace/apps/remove) | [`api.workspaces.apps.remove()`](/en/sdks/js/workspaces) | |
| `leave` | [`DELETE /v2/workspaces/leave`](/en/api-reference/endpoint/workspace/leave) | [`api.workspaces.leave()`](/en/sdks/js/workspaces) | [Leave](/en/vscode-extension/features#workspaces) |
| `delete` | [`DELETE /v2/workspaces`](/en/api-reference/endpoint/workspace/delete) | [`api.workspaces.delete()`](/en/sdks/js/workspaces) | [Delete](/en/vscode-extension/features#workspaces) |
