# List Workspaces and Projects

### List Workspaces

You can retrieve a list of all Workspaces of which you are a member with the CLI.

To list Workspaces with the CLI, use the following command:

<pre class="language-bash"><code class="lang-bash"><strong>roboflow workspace list
</strong></code></pre>

This will return a list of Workspaces with their corresponding application links and Workspace IDs:

```
NAME             ID               DEFAULT
My Workspace     my-workspace     *
Other Workspace  other-ws
```

To get the output as JSON (for use in scripts or AI agents):

```bash
roboflow workspace list --json
```

```json
[
  {"name": "My Workspace", "url": "my-workspace", "link": "https://app.roboflow.com/my-workspace", "default": true},
  {"name": "Other Workspace", "url": "other-ws", "link": "https://app.roboflow.com/other-ws", "default": false}
]
```

### List Projects in a Workspace

To list projects in a workspace, use the following command:

```bash
roboflow project list
```

If you have a default workspace configured, the `-w` flag is optional. Otherwise, specify it:

```bash
roboflow project list -w WORKSPACE_ID
```

This will return a table of Projects:

```
NAME              ID                              TYPE                VERSIONS  IMAGES
my-dataset        my-workspace/my-dataset         object-detection    3         500
classifier        my-workspace/classifier         classification      1         200
```

To get the output as JSON:

```bash
roboflow project list --json
```

### Get a Project

To get detailed information about a project, use the following command:

```bash
roboflow project get PROJECT_ID
```

You can use the resource shorthand — no need to specify the workspace separately:

```bash
roboflow project get my-dataset              # uses default workspace
roboflow project get my-workspace/my-dataset  # explicit workspace
```

This will return information about the project including its versions:

```
Project: my-dataset
  ID: my-workspace/my-dataset
  Type: object-detection
  Images: 500
  Versions: 3
  Classes: car (200), truck (150), bus (150)
  Link: https://app.roboflow.com/my-workspace/my-dataset
```

To get the full JSON response:

```bash
roboflow project get my-dataset --json
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/developer/command-line-interface/list-workspaces-and-projects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
