octo-docs — bot access to Octo documents, spreadsheets, whiteboards & presentations
This skill is progressive: this file covers the shared essentials (auth,
document lifecycle) and routes you to a focused reference file for each surface.
Load the one reference that matches your task — don't read them all. The
reference files sit next to this file in the skill directory.
All commands call $OCTO_API_BASE_URL/v1/bot/docs/*.
When to read which reference
| Your task |
Read |
Read/edit a spreadsheet (doc_type: sheet): structural row/column edits, find & replace, cells, formulas, styles, layout, floating images, freeze panes, shared filters, sorting, data validation/dropdowns, paged reads, xlsx export |
sheet.md |
Read/edit a rich-text document body (doc_type: doc): incremental block ops |
doc.md |
Read/edit a whiteboard (doc_type: board): scene elements/files, image export |
board.md |
Create/edit a PPT (doc_type: html_ppt): slides, comments, versions and HTML export |
ppt.md |
Continue from a searchable HTML document (doc_type: html): resolve its document reference, then use immutable versions/drafts/assets/comments |
../octo-html/SKILL.md |
| Members & sharing, attachments (presign/upload and external-image ingest); document/sheet/board comments and versions |
common.md |
The first four split by doc_type (what kind of document you're handling);
common.md covers shared document management; PPT comments, versions and media
usage are described in ppt.md. Read a reference with
your file tool (it sits beside this SKILL.md, e.g. sheet.md), or reprint the
whole skill set anytime with octo-cli skills octo-docs.
Pick by doc_type: a doc body → doc.md; a sheet → sheet.md; a
board → board.md; a PPT → ppt.md; an html result → the separate octo-html skill.
Using the wrong surface returns 409 unsupported_doc_type. For an HTML search
result, run docs get <docId> and use its octoDocSlug value as the document reference
with html get <octoDocSlug> (or another html command). Do not retry HTML through docs content,
docs sheet, or docs scene.
docs get <docId> reports the doc_type, your role, and octoDocSlug for HTML.
That value is the canonical doc_id for new documents and the retained legacy
slug for old documents; callers do not infer the distinction from mount state.
Auth & space
- Authenticate with a bot token via a stored profile (
--profile / --bot-id)
or OCTO_BOT_TOKEN; both app_* and bf_* tokens work. Confirm with
octo-cli config show.
- Do not pass a space flag for docs. The bot mount resolves the space
server-side from the token and deliberately ignores any client-supplied space
header (anti-spoof). Role enforcement (reader / writer / admin) also happens
server-side, so the CLI surfaces the backend's
403/404 envelopes unchanged.
Document lifecycle
# Create an empty doc (caller becomes owner/admin). A new doc has NO body —
# seed a `doc` with `docs content edit` (doc.md), a `sheet` with
# `docs sheet edit` (sheet.md), and a `board` with `docs scene edit` (board.md).
octo-cli docs create [--title "Runbook"] [--folderId f_123] [--docType doc|sheet|board]
# Create a presentation from a template (ppt.md).
octo-cli docs create --docType html_ppt --title "Quarterly Review" --templateId report --idempotency-key <unique-key>
# List docs you own or are a member of. Page-based (see the pagination note below).
octo-cli docs list [--folderId f_123] [--page 1] [--pageSize 20] [--sort updatedAt:desc]
# Full-text search every doc the bot may read. Repeat --doc-type to combine kinds.
# Search is cursor-based; --page-all follows nextCursor automatically.
octo-cli docs search --keyword "quarterly plan" [--doc-type doc|sheet|board|html] [--page-size 20] [--page-all]
octo-cli docs get <docId> # metadata + doc_type + your role
# Import a local file into an existing target. .md/.markdown/.docx require a doc;
# .xlsx requires a sheet and imports its first visible worksheet.
octo-cli docs import <docId> --file ./input.md
# Export to a local file. -o is required and its extension must match.
# --export-format is distinct from global --format (the envelope renderer).
octo-cli docs export <docId> --export-format pdf -o ./output.pdf
# Other accepted matching pairs: md/.md, docx/.docx, xlsx/.xlsx, png/.png, svg/.svg
octo-cli docs rename <docId> --title "New title"
octo-cli docs delete <docId> # soft delete (admin)
Pagination note
Pagination depends on the endpoint's response contract:
docs list is page-based — response is {total, items}. Walk it with
--page / --pageSize; --page-all is not offered.
docs search is cursor-based — response is {total, items, nextCursor}.
Pass nextCursor back via --cursor, or use --page-all to follow it
automatically; --page-limit caps automatic requests (default 10).
docs comments list and docs versions list are cursor-based — response is
{items, nextCursor}. Pass the returned nextCursor back via --cursor to get
the next page; stop when nextCursor is null.
Not in this version
docs attachments upload (binary helper), invites, access-requests, and
link-card are out of scope here. Body editing is limited to doc_type: doc
incremental block ops (doc.md), the spreadsheet batches documented in
sheet.md, doc_type: board scene batches (board.md), and revision-checked
PPT edits (ppt.md). doc_type: html
belongs to the separate html domain, uses its returned document reference, and
is published as
immutable versions; it cannot be read or edited through these content
surfaces. The document outline is not editable through the CLI.
Schema lookup
Any operation's parameters + response schema come from the embedded registry:
octo-cli schema docs.create
octo-cli schema docs.search
octo-cli schema docs.content.edit # + docs.sheet.edit / docs.sheet.replace / docs.sheet.rows.insert / docs.sheet.columns.delete / …
1---2name: octo-docs3description: Docs domain — create and govern documents, read and incrementally edit a doc's live body, read and edit spreadsheets including structural row/column edits, find & replace, cells, layout, shared filters, sorting, freeze panes, and validation/dropdowns, read and batch-edit whiteboard scenes, create and edit PPT presentations, members and sharing, inline comments, versions/snapshots, and attachment metadata as a bot. Load after octo-shared.4---56# octo-docs — bot access to Octo documents, spreadsheets, whiteboards & presentations78This skill is **progressive**: this file covers the shared essentials (auth,9document lifecycle) and routes you to a focused reference file for each surface.10**Load the one reference that matches your task — don't read them all.** The11reference files sit next to this file in the skill directory.1213All commands call `$OCTO_API_BASE_URL/v1/bot/docs/*`.1415## When to read which reference1617| Your task | Read |18|---|---|19| Read/edit a **spreadsheet** (`doc_type: sheet`): structural row/column edits, find & replace, cells, formulas, styles, layout, floating **images**, freeze panes, shared filters, sorting, data validation/dropdowns, paged reads, xlsx export | **`sheet.md`** |20| Read/edit a rich-text **document body** (`doc_type: doc`): incremental block ops | **`doc.md`** |21| Read/edit a **whiteboard** (`doc_type: board`): scene elements/files, image export | **`board.md`** |22| Create/edit a **PPT** (`doc_type: html_ppt`): slides, comments, versions and HTML export | **`ppt.md`** |23| Continue from a searchable **HTML document** (`doc_type: html`): resolve its document reference, then use immutable versions/drafts/assets/comments | **`../octo-html/SKILL.md`** |24| **Members & sharing**, **attachments** (presign/upload and external-image ingest); document/sheet/board **comments** and **versions** | **`common.md`** |2526> The first four split by `doc_type` (what kind of document you're handling);27> `common.md` covers shared document management; PPT comments, versions and media28> usage are described in `ppt.md`. Read a reference with29> your file tool (it sits beside this SKILL.md, e.g. `sheet.md`), or reprint the30> whole skill set anytime with `octo-cli skills octo-docs`.3132Pick by `doc_type`: a **doc** body → `doc.md`; a **sheet** → `sheet.md`; a33**board** → `board.md`; a **PPT** → `ppt.md`; an **html** result → the separate `octo-html` skill.34Using the wrong surface returns `409 unsupported_doc_type`. For an HTML search35result, run `docs get <docId>` and use its `octoDocSlug` value as the document reference36with `html get <octoDocSlug>` (or another `html` command). Do not retry HTML through `docs content`,37`docs sheet`, or `docs scene`.38`docs get <docId>` reports the `doc_type`, your role, and `octoDocSlug` for HTML.39That value is the canonical `doc_id` for new documents and the retained legacy40slug for old documents; callers do not infer the distinction from mount state.4142## Auth & space4344- Authenticate with a bot token via a stored profile (`--profile` / `--bot-id`)45 or `OCTO_BOT_TOKEN`; both `app_*` and `bf_*` tokens work. Confirm with46 `octo-cli config show`.47- **Do not pass a space flag for docs.** The bot mount resolves the space48 server-side from the token and deliberately ignores any client-supplied space49 header (anti-spoof). Role enforcement (reader / writer / admin) also happens50 server-side, so the CLI surfaces the backend's `403`/`404` envelopes unchanged.5152## Document lifecycle5354```bash55# Create an empty doc (caller becomes owner/admin). A new doc has NO body —56# seed a `doc` with `docs content edit` (doc.md), a `sheet` with57# `docs sheet edit` (sheet.md), and a `board` with `docs scene edit` (board.md).58octo-cli docs create [--title "Runbook"] [--folderId f_123] [--docType doc|sheet|board]5960# Create a presentation from a template (ppt.md).61octo-cli docs create --docType html_ppt --title "Quarterly Review" --templateId report --idempotency-key <unique-key>6263# List docs you own or are a member of. Page-based (see the pagination note below).64octo-cli docs list [--folderId f_123] [--page 1] [--pageSize 20] [--sort updatedAt:desc]6566# Full-text search every doc the bot may read. Repeat --doc-type to combine kinds.67# Search is cursor-based; --page-all follows nextCursor automatically.68octo-cli docs search --keyword "quarterly plan" [--doc-type doc|sheet|board|html] [--page-size 20] [--page-all]6970octo-cli docs get <docId> # metadata + doc_type + your role7172# Import a local file into an existing target. .md/.markdown/.docx require a doc;73# .xlsx requires a sheet and imports its first visible worksheet.74octo-cli docs import <docId> --file ./input.md7576# Export to a local file. -o is required and its extension must match.77# --export-format is distinct from global --format (the envelope renderer).78octo-cli docs export <docId> --export-format pdf -o ./output.pdf79# Other accepted matching pairs: md/.md, docx/.docx, xlsx/.xlsx, png/.png, svg/.svg8081octo-cli docs rename <docId> --title "New title"82octo-cli docs delete <docId> # soft delete (admin)83```8485## Pagination note8687Pagination depends on the endpoint's response contract:8889- `docs list` is **page-based** — response is `{total, items}`. Walk it with90 `--page` / `--pageSize`; `--page-all` is not offered.91- `docs search` is **cursor-based** — response is `{total, items, nextCursor}`.92 Pass `nextCursor` back via `--cursor`, or use `--page-all` to follow it93 automatically; `--page-limit` caps automatic requests (default 10).94- `docs comments list` and `docs versions list` are **cursor-based** — response is95 `{items, nextCursor}`. Pass the returned `nextCursor` back via `--cursor` to get96 the next page; stop when `nextCursor` is null.9798## Not in this version99100`docs attachments upload` (binary helper), invites, access-requests, and101link-card are out of scope here. Body editing is limited to `doc_type: doc`102incremental block ops (`doc.md`), the spreadsheet batches documented in103`sheet.md`, `doc_type: board` scene batches (`board.md`), and revision-checked104PPT edits (`ppt.md`). `doc_type: html`105belongs to the separate `html` domain, uses its returned document reference, and106is published as107immutable versions; it cannot be read or edited through these content108surfaces. The document outline is not editable through the CLI.109110## Schema lookup111112Any operation's parameters + response schema come from the embedded registry:113114```bash115octo-cli schema docs.create116octo-cli schema docs.search117octo-cli schema docs.content.edit # + docs.sheet.edit / docs.sheet.replace / docs.sheet.rows.insert / docs.sheet.columns.delete / …118```