Create docs and canvases
Create, list, inspect, and update workspace docs, spaces, canvases, and canvas items from pf.
Quick start
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.
Choose a project
List its canvases and doc spaces with JSON output. Use the returned IDs in later commands.
- 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.
Check the result
View the created record by ID and verify project or space, visibility, state, and version before adding more content.
- 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.
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> --jsonCanvas commands
pf canvases listList canvases
alias: pf cv ls
Options
--projectstringOnly canvases in this project
--show-archivedbooleanInclude archived canvases
--limitnumberMaximum results, 1 to 100 (default 50)
--cursorstringCursor from the previous page
Example
pf canvases list --project <project-id> --show-archivedpf canvases createCreate a canvas. A linked or default project satisfies the project requirement.
Options
--projectstringrequiredProject ID. Not needed when a linked or default project is set.
--namestringrequiredCanvas name, up to 200 characters. Prompted for in a terminal.
--descriptionstringCanvas description
--visibilitystringprivate or shared (default private)
Example
pf canvases create --project <project-id> --name "Review map" --visibility shared --jsonpf canvases view [id]View a canvas and its items
alias: pf cv show
Example
pf canvases view <canvas-id> --jsonpf canvases edit [id]Rename a canvas or change its description or visibility
alias: pf cv update
Options
--namestringNew name
--descriptionstringNew description
--visibilitystringprivate or shared
--expected-updated-atnumberFail with 412 if the canvas changed since this updatedAt
Example
pf canvases edit <canvas-id> --visibility sharedpf canvases archive [id]Archive a canvas, or restore it with --unarchive
Options
--unarchivebooleanRestore the canvas instead
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf canvases archive <canvas-id> --dry-run
pf canvases archive <canvas-id> --unarchivepf canvases delete [id]Delete a canvas
alias: pf cv rm
Options
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf canvases delete <canvas-id> --dry-runEdit 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
--limitnumberItems per page, 1 to 200 (default 100)
--cursorstringCursor from the previous page
Example
pf canvases items list <canvas-id> --limit 200 --jsonpf canvases items add <canvasId>Add an item to a canvas. Images and other files are added with pf media upload --canvas.
Options
--typestringrequirednote, text, shape, url, frame, draw, task, or post
--xnumberrequiredX position
--ynumberrequiredY position
--widthnumberrequiredWidth
--heightnumberrequiredHeight
--contentstringPlain text for notes, shapes, and text items
--colorstringItem color
--urlstringLink for url items
--framestringFrame item ID to place the item in
--taskstringTask ID for task items
--poststringPost ID for post items
--data-filestringJSON file with other item fields, or - for stdin. Flags override the file.
Example
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
--xnumberX position
--ynumberY position
--widthnumberWidth
--heightnumberHeight
--contentstringPlain text
--colorstringItem color
--urlstringLink. An empty string clears it.
--framestringFrame item ID to place the item in, or none to take it out. A frame can only go inside a section.
--groupstringGroup ID, up to 128 characters, or none to ungroup
--lockbooleanLock the item. A locked item can only be unlocked.
--unlockbooleanUnlock the item. It is applied before any other change.
--layerstringfront, back, forward, or backward
--auto-layoutstringhorizontal, vertical, grid, or none. Frames only.
--gapnumberAuto layout gap, 0 or more
--paddingnumberAuto layout padding, 0 or more
--alignstringAuto layout alignment, from start-start to end-end
--data-filestringJSON file with other fields to change, or - for stdin. Flags override the file.
--expected-updated-atnumberFail with 412 if the item changed since this updatedAt
Example
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 24pf canvases items delete <canvasId> <itemId>Remove an item from a canvas
alias: pf canvases items rm
Options
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf canvases items delete <canvas-id> <item-id> --dry-runpf canvases items view <canvasId> <itemId>View one item, including its frame, group, lock, layer, and auto layout settings
alias: pf canvases items show
Example
pf canvases items view <canvas-id> <item-id> --jsonpf 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-limitnumberItem IDs to return, 1 to 500
Example
pf canvases frame <canvas-id> <frame-id> --item-limit 100pf 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
pf canvases linked <canvas-id> --jsonpf canvases connectors add <canvasId> <sourceItemId> <targetItemId>Connect two items. The ends must be different items, and neither can be a drawing.
Options
--stylestringline or arrow
--colorstringConnector color
--routestringstraight, cornered, or curved
--strokestringsolid, dashed, dotted, or sketch
--start-capstringnone or arrow
--end-capstringnone or arrow. none makes the style line.
--start-edgestringauto, top, right, bottom, or left
--end-edgestringauto, top, right, bottom, or left
--idempotency-keystringRetry key, so a repeated command does not add two connectors
Example
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 dashedpf canvases connectors edit <canvasId> <connectorId>Change a connector's style or move one of its ends. At least one change is required.
Options
--sourcestringMove the start to this item
--targetstringMove the end to this item
--stylestringline or arrow
--colorstringConnector color
--routestringstraight, cornered, or curved
--strokestringsolid, dashed, dotted, or sketch
--start-capstringnone or arrow
--end-capstringnone or arrow. none makes the style line.
--start-edgestringauto, top, right, bottom, or left
--end-edgestringauto, top, right, bottom, or left
--expected-updated-atnumberFail with 412 if the connector changed since this updatedAt
Example
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 1779680000000pf canvases connectors delete <canvasId> <connectorId>Delete a connector
alias: pf canvases connectors rm
Options
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf canvases connectors delete <canvas-id> <connector-id> --dry-runManage 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
--projectstringOnly spaces in this project
--include-archivedbooleanInclude archived spaces you can manage
Example
pf spaces list --project <project-id> --include-archivedpf spaces view <id>View a space
alias: pf spaces show
Example
pf spaces view <space-id>pf spaces createCreate a space. A space without --project belongs to the workspace.
Options
--namestringrequiredSpace name, up to 100 characters
--projectstringProject ID. Omit for a workspace space.
--descriptionstringSpace description
--iconstringSpace icon
--visibilitystringshared or private (default shared)
Example
pf spaces create --name "Engineering" --visibility shared --jsonpf 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
--namestringNew name
--descriptionstringNew description
--iconstringNew icon
--visibilitystringshared or private
Example
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
--restorebooleanRestore the space instead
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf spaces archive <space-id> --dry-run
pf spaces archive <space-id> --restorepf spaces delete <id>Delete a space. It must be archived and hold no docs.
alias: pf spaces rm
Options
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf spaces delete <space-id> --confirmpf 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> --confirmDoc commands
pf docs listList docs
alias: pf docs ls
Options
--spacestringOnly docs in this space
--statestringactive or archived (default active)
--parentstringOnly children of this doc, or root for top-level docs
--querystringText in the title, slug, or identifier, up to 100 characters
--last-edited-bystringOnly docs last edited by this user ID, or me
--lockedbooleanOnly locked docs
--unlockedbooleanOnly unlocked docs
--sortstringupdatedAt, createdAt, or title. Reads the newest 500 visible docs.
--orderstringasc or desc, for use with --sort
--limitnumberMaximum results, 1 to 100 (default 50)
--cursorstringCursor from the previous page
Example
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 --unlockedpf 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
--contentbooleanInclude the content body
--markdownbooleanReturn the content as Markdown. This implies --content.
Example
pf docs view <doc-id> --content
pf docs view DOC-12 --markdownpf docs createCreate a doc in a space
Options
--spacestringrequiredSpace ID
--titlestringDoc title
--iconstringDoc icon
--visibilitystringpublic, private, or shared
--content-filestringContent file, or - for stdin. Defaults to Plate JSON unless --format is supplied.
--formatstringplaintext, markdown, or platejs for --content-file
--templatestringStart from a template instead of --content-file. The title defaults to the template name.
Example
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 privatepf docs edit <id>Change a doc's title, icon, visibility, or layout
alias: pf docs update
Options
--titlestringNew title
--iconstringNew icon
--visibilitystringpublic, private, or shared
--full-widthstringFull-width layout, true or false
Example
pf docs edit <doc-id> --title "Launch notes" --full-width truepf docs archive <id>Archive a doc, or restore it with --restore
Options
--restorebooleanRestore the doc instead
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf docs archive <doc-id> --dry-run
pf docs archive <doc-id> --restorepf docs duplicate <id>Copy a doc into a new doc at the end of the same parent. Subdocs and comments are not copied.
Example
pf docs duplicate <doc-id> --jsonpf 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
--unlockbooleanUnlock the doc instead
Example
pf docs lock <doc-id>
pf docs lock <doc-id> --unlockpf docs watch <id>Watch a doc, or stop watching it with --off
Options
--offbooleanStop watching instead
Example
pf docs watch <doc-id>
pf docs watch <doc-id> --offpf docs delete <id>Delete a doc
alias: pf docs rm
Options
--confirmbooleanSkip the confirmation prompt
--dry-runbooleanPreview without making changes
Example
pf docs delete <doc-id> --dry-runArchive, restore, and delete
- Archive a canvas or doc when it should leave active lists but may be needed again. Use
--dry-runfirst 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
pf canvases --help
pf canvases items --help
pf spaces --help
pf docs --help
pf docs create --help
pf docs comments --help