> For the complete documentation index, see [llms.txt](https://docs.screendesk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.screendesk.io/debug-with-ai/cli.md).

# CLI

Read recordings and bug reports from your terminal, scripts, CI and coding agents.

The Screendesk CLI, `sdesk`, reads recordings and bug reports from your terminal: details, console logs, network requests, user events, transcript, screenshots and video frames. Use it yourself, in scripts and CI, or hand the commands to your coding agent.

{% embed url="<https://app.screendesk.io/recordings/966ea2dd-67c7-4dea-9369-1fdad5384a7e>" %}

{% hint style="info" %}
Available on Pro and Enterprise, on macOS and Linux. Prefer to chat with your assistant? Use [MCP](https://docs.screendesk.io/debug-with-ai/mcp.md).
{% endhint %}

You'll also find these steps under your avatar → **CLI**.

### Install

```bash
curl -fsSL https://app.screendesk.io/cli/install | sh
```

It installs `sdesk` to `~/.local/bin`. If your shell can't find it, add that folder to your `PATH` and open a new terminal.

<figure><img src="https://3820804400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfW6XSzJSKsNyZnOkSJPt%2Fuploads%2FPmoppvTbp6g0Kkw7H7Ir%2Fdocs-panel-cli.png?alt=media" alt="Your avatar, CLI"><figcaption></figcaption></figure>

### Sign in

```bash
sdesk auth login          # browser, read-only
sdesk auth login --write  # browser, to add comments and update reports
sdesk auth login --token  # paste a personal access token
```

For CI, create a personal access token under your avatar → **MCP → Personal access tokens** with **Screendesk CLI** access, and pass it as `SCREENDESK_TOKEN`.

### Common commands

Add `--json` for scripts and agents, and `--all` to get every page of results.

```bash
sdesk get report <url-or-id> --json
sdesk get console <url-or-id> --level error,warn --all --json
sdesk get network <url-or-id> --status-family 5xx --all --json
sdesk get events <url-or-id> --all --json
sdesk get screenshots <url-or-id> --out ./screendesk-media
sdesk find related <url-or-id> --window-days 30
sdesk analyze recurring-errors --created-after 2026-10-01
sdesk list reports --query "checkout" --error-only --all --json
```

| Command                                                                             | What it does                                              |
| ----------------------------------------------------------------------------------- | --------------------------------------------------------- |
| `sdesk get report`                                                                  | Details, comments, linked issues and what evidence exists |
| `sdesk get metadata` / `console` / `network` / `events` / `transcript` / `analysis` | One kind of evidence, filtered                            |
| `sdesk get screenshots` / `frames`                                                  | Download what the user saw                                |
| `sdesk list reports` / `folders` / `members`                                        | Search the workspace                                      |
| `sdesk find related`                                                                | Reports with the same error or context                    |
| `sdesk analyze recurring-errors`                                                    | The most common errors across reports                     |
| `sdesk compare reports`                                                             | Differences between two to five reports                   |
| `sdesk create comment` / `update report`                                            | Write back, with `--yes` and an `--idempotency-key`       |
| `sdesk doctor`                                                                      | Check your sign-in and connection                         |
| `sdesk skills install`                                                              | Teach Codex how to use the CLI                            |
| `sdesk upgrade`                                                                     | Update to the latest release                              |

`sdesk agent-context` prints every command in a format agents can read.

### Several workspaces

```bash
sdesk --profile staging auth login
sdesk profile use staging
```

### Troubleshooting

<details>

<summary>Sign-in fails or the wrong workspace is active</summary>

Run `sdesk doctor` and `sdesk auth status`, then `sdesk profile use <name>` or sign in again.

</details>

<details>

<summary>A write is refused</summary>

Sign in with `sdesk auth login --write`, or use a token with **Read and write** CLI access.

</details>

<details>

<summary>A report returns not found</summary>

It's in another workspace, or in a folder you can't open.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.screendesk.io/debug-with-ai/cli.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
