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

# Publish & share

> Publish to a public page, or share with people. The same rules as the app.

```bash theme={null}
octonote publish pag_…                       # prints publicUrl
octonote share pag_… --email sam@example.com --role editor
octonote share pag_… --link view               # anyone with the link
```

## publish

Publish to the web; prints the public URL

```bash theme={null}
octonote publish <id>
```

| Argument or option | What it does |
| - | - |
| `<id>` | any Octonote id (required) |

## unpublish

Stop publishing to the web

```bash theme={null}
octonote unpublish <id>
```

| Argument or option | What it does |
| - | - |
| `<id>` | any Octonote id (required) |

## share

Share with a person by email, or set who can open the link

```bash theme={null}
octonote share <id> [options]
```

| Argument or option | What it does |
| - | - |
| `<id>` | any Octonote id (required) |
| `-e, --email <email>` | invite this person (they get an email; non-users join on sign-up) |
| `-r, --role <role>` | viewer \| editor (default: viewer) |
| `--link <access>` | anyone with the link: off \| view \| edit |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.