Skip to content

Move docs and manage comments

Move a doc to another space or parent, and add, edit, resolve, react to, or delete doc comments from pf.

Move docs

Moving a doc into or out of a private or project space changes who can see it, so it needs manage access to the doc. Without --parent, the doc goes to the top level of the target space.

pf docs move <id>Move a doc and all of its subpages

Options

  • --spacestring

    Target space (default: the current space)

  • --parentstring

    Parent doc in the target space (default: top level)

  • --positionnumber

    0-based position among the new siblings (default: last)

Example

Shell
pf docs move <doc-id> --parent <parent-doc-id>
pf docs move <doc-id> --space <space-id> --position 0 --json

Doc comments

Add, list, edit, resolve, react to, and delete comments on a doc. Pass text with --content, or read it from a file or stdin with --content-file.

pf docs comments list <docId>List comments on a doc

alias: pf docs comments ls

Options

  • --resolvedboolean

    Only resolved threads

  • --unresolvedboolean

    Only unresolved threads

  • --authorstring

    Only comments by this user ID, or me

  • --assigneestring

    Only comments assigned to this user ID, or me

  • --parentstring

    root for top-level comments, or a comment ID for its replies

  • --limitnumber

    Maximum results, 1 to 100 (default 50)

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf docs comments list <doc-id> --limit 20
pf docs comments list <doc-id> --unresolved --assignee me
pf docs comments add <docId>Add a comment, or reply to one with --parent

Options

  • --contentstring

    Comment text. Use this or --content-file.

  • --content-filestring

    Read the comment from a file, or - for stdin

  • --formatstring

    plaintext, markdown, or platejs (default markdown)

  • --parentstring

    Comment ID to reply to

Example

Shell
pf docs comments add <doc-id> --content "**Ready** for review"
pf docs comments add <doc-id> --parent <comment-id> --content "Fixed in the latest version."
pf docs comments edit <docId> <commentId>Edit a comment

Options

  • --contentstring

    Comment text. Use this or --content-file.

  • --content-filestring

    Read the comment from a file, or - for stdin

  • --formatstring

    plaintext, markdown, or platejs (default markdown)

  • --expected-updated-atnumber

    Fail with 412 if the comment changed since this updatedAt

Example

Shell
pf docs comments edit <doc-id> <comment-id> --content-file note.md --format markdown
pf docs comments resolve <docId> <commentId>Resolve a comment thread, or reopen it with --reopen

Options

  • --reopenboolean

    Reopen a resolved thread instead

Example

Shell
pf docs comments resolve <doc-id> <comment-id>
pf docs comments resolve <doc-id> <comment-id> --reopen
pf docs comments react <docId> <commentId> <emoji>Toggle your reaction on a comment

Example

Shell
pf docs comments react <doc-id> <comment-id> 👍
pf docs comments reactions <docId> <commentId>List reaction counts on a comment

Example

Shell
pf docs comments reactions <doc-id> <comment-id>
pf docs comments delete <docId> <commentId>Delete a comment

alias: pf docs comments rm

Options

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf docs comments delete <doc-id> <comment-id> --dry-run
  • Running react again with the same emoji removes your reaction. Reactions need a key with reactions scopes as well as docs scopes.
  • Only the comment author or a workspace owner or admin can delete a comment. Replies stay in the thread after a delete.
  • Use --cursor with the cursor from the previous page to read more comments.

Fix move and comment problems

A move is refused
Moves that change a doc's audience need manage access to the doc. The parent must be an active doc that you can edit, and a doc cannot move under one of its own subpages.
A comment command is refused
Comment deletes need the comment author or an owner or admin. Reactions also need a reactions scope on the key.

Next steps

Image preview
100%