Skip to content

Create docs and canvases

Create, list, inspect, and update workspace docs, spaces, canvases, and canvas items from pf.

Quick start

Shell
pf canvases list --project <project-id>
pf spaces list --project <project-id>
pf docs list --space <space-id>
pf docs versions <doc-id>

Command families

Canvases (pf canvases, alias pf cv)
Create and maintain canvases in a project and edit the items on them. Actions: list, create, view, edit, archive, delete, items add, items edit, items delete.
Spaces (pf spaces)
Create, rename, archive, and delete the spaces that organize docs. Actions: list, view, create, edit, archive, delete.
Docs (pf docs)
Manage doc metadata, Plate JSON content, placement, comments, and version history. Browse recent and watched docs and the doc tree, share docs, and manage templates. Actions: list, view, create, edit, set-content, edit-blocks, move, duplicate, lock, watch, versions, version, restore-version, archive, delete, recent, watching, awaiting-me, tree, children, backlinks, shares, share, unshare, templates, template, template-create, template-delete, comments.

Create docs and canvases

  1. 1.

    Choose a project

    List its canvases and doc spaces with JSON output. Use the returned IDs in later commands.

  2. 2.

    Name and place the work

    Give the canvas a name and choose its visibility. Create docs in a space that the people who need them can access.

  3. 3.

    Check the result

    View the created record by ID and verify project or space, visibility, state, and version before adding more content.

  4. 4.

    Pass every ID in scripts

    Commands that offer a picker in a terminal fail when an ID is missing in a non-interactive process.

Shell
pf canvases create --project <project-id> --name "Review map" --visibility shared --json
pf canvases view <canvas-id> --json
pf spaces list --project <project-id> --json
pf docs create --space <space-id> --title "Review notes" --json
pf docs view <doc-id> --json

Canvas commands

pf canvases listList canvases

alias: pf cv ls

Options

  • --projectstring

    Only canvases in this project

  • --show-archivedboolean

    Include archived canvases

  • --limitnumber

    Maximum results, 1 to 100 (default 50)

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf canvases list --project <project-id> --show-archived
pf canvases createCreate a canvas. A linked or default project satisfies the project requirement.

Options

  • --projectstringrequired

    Project ID. Not needed when a linked or default project is set.

  • --namestringrequired

    Canvas name, up to 200 characters. Prompted for in a terminal.

  • --descriptionstring

    Canvas description

  • --visibilitystring

    private or shared (default private)

Example

Shell
pf canvases create --project <project-id> --name "Review map" --visibility shared --json
pf canvases view [id]View a canvas and its items

alias: pf cv show

Example

Shell
pf canvases view <canvas-id> --json
pf canvases edit [id]Rename a canvas or change its description or visibility

alias: pf cv update

Options

  • --namestring

    New name

  • --descriptionstring

    New description

  • --visibilitystring

    private or shared

  • --expected-updated-atnumber

    Fail with 412 if the canvas changed since this updatedAt

Example

Shell
pf canvases edit <canvas-id> --visibility shared
pf canvases archive [id]Archive a canvas, or restore it with --unarchive

Options

  • --unarchiveboolean

    Restore the canvas instead

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf canvases archive <canvas-id> --dry-run
pf canvases archive <canvas-id> --unarchive
pf canvases delete [id]Delete a canvas

alias: pf cv rm

Options

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf canvases delete <canvas-id> --dry-run

Edit canvas items

Adding an item needs a type and a position and size. Use --frame to place the item in a frame on the same canvas. For other fields, such as shape kind, stroke, or draw points, pass a JSON object with --data-file. Read item IDs from pf canvases view <canvas-id> --json. Locked items and archived canvases reject changes, except that an edit with --unlock unlocks the item first. Connectors join two items, so use the item IDs from the same output.

pf canvases items list <canvasId>List the items on a canvas, 100 at a time in creation order. Use it when pf canvases view reports a truncated canvas.

alias: pf cv items ls

Options

  • --limitnumber

    Items per page, 1 to 200 (default 100)

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf canvases items list <canvas-id> --limit 200 --json
pf canvases items add <canvasId>Add an item to a canvas. Images and other files are added with pf media upload --canvas.

Options

  • --typestringrequired

    note, text, shape, url, frame, draw, task, or post

  • --xnumberrequired

    X position

  • --ynumberrequired

    Y position

  • --widthnumberrequired

    Width

  • --heightnumberrequired

    Height

  • --contentstring

    Plain text for notes, shapes, and text items

  • --colorstring

    Item color

  • --urlstring

    Link for url items

  • --framestring

    Frame item ID to place the item in

  • --taskstring

    Task ID for task items

  • --poststring

    Post ID for post items

  • --data-filestring

    JSON file with other item fields, or - for stdin. Flags override the file.

Example

Shell
pf canvases items add <canvas-id> --type note --x 120 --y 80 --width 240 --height 160 --content "Check the launch copy"
echo '{"shapeKind":"ellipse","fillStyle":"subtle"}' | pf canvases items add <canvas-id> --type shape --x 400 --y 80 --width 160 --height 160 --data-file -
pf canvases items edit <canvasId> <itemId>Change an item's position, size, text, color, link, frame, group, lock, layer, or auto layout. At least one change is required.

Options

  • --xnumber

    X position

  • --ynumber

    Y position

  • --widthnumber

    Width

  • --heightnumber

    Height

  • --contentstring

    Plain text

  • --colorstring

    Item color

  • --urlstring

    Link. An empty string clears it.

  • --framestring

    Frame item ID to place the item in, or none to take it out. A frame can only go inside a section.

  • --groupstring

    Group ID, up to 128 characters, or none to ungroup

  • --lockboolean

    Lock the item. A locked item can only be unlocked.

  • --unlockboolean

    Unlock the item. It is applied before any other change.

  • --layerstring

    front, back, forward, or backward

  • --auto-layoutstring

    horizontal, vertical, grid, or none. Frames only.

  • --gapnumber

    Auto layout gap, 0 or more

  • --paddingnumber

    Auto layout padding, 0 or more

  • --alignstring

    Auto layout alignment, from start-start to end-end

  • --data-filestring

    JSON file with other fields to change, or - for stdin. Flags override the file.

  • --expected-updated-atnumber

    Fail with 412 if the item changed since this updatedAt

Example

Shell
pf canvases items edit <canvas-id> <item-id> --x 160 --y 120
pf canvases items edit <canvas-id> <item-id> --frame <frame-id> --layer front
pf canvases items edit <canvas-id> <frame-id> --auto-layout horizontal --gap 16 --padding 24
pf canvases items delete <canvasId> <itemId>Remove an item from a canvas

alias: pf canvases items rm

Options

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf canvases items delete <canvas-id> <item-id> --dry-run
pf canvases items view <canvasId> <itemId>View one item, including its frame, group, lock, layer, and auto layout settings

alias: pf canvases items show

Example

Shell
pf canvases items view <canvas-id> <item-id> --json
pf canvases frame <canvasId> <frameId>Show a frame's bounds and the IDs of the items inside it. Fails with 404 when the item is not a frame on that canvas.

Options

  • --item-limitnumber

    Item IDs to return, 1 to 500

Example

Shell
pf canvases frame <canvas-id> <frame-id> --item-limit 100
pf canvases linked <canvasId>List the task and post cards on a canvas with their current status. A card you cannot open shows as no access. The list stops at 100 cards.

Example

Shell
pf canvases linked <canvas-id> --json
pf canvases connectors add <canvasId> <sourceItemId> <targetItemId>Connect two items. The ends must be different items, and neither can be a drawing.

Options

  • --stylestring

    line or arrow

  • --colorstring

    Connector color

  • --routestring

    straight, cornered, or curved

  • --strokestring

    solid, dashed, dotted, or sketch

  • --start-capstring

    none or arrow

  • --end-capstring

    none or arrow. none makes the style line.

  • --start-edgestring

    auto, top, right, bottom, or left

  • --end-edgestring

    auto, top, right, bottom, or left

  • --idempotency-keystring

    Retry key, so a repeated command does not add two connectors

Example

Shell
pf canvases connectors add <canvas-id> <item-id> <other-item-id>
pf canvases connectors add <canvas-id> <item-id> <other-item-id> --style arrow --route curved --stroke dashed
pf canvases connectors edit <canvasId> <connectorId>Change a connector's style or move one of its ends. At least one change is required.

Options

  • --sourcestring

    Move the start to this item

  • --targetstring

    Move the end to this item

  • --stylestring

    line or arrow

  • --colorstring

    Connector color

  • --routestring

    straight, cornered, or curved

  • --strokestring

    solid, dashed, dotted, or sketch

  • --start-capstring

    none or arrow

  • --end-capstring

    none or arrow. none makes the style line.

  • --start-edgestring

    auto, top, right, bottom, or left

  • --end-edgestring

    auto, top, right, bottom, or left

  • --expected-updated-atnumber

    Fail with 412 if the connector changed since this updatedAt

Example

Shell
pf canvases connectors edit <canvas-id> <connector-id> --end-cap none
pf canvases connectors edit <canvas-id> <connector-id> --target <item-id> --expected-updated-at 1779680000000
pf canvases connectors delete <canvasId> <connectorId>Delete a connector

alias: pf canvases connectors rm

Options

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf canvases connectors delete <canvas-id> <connector-id> --dry-run

Manage spaces

Archiving a space archives its docs too. A space can be deleted only after it is archived, and only when it holds no docs. Docs in an archived space cannot be deleted, so empty the space first: delete each doc or move it with pf docs move, including archived docs. Restore archived docs one by one with pf docs archive <id> --restore.

pf spaces listList spaces. This is the default for pf spaces.

alias: pf spaces ls

Options

  • --projectstring

    Only spaces in this project

  • --include-archivedboolean

    Include archived spaces you can manage

Example

Shell
pf spaces list --project <project-id> --include-archived
pf spaces view <id>View a space

alias: pf spaces show

Example

Shell
pf spaces view <space-id>
pf spaces createCreate a space. A space without --project belongs to the workspace.

Options

  • --namestringrequired

    Space name, up to 100 characters

  • --projectstring

    Project ID. Omit for a workspace space.

  • --descriptionstring

    Space description

  • --iconstring

    Space icon

  • --visibilitystring

    shared or private (default shared)

Example

Shell
pf spaces create --name "Engineering" --visibility shared --json
pf spaces edit <id>Change a space. At least one field is required. An empty --description or --icon clears that value.

alias: pf spaces update

Options

  • --namestring

    New name

  • --descriptionstring

    New description

  • --iconstring

    New icon

  • --visibilitystring

    shared or private

Example

Shell
pf spaces edit <space-id> --name "Platform" --description "Runbooks"
pf spaces archive <id>Archive a space and its docs, or restore it with --restore. Restoring brings back the space but not its docs.

Options

  • --restoreboolean

    Restore the space instead

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf spaces archive <space-id> --dry-run
pf spaces archive <space-id> --restore
pf spaces delete <id>Delete a space. It must be archived and hold no docs.

alias: pf spaces rm

Options

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf spaces delete <space-id> --confirm
Shell
pf docs list --space <space-id> --json
pf docs list --space <space-id> --state archived --json
pf docs delete <doc-id> --confirm
pf spaces archive <space-id> --confirm
pf spaces delete <space-id> --confirm

Doc commands

pf docs listList docs

alias: pf docs ls

Options

  • --spacestring

    Only docs in this space

  • --statestring

    active or archived (default active)

  • --parentstring

    Only children of this doc, or root for top-level docs

  • --querystring

    Text in the title, slug, or identifier, up to 100 characters

  • --last-edited-bystring

    Only docs last edited by this user ID, or me

  • --lockedboolean

    Only locked docs

  • --unlockedboolean

    Only unlocked docs

  • --sortstring

    updatedAt, createdAt, or title. Reads the newest 500 visible docs.

  • --orderstring

    asc or desc, for use with --sort

  • --limitnumber

    Maximum results, 1 to 100 (default 50)

  • --cursorstring

    Cursor from the previous page

Example

Shell
pf docs list --space <space-id> --state archived --json
pf docs list --parent root --sort title --order asc
pf docs list --query launch --last-edited-by me --unlocked
pf docs view <id>View a doc, including its identifier and link in the app. Accepts an ID or an identifier such as DOC-12.

alias: pf docs show

Options

  • --contentboolean

    Include the content body

  • --markdownboolean

    Return the content as Markdown. This implies --content.

Example

Shell
pf docs view <doc-id> --content
pf docs view DOC-12 --markdown
pf docs createCreate a doc in a space

Options

  • --spacestringrequired

    Space ID

  • --titlestring

    Doc title

  • --iconstring

    Doc icon

  • --visibilitystring

    public, private, or shared

  • --content-filestring

    Content file, or - for stdin. Defaults to Plate JSON unless --format is supplied.

  • --formatstring

    plaintext, markdown, or platejs for --content-file

  • --templatestring

    Start from a template instead of --content-file. The title defaults to the template name.

Example

Shell
pf docs create --space <space-id> --title "Review notes" --json
pf docs create --space <space-id> --template <template-id>
pf docs create --space <space-id> --content-file notes.md --format markdown --visibility private
pf docs edit <id>Change a doc's title, icon, visibility, or layout

alias: pf docs update

Options

  • --titlestring

    New title

  • --iconstring

    New icon

  • --visibilitystring

    public, private, or shared

  • --full-widthstring

    Full-width layout, true or false

Example

Shell
pf docs edit <doc-id> --title "Launch notes" --full-width true
pf docs archive <id>Archive a doc, or restore it with --restore

Options

  • --restoreboolean

    Restore the doc instead

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf docs archive <doc-id> --dry-run
pf docs archive <doc-id> --restore
pf docs duplicate <id>Copy a doc into a new doc at the end of the same parent. Subdocs and comments are not copied.

Example

Shell
pf docs duplicate <doc-id> --json
pf docs lock <id>Lock a doc so only owners and admins can edit it, or unlock it with --unlock. Needs an owner or admin.

Options

  • --unlockboolean

    Unlock the doc instead

Example

Shell
pf docs lock <doc-id>
pf docs lock <doc-id> --unlock
pf docs watch <id>Watch a doc, or stop watching it with --off

Options

  • --offboolean

    Stop watching instead

Example

Shell
pf docs watch <doc-id>
pf docs watch <doc-id> --off
pf docs delete <id>Delete a doc

alias: pf docs rm

Options

  • --confirmboolean

    Skip the confirmation prompt

  • --dry-runboolean

    Preview without making changes

Example

Shell
pf docs delete <doc-id> --dry-run

Archive, restore, and delete

  • Archive a canvas or doc when it should leave active lists but may be needed again. Use --dry-run first and verify the ID in the preview.
  • Include archived canvases with --show-archived. List archived docs with --state archived, and archived spaces with --include-archived.
  • Delete only after checking inbound links, child docs, exported copies, and the exact ID. A delete command is not the same as restoring an earlier content version.

Fix docs and canvas problems

No project is selected
Pass --project, link the directory with pf link, or set defaultProject. Verify the resolved project with a read-only list before creating a canvas.
A space or doc is missing
Confirm the workspace, project filter, space ID, and active or archived state. Access follows workspace, project, space, and page rules.
A space delete is refused
The space must be archived and empty. If it was archived with docs in it, restore it with pf spaces archive --restore, delete or move every doc, including archived ones, then archive and delete it again.
A canvas item change is refused
Check that the canvas is not archived, the item is not locked, and the item ID came from that canvas. Viewers cannot edit items, and a private canvas accepts changes only from its creator.
An archive or delete targets the wrong record
Stop before --confirm, view the ID directly, and rerun with --dry-run. Do not select by a duplicated display name in automation.

Command help

Shell
pf canvases --help
pf canvases items --help
pf spaces --help
pf docs --help
pf docs create --help
pf docs comments --help

Next steps

Image preview
100%