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

# magnet pages

> List, get, create, and update Magnet pages from the command line.

The `magnet pages` command group works with pages in your workspace. Content is exchanged as markdown.

## magnet pages list

List pages, optionally filtered by a search query.

```bash theme={null}
magnet pages list
```

| Option             | Description                                                                 |
| ------------------ | --------------------------------------------------------------------------- |
| `--search <query>` | Search query.                                                               |
| `--limit <n>`      | Page size (default from API). Use with `--cursor` for pagination.           |
| `--cursor <c>`     | Pagination cursor (use `pagination.nextCursor` from the previous response). |

## magnet pages get

Get a page by ID. Returns the page with its content as markdown (`docContent`).

```bash theme={null}
magnet pages get <id>
```

| Option           | Description                                                    |
| ---------------- | -------------------------------------------------------------- |
| `--preview-only` | Return a truncated `markdownPreview` instead of the full body. |

## magnet pages create

Create a page from markdown.

```bash theme={null}
magnet pages create --title "Architecture notes" --markdown "# Overview ..."
```

| Option              | Description                                              |
| ------------------- | -------------------------------------------------------- |
| `--title <text>`    | Page title. **Required.**                                |
| `--markdown <text>` | Page content (markdown). Defaults to the title if empty. |

## magnet pages update

Update a page's title.

```bash theme={null}
magnet pages update <id> --title "Architecture notes (v2)"
```

| Option            | Description                                  |
| ----------------- | -------------------------------------------- |
| `--title <text>`  | New title.                                   |
| `--skip-yjs-sync` | Skip syncing to Yjs (e.g. for bulk updates). |
